diff --git a/blockchain/proto/iconlake/icon/tx.proto b/blockchain/proto/iconlake/icon/tx.proto index 1a258fd..1be72f6 100644 --- a/blockchain/proto/iconlake/icon/tx.proto +++ b/blockchain/proto/iconlake/icon/tx.proto @@ -39,9 +39,9 @@ message MsgUpdateClass { message MsgUpdateClassResponse {} message MsgBurn { - string creator = 1; - string classId = 2; - string id = 3; + string creator = 1; + string class_id = 2; + string id = 3; } message MsgBurnResponse {} diff --git a/blockchain/ts-client/amino.ts b/blockchain/ts-client/amino.ts new file mode 100644 index 0000000..446b431 --- /dev/null +++ b/blockchain/ts-client/amino.ts @@ -0,0 +1,9 @@ +import { createDropAminoConverters } from "./iconlake.drop/types/iconlake/drop/tx"; +import { createIconAminoConverters } from "./iconlake.icon/types/iconlake/icon/tx"; + +export function createIconlakeAminoConverters() { + return { + ...createIconAminoConverters(), + ...createDropAminoConverters(), + } +} diff --git a/blockchain/ts-client/client.ts b/blockchain/ts-client/client.ts index 477de9e..c3136a1 100755 --- a/blockchain/ts-client/client.ts +++ b/blockchain/ts-client/client.ts @@ -6,12 +6,13 @@ import { Registry, } from "@cosmjs/proto-signing"; import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient } from "@cosmjs/stargate"; +import { AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; import { Env } from "./env"; import { UnionToIntersection, Return, Constructor } from "./helpers"; import { Module } from "./modules"; import { EventEmitter } from "events"; import { ChainInfo } from "@keplr-wallet/types"; +import { createIconlakeAminoConverters } from "./amino"; const defaultFee = { amount: [], @@ -23,6 +24,7 @@ export class IgniteClient extends EventEmitter { env: Env; signer?: OfflineSigner; registry: Array<[string, GeneratedType]> = []; + aminoTypes: AminoTypes; static plugin(plugin: T) { const currentPlugins = this.plugins; @@ -42,7 +44,7 @@ export class IgniteClient extends EventEmitter { async signAndBroadcast(msgs: EncodeObject[], fee: StdFee, memo: string) { if (this.signer) { const { address } = (await this.signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(this.env.rpcURL, this.signer, { registry: new Registry(this.registry), prefix: this.env.prefix }); + const signingClient = await SigningStargateClient.connectWithSigner(this.env.rpcURL, this.signer, { registry: new Registry(this.registry), prefix: this.env.prefix, aminoTypes: this.aminoTypes }); return await signingClient.signAndBroadcast(address, msgs, fee ? fee : defaultFee, memo) } else { throw new Error(" Signer is not present."); @@ -61,7 +63,8 @@ export class IgniteClient extends EventEmitter { if (this.registry) { this.registry = this.registry.concat(pluginInstance.registry) } - }); + }); + this.aminoTypes = new AminoTypes(createIconlakeAminoConverters()); } useSigner(signer: OfflineSigner) { this.signer = signer; @@ -72,100 +75,71 @@ export class IgniteClient extends EventEmitter { this.emit("signer-changed", this.signer); } async useKeplr(keplrChainInfo: Partial = {}) { - // Using queryClients directly because BaseClient has no knowledge of the modules at this stage - try { - const queryClient = ( - await import("./cosmos.base.tendermint.v1beta1/module") - ).queryClient; - const bankQueryClient = (await import("./cosmos.bank.v1beta1/module")) - .queryClient; - - const stakingQueryClient = (await import("./cosmos.staking.v1beta1/module")).queryClient; - const stakingqc = stakingQueryClient({ addr: this.env.apiURL }); - const staking = await (await stakingqc.queryParams()).data; - - const qc = queryClient({ addr: this.env.apiURL }); - const node_info = await (await qc.serviceGetNodeInfo()).data; - const chainId = node_info.default_node_info?.network ?? ""; - const chainName = chainId?.toUpperCase() + " Network"; - const bankqc = bankQueryClient({ addr: this.env.apiURL }); - const tokens = await (await bankqc.queryTotalSupply()).data; - const addrPrefix = this.env.prefix ?? "cosmos"; - const rpc = this.env.rpcURL; - const rest = this.env.apiURL; + const chainId = "iconlake-1"; + const chainName = "iconLake"; + const addrPrefix = this.env.prefix ?? "iconlake"; + const rpc = this.env.rpcURL; + const rest = this.env.apiURL; - let bip44 = { - coinType: 1009, - }; + let bip44 = { + coinType: 1009, + }; - let bech32Config = { - bech32PrefixAccAddr: addrPrefix, - bech32PrefixAccPub: addrPrefix + "pub", - bech32PrefixValAddr: addrPrefix + "valoper", - bech32PrefixValPub: addrPrefix + "valoperpub", - bech32PrefixConsAddr: addrPrefix + "valcons", - bech32PrefixConsPub: addrPrefix + "valconspub", - }; + let bech32Config = { + bech32PrefixAccAddr: addrPrefix, + bech32PrefixAccPub: addrPrefix + "pub", + bech32PrefixValAddr: addrPrefix + "valoper", + bech32PrefixValPub: addrPrefix + "valoperpub", + bech32PrefixConsAddr: addrPrefix + "valcons", + bech32PrefixConsPub: addrPrefix + "valconspub", + }; - let currencies = - tokens.supply?.map((x) => { - const y = { - coinDenom: x.denom?.toUpperCase() ?? "", - coinMinimalDenom: x.denom ?? "", - coinDecimals: 0, - }; - return y; - }) ?? []; + let currencies = [{ + coinDenom: "LAKE", + coinMinimalDenom: "ulake", + coinDecimals: 6, + }, { + coinDenom: "DROP", + coinMinimalDenom: "udrop", + coinDecimals: 4, + }]; - - let stakeCurrency = { - coinDenom: staking.params?.bond_denom?.toUpperCase() ?? "", - coinMinimalDenom: staking.params?.bond_denom ?? "", - coinDecimals: 0, - }; - - let feeCurrencies = - tokens.supply?.map((x) => { - const y = { - coinDenom: x.denom?.toUpperCase() ?? "", - coinMinimalDenom: x.denom ?? "", - coinDecimals: 0, + + let stakeCurrency = { + coinDenom: "LAKE", + coinMinimalDenom: "ulake", + coinDecimals: 6, }; - return y; - }) ?? []; + + let feeCurrencies = currencies; - let coinType = 1009; + let coinType = 1009; - if (chainId) { - const suggestOptions: ChainInfo = { - chainId, - chainName, - rpc, - rest, - stakeCurrency, - bip44, - bech32Config, - currencies, - feeCurrencies, - coinType, - ...keplrChainInfo, - }; - await window.keplr.experimentalSuggestChain(suggestOptions); + if (chainId) { + const suggestOptions: ChainInfo = { + chainId, + chainName, + rpc, + rest, + stakeCurrency, + bip44, + bech32Config, + currencies, + feeCurrencies, + coinType, + ...keplrChainInfo, + }; + await window.keplr.experimentalSuggestChain(suggestOptions); - window.keplr.defaultOptions = { - sign: { - preferNoSetFee: true, - preferNoSetMemo: true, - }, - }; - } - await window.keplr.enable(chainId); - this.signer = window.keplr.getOfflineSigner(chainId); - this.emit("signer-changed", this.signer); - } catch (e) { - throw new Error( - "Could not load tendermint, staking and bank modules. Please ensure your client loads them to use useKeplr()" - ); + window.keplr.defaultOptions = { + sign: { + preferNoSetFee: true, + preferNoSetMemo: true, + }, + }; } + await window.keplr.enable(chainId); + this.signer = window.keplr.getOfflineSigner(chainId); + this.emit("signer-changed", this.signer); } } \ No newline at end of file diff --git a/blockchain/ts-client/cosmos.authz.v1beta1/module.ts b/blockchain/ts-client/cosmos.authz.v1beta1/module.ts index d878904..d25c7d5 100755 --- a/blockchain/ts-client/cosmos.authz.v1beta1/module.ts +++ b/blockchain/ts-client/cosmos.authz.v1beta1/module.ts @@ -7,9 +7,9 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" 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"; +import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx"; import { GenericAuthorization as typeGenericAuthorization} from "./types" import { Grant as typeGrant} from "./types" @@ -18,13 +18,7 @@ import { GrantQueueItem as typeGrantQueueItem} from "./types" import { EventGrant as typeEventGrant} from "./types" import { EventRevoke as typeEventRevoke} from "./types" -export { MsgGrant, MsgExec, MsgRevoke }; - -type sendMsgGrantParams = { - value: MsgGrant, - fee?: StdFee, - memo?: string -}; +export { MsgExec, MsgRevoke, MsgGrant }; type sendMsgExecParams = { value: MsgExec, @@ -38,11 +32,13 @@ type sendMsgRevokeParams = { memo?: string }; - -type msgGrantParams = { +type sendMsgGrantParams = { value: MsgGrant, + fee?: StdFee, + memo?: string }; + type msgExecParams = { value: MsgExec, }; @@ -51,6 +47,10 @@ type msgRevokeParams = { value: MsgRevoke, }; +type msgGrantParams = { + value: MsgGrant, +}; + export const registry = new Registry(msgTypes); @@ -81,20 +81,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgGrant({ value, fee, memo }: sendMsgGrantParams): Promise { - if (!signer) { - throw new Error('TxClient:sendMsgGrant: Unable to sign Tx. Signer is not present.') - } - try { - const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) }) - return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) - } catch (e: any) { - throw new Error('TxClient:sendMsgGrant: Could not broadcast Tx: '+ e.message) - } - }, - async sendMsgExec({ value, fee, memo }: sendMsgExecParams): Promise { if (!signer) { throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.') @@ -123,15 +109,21 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - - msgGrant({ value }: msgGrantParams): EncodeObject { - try { - return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial( value ) } + async sendMsgGrant({ value, fee, memo }: sendMsgGrantParams): Promise { + if (!signer) { + throw new Error('TxClient:sendMsgGrant: Unable to sign Tx. Signer is not present.') + } + try { + const { address } = (await signer.getAccounts())[0]; + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + let msg = this.msgGrant({ value: MsgGrant.fromPartial(value) }) + return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message) + throw new Error('TxClient:sendMsgGrant: Could not broadcast Tx: '+ e.message) } }, + msgExec({ value }: msgExecParams): EncodeObject { try { return { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial( value ) } @@ -148,6 +140,14 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, + msgGrant({ value }: msgGrantParams): EncodeObject { + try { + return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgGrant: Could not create message: ' + e.message) + } + }, + } }; diff --git a/blockchain/ts-client/cosmos.authz.v1beta1/registry.ts b/blockchain/ts-client/cosmos.authz.v1beta1/registry.ts index fe0fcc0..8c2de3b 100755 --- a/blockchain/ts-client/cosmos.authz.v1beta1/registry.ts +++ b/blockchain/ts-client/cosmos.authz.v1beta1/registry.ts @@ -1,12 +1,12 @@ import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx"; import { MsgExec } from "./types/cosmos/authz/v1beta1/tx"; import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx"; +import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], ["/cosmos.authz.v1beta1.MsgExec", MsgExec], ["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke], + ["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], ]; diff --git a/blockchain/ts-client/cosmos.bank.v1beta1/module.ts b/blockchain/ts-client/cosmos.bank.v1beta1/module.ts index cb014a4..7c1021c 100755 --- a/blockchain/ts-client/cosmos.bank.v1beta1/module.ts +++ b/blockchain/ts-client/cosmos.bank.v1beta1/module.ts @@ -7,8 +7,8 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; +import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; import { SendAuthorization as typeSendAuthorization} from "./types" import { Params as typeParams} from "./types" @@ -21,13 +21,7 @@ import { Metadata as typeMetadata} from "./types" import { Balance as typeBalance} from "./types" import { DenomOwner as typeDenomOwner} from "./types" -export { MsgSend, MsgMultiSend }; - -type sendMsgSendParams = { - value: MsgSend, - fee?: StdFee, - memo?: string -}; +export { MsgMultiSend, MsgSend }; type sendMsgMultiSendParams = { value: MsgMultiSend, @@ -35,15 +29,21 @@ type sendMsgMultiSendParams = { memo?: string }; - -type msgSendParams = { +type sendMsgSendParams = { value: MsgSend, + fee?: StdFee, + memo?: string }; + type msgMultiSendParams = { value: MsgMultiSend, }; +type msgSendParams = { + value: MsgSend, +}; + export const registry = new Registry(msgTypes); @@ -74,48 +74,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgSend({ value, fee, memo }: sendMsgSendParams): Promise { + async sendMsgMultiSend({ value, fee, memo }: sendMsgMultiSendParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSend: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgMultiSend: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSend({ value: MsgSend.fromPartial(value) }) + let msg = this.msgMultiSend({ value: MsgMultiSend.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSend: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgMultiSend: Could not broadcast Tx: '+ e.message) } }, - async sendMsgMultiSend({ value, fee, memo }: sendMsgMultiSendParams): Promise { + async sendMsgSend({ value, fee, memo }: sendMsgSendParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgMultiSend: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSend: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgMultiSend({ value: MsgMultiSend.fromPartial(value) }) + let msg = this.msgSend({ value: MsgSend.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgMultiSend: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSend: Could not broadcast Tx: '+ e.message) } }, - msgSend({ value }: msgSendParams): EncodeObject { + msgMultiSend({ value }: msgMultiSendParams): EncodeObject { try { - return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial( value ) } + return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSend: Could not create message: ' + e.message) + throw new Error('TxClient:MsgMultiSend: Could not create message: ' + e.message) } }, - msgMultiSend({ value }: msgMultiSendParams): EncodeObject { + msgSend({ value }: msgSendParams): EncodeObject { try { - return { typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend", value: MsgMultiSend.fromPartial( value ) } + return { typeUrl: "/cosmos.bank.v1beta1.MsgSend", value: MsgSend.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgMultiSend: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSend: Could not create message: ' + e.message) } }, diff --git a/blockchain/ts-client/cosmos.bank.v1beta1/registry.ts b/blockchain/ts-client/cosmos.bank.v1beta1/registry.ts index 89314a0..3a77952 100755 --- a/blockchain/ts-client/cosmos.bank.v1beta1/registry.ts +++ b/blockchain/ts-client/cosmos.bank.v1beta1/registry.ts @@ -1,10 +1,10 @@ import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; +import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.bank.v1beta1.MsgSend", MsgSend], ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], + ["/cosmos.bank.v1beta1.MsgSend", MsgSend], ]; diff --git a/blockchain/ts-client/cosmos.distribution.v1beta1/module.ts b/blockchain/ts-client/cosmos.distribution.v1beta1/module.ts index 926d9a3..29921f0 100755 --- a/blockchain/ts-client/cosmos.distribution.v1beta1/module.ts +++ b/blockchain/ts-client/cosmos.distribution.v1beta1/module.ts @@ -7,12 +7,12 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgCommunityPoolSpend } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; +import { MsgCommunityPoolSpend } from "./types/cosmos/distribution/v1beta1/tx"; +import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; +import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgUpdateParams } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; import { Params as typeParams} from "./types" import { ValidatorHistoricalRewards as typeValidatorHistoricalRewards} from "./types" @@ -34,10 +34,10 @@ import { ValidatorCurrentRewardsRecord as typeValidatorCurrentRewardsRecord} fro import { DelegatorStartingInfoRecord as typeDelegatorStartingInfoRecord} from "./types" import { ValidatorSlashEventRecord as typeValidatorSlashEventRecord} from "./types" -export { MsgFundCommunityPool, MsgCommunityPoolSpend, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgUpdateParams, MsgSetWithdrawAddress }; +export { MsgWithdrawDelegatorReward, MsgCommunityPoolSpend, MsgFundCommunityPool, MsgSetWithdrawAddress, MsgWithdrawValidatorCommission, MsgUpdateParams }; -type sendMsgFundCommunityPoolParams = { - value: MsgFundCommunityPool, +type sendMsgWithdrawDelegatorRewardParams = { + value: MsgWithdrawDelegatorReward, fee?: StdFee, memo?: string }; @@ -48,41 +48,45 @@ type sendMsgCommunityPoolSpendParams = { memo?: string }; -type sendMsgWithdrawDelegatorRewardParams = { - value: MsgWithdrawDelegatorReward, +type sendMsgFundCommunityPoolParams = { + value: MsgFundCommunityPool, fee?: StdFee, memo?: string }; -type sendMsgWithdrawValidatorCommissionParams = { - value: MsgWithdrawValidatorCommission, +type sendMsgSetWithdrawAddressParams = { + value: MsgSetWithdrawAddress, fee?: StdFee, memo?: string }; -type sendMsgUpdateParamsParams = { - value: MsgUpdateParams, +type sendMsgWithdrawValidatorCommissionParams = { + value: MsgWithdrawValidatorCommission, fee?: StdFee, memo?: string }; -type sendMsgSetWithdrawAddressParams = { - value: MsgSetWithdrawAddress, +type sendMsgUpdateParamsParams = { + value: MsgUpdateParams, fee?: StdFee, memo?: string }; -type msgFundCommunityPoolParams = { - value: MsgFundCommunityPool, +type msgWithdrawDelegatorRewardParams = { + value: MsgWithdrawDelegatorReward, }; type msgCommunityPoolSpendParams = { value: MsgCommunityPoolSpend, }; -type msgWithdrawDelegatorRewardParams = { - value: MsgWithdrawDelegatorReward, +type msgFundCommunityPoolParams = { + value: MsgFundCommunityPool, +}; + +type msgSetWithdrawAddressParams = { + value: MsgSetWithdrawAddress, }; type msgWithdrawValidatorCommissionParams = { @@ -93,10 +97,6 @@ type msgUpdateParamsParams = { value: MsgUpdateParams, }; -type msgSetWithdrawAddressParams = { - value: MsgSetWithdrawAddress, -}; - export const registry = new Registry(msgTypes); @@ -127,17 +127,17 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgFundCommunityPool({ value, fee, memo }: sendMsgFundCommunityPoolParams): Promise { + async sendMsgWithdrawDelegatorReward({ value, fee, memo }: sendMsgWithdrawDelegatorRewardParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgFundCommunityPool: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgFundCommunityPool({ value: MsgFundCommunityPool.fromPartial(value) }) + let msg = this.msgWithdrawDelegatorReward({ value: MsgWithdrawDelegatorReward.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgFundCommunityPool: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Could not broadcast Tx: '+ e.message) } }, @@ -155,68 +155,68 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgWithdrawDelegatorReward({ value, fee, memo }: sendMsgWithdrawDelegatorRewardParams): Promise { + async sendMsgFundCommunityPool({ value, fee, memo }: sendMsgFundCommunityPoolParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgFundCommunityPool: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgWithdrawDelegatorReward({ value: MsgWithdrawDelegatorReward.fromPartial(value) }) + let msg = this.msgFundCommunityPool({ value: MsgFundCommunityPool.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgWithdrawDelegatorReward: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgFundCommunityPool: Could not broadcast Tx: '+ e.message) } }, - async sendMsgWithdrawValidatorCommission({ value, fee, memo }: sendMsgWithdrawValidatorCommissionParams): Promise { + async sendMsgSetWithdrawAddress({ value, fee, memo }: sendMsgSetWithdrawAddressParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSetWithdrawAddress: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) }) + let msg = this.msgSetWithdrawAddress({ value: MsgSetWithdrawAddress.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { + async sendMsgWithdrawValidatorCommission({ value, fee, memo }: sendMsgWithdrawValidatorCommissionParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) + let msg = this.msgWithdrawValidatorCommission({ value: MsgWithdrawValidatorCommission.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgWithdrawValidatorCommission: Could not broadcast Tx: '+ e.message) } }, - async sendMsgSetWithdrawAddress({ value, fee, memo }: sendMsgSetWithdrawAddressParams): Promise { + async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSetWithdrawAddress: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSetWithdrawAddress({ value: MsgSetWithdrawAddress.fromPartial(value) }) + let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSetWithdrawAddress: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) } }, - msgFundCommunityPool({ value }: msgFundCommunityPoolParams): EncodeObject { + msgWithdrawDelegatorReward({ value }: msgWithdrawDelegatorRewardParams): EncodeObject { try { - return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial( value ) } + return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgFundCommunityPool: Could not create message: ' + e.message) + throw new Error('TxClient:MsgWithdrawDelegatorReward: Could not create message: ' + e.message) } }, @@ -228,11 +228,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgWithdrawDelegatorReward({ value }: msgWithdrawDelegatorRewardParams): EncodeObject { + msgFundCommunityPool({ value }: msgFundCommunityPoolParams): EncodeObject { try { - return { typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", value: MsgWithdrawDelegatorReward.fromPartial( value ) } + return { typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool", value: MsgFundCommunityPool.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgWithdrawDelegatorReward: Could not create message: ' + e.message) + throw new Error('TxClient:MsgFundCommunityPool: Could not create message: ' + e.message) + } + }, + + msgSetWithdrawAddress({ value }: msgSetWithdrawAddressParams): EncodeObject { + try { + return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message) } }, @@ -252,14 +260,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgSetWithdrawAddress({ value }: msgSetWithdrawAddressParams): EncodeObject { - try { - return { typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", value: MsgSetWithdrawAddress.fromPartial( value ) } - } catch (e: any) { - throw new Error('TxClient:MsgSetWithdrawAddress: Could not create message: ' + e.message) - } - }, - } }; diff --git a/blockchain/ts-client/cosmos.distribution.v1beta1/registry.ts b/blockchain/ts-client/cosmos.distribution.v1beta1/registry.ts index fdfad23..8271f71 100755 --- a/blockchain/ts-client/cosmos.distribution.v1beta1/registry.ts +++ b/blockchain/ts-client/cosmos.distribution.v1beta1/registry.ts @@ -1,18 +1,18 @@ import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgCommunityPoolSpend } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; +import { MsgCommunityPoolSpend } from "./types/cosmos/distribution/v1beta1/tx"; +import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; +import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; import { MsgUpdateParams } from "./types/cosmos/distribution/v1beta1/tx"; -import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], - ["/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", MsgCommunityPoolSpend], ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], + ["/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", MsgCommunityPoolSpend], + ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], + ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], ["/cosmos.distribution.v1beta1.MsgUpdateParams", MsgUpdateParams], - ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], ]; diff --git a/blockchain/ts-client/cosmos.feegrant.v1beta1/module.ts b/blockchain/ts-client/cosmos.feegrant.v1beta1/module.ts index da7753f..373b9c8 100755 --- a/blockchain/ts-client/cosmos.feegrant.v1beta1/module.ts +++ b/blockchain/ts-client/cosmos.feegrant.v1beta1/module.ts @@ -7,21 +7,15 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; import { MsgGrantAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; +import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; import { BasicAllowance as typeBasicAllowance} from "./types" import { PeriodicAllowance as typePeriodicAllowance} from "./types" import { AllowedMsgAllowance as typeAllowedMsgAllowance} from "./types" import { Grant as typeGrant} from "./types" -export { MsgRevokeAllowance, MsgGrantAllowance }; - -type sendMsgRevokeAllowanceParams = { - value: MsgRevokeAllowance, - fee?: StdFee, - memo?: string -}; +export { MsgGrantAllowance, MsgRevokeAllowance }; type sendMsgGrantAllowanceParams = { value: MsgGrantAllowance, @@ -29,15 +23,21 @@ type sendMsgGrantAllowanceParams = { memo?: string }; - -type msgRevokeAllowanceParams = { +type sendMsgRevokeAllowanceParams = { value: MsgRevokeAllowance, + fee?: StdFee, + memo?: string }; + type msgGrantAllowanceParams = { value: MsgGrantAllowance, }; +type msgRevokeAllowanceParams = { + value: MsgRevokeAllowance, +}; + export const registry = new Registry(msgTypes); @@ -68,48 +68,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgRevokeAllowance({ value, fee, memo }: sendMsgRevokeAllowanceParams): Promise { + async sendMsgGrantAllowance({ value, fee, memo }: sendMsgGrantAllowanceParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgRevokeAllowance: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgGrantAllowance: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgRevokeAllowance({ value: MsgRevokeAllowance.fromPartial(value) }) + let msg = this.msgGrantAllowance({ value: MsgGrantAllowance.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgRevokeAllowance: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgGrantAllowance: Could not broadcast Tx: '+ e.message) } }, - async sendMsgGrantAllowance({ value, fee, memo }: sendMsgGrantAllowanceParams): Promise { + async sendMsgRevokeAllowance({ value, fee, memo }: sendMsgRevokeAllowanceParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgGrantAllowance: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgRevokeAllowance: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgGrantAllowance({ value: MsgGrantAllowance.fromPartial(value) }) + let msg = this.msgRevokeAllowance({ value: MsgRevokeAllowance.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgGrantAllowance: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgRevokeAllowance: Could not broadcast Tx: '+ e.message) } }, - msgRevokeAllowance({ value }: msgRevokeAllowanceParams): EncodeObject { + msgGrantAllowance({ value }: msgGrantAllowanceParams): EncodeObject { try { - return { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.fromPartial( value ) } + return { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgRevokeAllowance: Could not create message: ' + e.message) + throw new Error('TxClient:MsgGrantAllowance: Could not create message: ' + e.message) } }, - msgGrantAllowance({ value }: msgGrantAllowanceParams): EncodeObject { + msgRevokeAllowance({ value }: msgRevokeAllowanceParams): EncodeObject { try { - return { typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance", value: MsgGrantAllowance.fromPartial( value ) } + return { typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", value: MsgRevokeAllowance.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgGrantAllowance: Could not create message: ' + e.message) + throw new Error('TxClient:MsgRevokeAllowance: Could not create message: ' + e.message) } }, diff --git a/blockchain/ts-client/cosmos.feegrant.v1beta1/registry.ts b/blockchain/ts-client/cosmos.feegrant.v1beta1/registry.ts index 6a1d50d..433cf30 100755 --- a/blockchain/ts-client/cosmos.feegrant.v1beta1/registry.ts +++ b/blockchain/ts-client/cosmos.feegrant.v1beta1/registry.ts @@ -1,10 +1,10 @@ import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; import { MsgGrantAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; +import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], ["/cosmos.feegrant.v1beta1.MsgGrantAllowance", MsgGrantAllowance], + ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], ]; diff --git a/blockchain/ts-client/cosmos.gov.v1/module.ts b/blockchain/ts-client/cosmos.gov.v1/module.ts index 9161ad9..7de48b3 100755 --- a/blockchain/ts-client/cosmos.gov.v1/module.ts +++ b/blockchain/ts-client/cosmos.gov.v1/module.ts @@ -8,10 +8,10 @@ import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; import { MsgVote } from "./types/cosmos/gov/v1/tx"; -import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx"; -import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx"; import { MsgUpdateParams } from "./types/cosmos/gov/v1/tx"; import { MsgDeposit } from "./types/cosmos/gov/v1/tx"; +import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx"; +import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx"; import { WeightedVoteOption as typeWeightedVoteOption} from "./types" import { Deposit as typeDeposit} from "./types" @@ -23,7 +23,7 @@ import { VotingParams as typeVotingParams} from "./types" import { TallyParams as typeTallyParams} from "./types" import { Params as typeParams} from "./types" -export { MsgVote, MsgVoteWeighted, MsgSubmitProposal, MsgUpdateParams, MsgDeposit }; +export { MsgVote, MsgUpdateParams, MsgDeposit, MsgVoteWeighted, MsgSubmitProposal }; type sendMsgVoteParams = { value: MsgVote, @@ -31,26 +31,26 @@ type sendMsgVoteParams = { memo?: string }; -type sendMsgVoteWeightedParams = { - value: MsgVoteWeighted, +type sendMsgUpdateParamsParams = { + value: MsgUpdateParams, fee?: StdFee, memo?: string }; -type sendMsgSubmitProposalParams = { - value: MsgSubmitProposal, +type sendMsgDepositParams = { + value: MsgDeposit, fee?: StdFee, memo?: string }; -type sendMsgUpdateParamsParams = { - value: MsgUpdateParams, +type sendMsgVoteWeightedParams = { + value: MsgVoteWeighted, fee?: StdFee, memo?: string }; -type sendMsgDepositParams = { - value: MsgDeposit, +type sendMsgSubmitProposalParams = { + value: MsgSubmitProposal, fee?: StdFee, memo?: string }; @@ -60,14 +60,6 @@ type msgVoteParams = { value: MsgVote, }; -type msgVoteWeightedParams = { - value: MsgVoteWeighted, -}; - -type msgSubmitProposalParams = { - value: MsgSubmitProposal, -}; - type msgUpdateParamsParams = { value: MsgUpdateParams, }; @@ -76,6 +68,14 @@ type msgDepositParams = { value: MsgDeposit, }; +type msgVoteWeightedParams = { + value: MsgVoteWeighted, +}; + +type msgSubmitProposalParams = { + value: MsgSubmitProposal, +}; + export const registry = new Registry(msgTypes); @@ -120,59 +120,59 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise { + async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) }) + let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) } }, - async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise { + async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) }) + let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { + async sendMsgVoteWeighted({ value, fee, memo }: sendMsgVoteWeightedParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgVoteWeighted: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) + let msg = this.msgVoteWeighted({ value: MsgVoteWeighted.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgVoteWeighted: Could not broadcast Tx: '+ e.message) } }, - async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise { + async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) }) + let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message) } }, @@ -185,35 +185,35 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject { + msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1.MsgUpdateParams", value: MsgUpdateParams.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUpdateParams: Could not create message: ' + e.message) } }, - msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject { + msgDeposit({ value }: msgDepositParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message) + throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message) } }, - msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject { + msgVoteWeighted({ value }: msgVoteWeightedParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1.MsgUpdateParams", value: MsgUpdateParams.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1.MsgVoteWeighted", value: MsgVoteWeighted.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUpdateParams: Could not create message: ' + e.message) + throw new Error('TxClient:MsgVoteWeighted: Could not create message: ' + e.message) } }, - msgDeposit({ value }: msgDepositParams): EncodeObject { + msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1.MsgDeposit", value: MsgDeposit.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message) } }, diff --git a/blockchain/ts-client/cosmos.gov.v1/registry.ts b/blockchain/ts-client/cosmos.gov.v1/registry.ts index 1287268..aa4d26a 100755 --- a/blockchain/ts-client/cosmos.gov.v1/registry.ts +++ b/blockchain/ts-client/cosmos.gov.v1/registry.ts @@ -1,16 +1,16 @@ import { GeneratedType } from "@cosmjs/proto-signing"; import { MsgVote } from "./types/cosmos/gov/v1/tx"; -import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx"; -import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx"; import { MsgUpdateParams } from "./types/cosmos/gov/v1/tx"; import { MsgDeposit } from "./types/cosmos/gov/v1/tx"; +import { MsgVoteWeighted } from "./types/cosmos/gov/v1/tx"; +import { MsgSubmitProposal } from "./types/cosmos/gov/v1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ ["/cosmos.gov.v1.MsgVote", MsgVote], - ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted], - ["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.gov.v1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.gov.v1.MsgDeposit", MsgDeposit], + ["/cosmos.gov.v1.MsgVoteWeighted", MsgVoteWeighted], + ["/cosmos.gov.v1.MsgSubmitProposal", MsgSubmitProposal], ]; diff --git a/blockchain/ts-client/cosmos.gov.v1beta1/module.ts b/blockchain/ts-client/cosmos.gov.v1beta1/module.ts index 53782dd..d52ddc3 100755 --- a/blockchain/ts-client/cosmos.gov.v1beta1/module.ts +++ b/blockchain/ts-client/cosmos.gov.v1beta1/module.ts @@ -8,9 +8,9 @@ import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; +import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; +import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; import { WeightedVoteOption as typeWeightedVoteOption} from "./types" import { TextProposal as typeTextProposal} from "./types" @@ -22,7 +22,7 @@ import { DepositParams as typeDepositParams} from "./types" import { VotingParams as typeVotingParams} from "./types" import { TallyParams as typeTallyParams} from "./types" -export { MsgSubmitProposal, MsgVote, MsgVoteWeighted, MsgDeposit }; +export { MsgSubmitProposal, MsgDeposit, MsgVoteWeighted, MsgVote }; type sendMsgSubmitProposalParams = { value: MsgSubmitProposal, @@ -30,8 +30,8 @@ type sendMsgSubmitProposalParams = { memo?: string }; -type sendMsgVoteParams = { - value: MsgVote, +type sendMsgDepositParams = { + value: MsgDeposit, fee?: StdFee, memo?: string }; @@ -42,8 +42,8 @@ type sendMsgVoteWeightedParams = { memo?: string }; -type sendMsgDepositParams = { - value: MsgDeposit, +type sendMsgVoteParams = { + value: MsgVote, fee?: StdFee, memo?: string }; @@ -53,16 +53,16 @@ type msgSubmitProposalParams = { value: MsgSubmitProposal, }; -type msgVoteParams = { - value: MsgVote, +type msgDepositParams = { + value: MsgDeposit, }; type msgVoteWeightedParams = { value: MsgVoteWeighted, }; -type msgDepositParams = { - value: MsgDeposit, +type msgVoteParams = { + value: MsgVote, }; @@ -109,17 +109,17 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise { + async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgVote({ value: MsgVote.fromPartial(value) }) + let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message) } }, @@ -137,17 +137,17 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgDeposit({ value, fee, memo }: sendMsgDepositParams): Promise { + async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgDeposit: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgDeposit({ value: MsgDeposit.fromPartial(value) }) + let msg = this.msgVote({ value: MsgVote.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgDeposit: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message) } }, @@ -160,11 +160,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgVote({ value }: msgVoteParams): EncodeObject { + msgDeposit({ value }: msgDepositParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgVote: Could not create message: ' + e.message) + throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message) } }, @@ -176,11 +176,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgDeposit({ value }: msgDepositParams): EncodeObject { + msgVote({ value }: msgVoteParams): EncodeObject { try { - return { typeUrl: "/cosmos.gov.v1beta1.MsgDeposit", value: MsgDeposit.fromPartial( value ) } + return { typeUrl: "/cosmos.gov.v1beta1.MsgVote", value: MsgVote.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgDeposit: Could not create message: ' + e.message) + throw new Error('TxClient:MsgVote: Could not create message: ' + e.message) } }, diff --git a/blockchain/ts-client/cosmos.gov.v1beta1/registry.ts b/blockchain/ts-client/cosmos.gov.v1beta1/registry.ts index 4bca014..8563c0b 100755 --- a/blockchain/ts-client/cosmos.gov.v1beta1/registry.ts +++ b/blockchain/ts-client/cosmos.gov.v1beta1/registry.ts @@ -1,14 +1,14 @@ import { GeneratedType } from "@cosmjs/proto-signing"; import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; -import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; +import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; +import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ ["/cosmos.gov.v1beta1.MsgSubmitProposal", MsgSubmitProposal], - ["/cosmos.gov.v1beta1.MsgVote", MsgVote], - ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted], ["/cosmos.gov.v1beta1.MsgDeposit", MsgDeposit], + ["/cosmos.gov.v1beta1.MsgVoteWeighted", MsgVoteWeighted], + ["/cosmos.gov.v1beta1.MsgVote", MsgVote], ]; diff --git a/blockchain/ts-client/cosmos.group.v1/module.ts b/blockchain/ts-client/cosmos.group.v1/module.ts index 69a9a5e..3af1dec 100755 --- a/blockchain/ts-client/cosmos.group.v1/module.ts +++ b/blockchain/ts-client/cosmos.group.v1/module.ts @@ -7,20 +7,20 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; +import { MsgCreateGroupPolicy } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupPolicyAdmin } from "./types/cosmos/group/v1/tx"; import { MsgLeaveGroup } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupMetadata } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupMembers } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx"; import { MsgCreateGroup } from "./types/cosmos/group/v1/tx"; import { MsgUpdateGroupPolicyMetadata } from "./types/cosmos/group/v1/tx"; -import { MsgExec } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx"; +import { MsgSubmitProposal } from "./types/cosmos/group/v1/tx"; import { MsgCreateGroupWithPolicy } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupPolicyAdmin } from "./types/cosmos/group/v1/tx"; -import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupMetadata } from "./types/cosmos/group/v1/tx"; +import { MsgExec } from "./types/cosmos/group/v1/tx"; import { MsgVote } from "./types/cosmos/group/v1/tx"; -import { MsgSubmitProposal } from "./types/cosmos/group/v1/tx"; -import { MsgCreateGroupPolicy } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupMembers } from "./types/cosmos/group/v1/tx"; +import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx"; import { EventCreateGroup as typeEventCreateGroup} from "./types" import { EventUpdateGroup as typeEventUpdateGroup} from "./types" @@ -44,28 +44,28 @@ import { Proposal as typeProposal} from "./types" import { TallyResult as typeTallyResult} from "./types" import { Vote as typeVote} from "./types" -export { MsgLeaveGroup, MsgCreateGroup, MsgUpdateGroupPolicyMetadata, MsgExec, MsgUpdateGroupAdmin, MsgCreateGroupWithPolicy, MsgUpdateGroupPolicyAdmin, MsgWithdrawProposal, MsgUpdateGroupPolicyDecisionPolicy, MsgUpdateGroupMetadata, MsgVote, MsgSubmitProposal, MsgCreateGroupPolicy, MsgUpdateGroupMembers }; +export { MsgCreateGroupPolicy, MsgUpdateGroupPolicyAdmin, MsgLeaveGroup, MsgUpdateGroupMetadata, MsgUpdateGroupAdmin, MsgUpdateGroupMembers, MsgUpdateGroupPolicyDecisionPolicy, MsgCreateGroup, MsgUpdateGroupPolicyMetadata, MsgSubmitProposal, MsgCreateGroupWithPolicy, MsgExec, MsgVote, MsgWithdrawProposal }; -type sendMsgLeaveGroupParams = { - value: MsgLeaveGroup, +type sendMsgCreateGroupPolicyParams = { + value: MsgCreateGroupPolicy, fee?: StdFee, memo?: string }; -type sendMsgCreateGroupParams = { - value: MsgCreateGroup, +type sendMsgUpdateGroupPolicyAdminParams = { + value: MsgUpdateGroupPolicyAdmin, fee?: StdFee, memo?: string }; -type sendMsgUpdateGroupPolicyMetadataParams = { - value: MsgUpdateGroupPolicyMetadata, +type sendMsgLeaveGroupParams = { + value: MsgLeaveGroup, fee?: StdFee, memo?: string }; -type sendMsgExecParams = { - value: MsgExec, +type sendMsgUpdateGroupMetadataParams = { + value: MsgUpdateGroupMetadata, fee?: StdFee, memo?: string }; @@ -76,115 +76,115 @@ type sendMsgUpdateGroupAdminParams = { memo?: string }; -type sendMsgCreateGroupWithPolicyParams = { - value: MsgCreateGroupWithPolicy, +type sendMsgUpdateGroupMembersParams = { + value: MsgUpdateGroupMembers, fee?: StdFee, memo?: string }; -type sendMsgUpdateGroupPolicyAdminParams = { - value: MsgUpdateGroupPolicyAdmin, +type sendMsgUpdateGroupPolicyDecisionPolicyParams = { + value: MsgUpdateGroupPolicyDecisionPolicy, fee?: StdFee, memo?: string }; -type sendMsgWithdrawProposalParams = { - value: MsgWithdrawProposal, +type sendMsgCreateGroupParams = { + value: MsgCreateGroup, fee?: StdFee, memo?: string }; -type sendMsgUpdateGroupPolicyDecisionPolicyParams = { - value: MsgUpdateGroupPolicyDecisionPolicy, +type sendMsgUpdateGroupPolicyMetadataParams = { + value: MsgUpdateGroupPolicyMetadata, fee?: StdFee, memo?: string }; -type sendMsgUpdateGroupMetadataParams = { - value: MsgUpdateGroupMetadata, +type sendMsgSubmitProposalParams = { + value: MsgSubmitProposal, fee?: StdFee, memo?: string }; -type sendMsgVoteParams = { - value: MsgVote, +type sendMsgCreateGroupWithPolicyParams = { + value: MsgCreateGroupWithPolicy, fee?: StdFee, memo?: string }; -type sendMsgSubmitProposalParams = { - value: MsgSubmitProposal, +type sendMsgExecParams = { + value: MsgExec, fee?: StdFee, memo?: string }; -type sendMsgCreateGroupPolicyParams = { - value: MsgCreateGroupPolicy, +type sendMsgVoteParams = { + value: MsgVote, fee?: StdFee, memo?: string }; -type sendMsgUpdateGroupMembersParams = { - value: MsgUpdateGroupMembers, +type sendMsgWithdrawProposalParams = { + value: MsgWithdrawProposal, fee?: StdFee, memo?: string }; -type msgLeaveGroupParams = { - value: MsgLeaveGroup, +type msgCreateGroupPolicyParams = { + value: MsgCreateGroupPolicy, }; -type msgCreateGroupParams = { - value: MsgCreateGroup, +type msgUpdateGroupPolicyAdminParams = { + value: MsgUpdateGroupPolicyAdmin, }; -type msgUpdateGroupPolicyMetadataParams = { - value: MsgUpdateGroupPolicyMetadata, +type msgLeaveGroupParams = { + value: MsgLeaveGroup, }; -type msgExecParams = { - value: MsgExec, +type msgUpdateGroupMetadataParams = { + value: MsgUpdateGroupMetadata, }; type msgUpdateGroupAdminParams = { value: MsgUpdateGroupAdmin, }; -type msgCreateGroupWithPolicyParams = { - value: MsgCreateGroupWithPolicy, -}; - -type msgUpdateGroupPolicyAdminParams = { - value: MsgUpdateGroupPolicyAdmin, -}; - -type msgWithdrawProposalParams = { - value: MsgWithdrawProposal, +type msgUpdateGroupMembersParams = { + value: MsgUpdateGroupMembers, }; type msgUpdateGroupPolicyDecisionPolicyParams = { value: MsgUpdateGroupPolicyDecisionPolicy, }; -type msgUpdateGroupMetadataParams = { - value: MsgUpdateGroupMetadata, +type msgCreateGroupParams = { + value: MsgCreateGroup, }; -type msgVoteParams = { - value: MsgVote, +type msgUpdateGroupPolicyMetadataParams = { + value: MsgUpdateGroupPolicyMetadata, }; type msgSubmitProposalParams = { value: MsgSubmitProposal, }; -type msgCreateGroupPolicyParams = { - value: MsgCreateGroupPolicy, +type msgCreateGroupWithPolicyParams = { + value: MsgCreateGroupWithPolicy, }; -type msgUpdateGroupMembersParams = { - value: MsgUpdateGroupMembers, +type msgExecParams = { + value: MsgExec, +}; + +type msgVoteParams = { + value: MsgVote, +}; + +type msgWithdrawProposalParams = { + value: MsgWithdrawProposal, }; @@ -217,59 +217,59 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgLeaveGroup({ value, fee, memo }: sendMsgLeaveGroupParams): Promise { + async sendMsgCreateGroupPolicy({ value, fee, memo }: sendMsgCreateGroupPolicyParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgLeaveGroup: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreateGroupPolicy: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgLeaveGroup({ value: MsgLeaveGroup.fromPartial(value) }) + let msg = this.msgCreateGroupPolicy({ value: MsgCreateGroupPolicy.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgLeaveGroup: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreateGroupPolicy: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCreateGroup({ value, fee, memo }: sendMsgCreateGroupParams): Promise { + async sendMsgUpdateGroupPolicyAdmin({ value, fee, memo }: sendMsgUpdateGroupPolicyAdminParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateGroup: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateGroup({ value: MsgCreateGroup.fromPartial(value) }) + let msg = this.msgUpdateGroupPolicyAdmin({ value: MsgUpdateGroupPolicyAdmin.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateGroup: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateGroupPolicyMetadata({ value, fee, memo }: sendMsgUpdateGroupPolicyMetadataParams): Promise { + async sendMsgLeaveGroup({ value, fee, memo }: sendMsgLeaveGroupParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgLeaveGroup: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateGroupPolicyMetadata({ value: MsgUpdateGroupPolicyMetadata.fromPartial(value) }) + let msg = this.msgLeaveGroup({ value: MsgLeaveGroup.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgLeaveGroup: Could not broadcast Tx: '+ e.message) } }, - async sendMsgExec({ value, fee, memo }: sendMsgExecParams): Promise { + async sendMsgUpdateGroupMetadata({ value, fee, memo }: sendMsgUpdateGroupMetadataParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateGroupMetadata: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgExec({ value: MsgExec.fromPartial(value) }) + let msg = this.msgUpdateGroupMetadata({ value: MsgUpdateGroupMetadata.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgExec: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateGroupMetadata: Could not broadcast Tx: '+ e.message) } }, @@ -287,162 +287,162 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgCreateGroupWithPolicy({ value, fee, memo }: sendMsgCreateGroupWithPolicyParams): Promise { + async sendMsgUpdateGroupMembers({ value, fee, memo }: sendMsgUpdateGroupMembersParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateGroupMembers: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateGroupWithPolicy({ value: MsgCreateGroupWithPolicy.fromPartial(value) }) + let msg = this.msgUpdateGroupMembers({ value: MsgUpdateGroupMembers.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateGroupMembers: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateGroupPolicyAdmin({ value, fee, memo }: sendMsgUpdateGroupPolicyAdminParams): Promise { + async sendMsgUpdateGroupPolicyDecisionPolicy({ value, fee, memo }: sendMsgUpdateGroupPolicyDecisionPolicyParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateGroupPolicyAdmin({ value: MsgUpdateGroupPolicyAdmin.fromPartial(value) }) + let msg = this.msgUpdateGroupPolicyDecisionPolicy({ value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateGroupPolicyAdmin: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Could not broadcast Tx: '+ e.message) } }, - async sendMsgWithdrawProposal({ value, fee, memo }: sendMsgWithdrawProposalParams): Promise { + async sendMsgCreateGroup({ value, fee, memo }: sendMsgCreateGroupParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgWithdrawProposal: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreateGroup: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgWithdrawProposal({ value: MsgWithdrawProposal.fromPartial(value) }) + let msg = this.msgCreateGroup({ value: MsgCreateGroup.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgWithdrawProposal: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreateGroup: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateGroupPolicyDecisionPolicy({ value, fee, memo }: sendMsgUpdateGroupPolicyDecisionPolicyParams): Promise { + async sendMsgUpdateGroupPolicyMetadata({ value, fee, memo }: sendMsgUpdateGroupPolicyMetadataParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateGroupPolicyDecisionPolicy({ value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial(value) }) + let msg = this.msgUpdateGroupPolicyMetadata({ value: MsgUpdateGroupPolicyMetadata.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateGroupPolicyDecisionPolicy: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUpdateGroupPolicyMetadata: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateGroupMetadata({ value, fee, memo }: sendMsgUpdateGroupMetadataParams): Promise { + async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateGroupMetadata: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateGroupMetadata({ value: MsgUpdateGroupMetadata.fromPartial(value) }) + let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateGroupMetadata: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message) } }, - async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise { + async sendMsgCreateGroupWithPolicy({ value, fee, memo }: sendMsgCreateGroupWithPolicyParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgVote({ value: MsgVote.fromPartial(value) }) + let msg = this.msgCreateGroupWithPolicy({ value: MsgCreateGroupWithPolicy.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreateGroupWithPolicy: Could not broadcast Tx: '+ e.message) } }, - async sendMsgSubmitProposal({ value, fee, memo }: sendMsgSubmitProposalParams): Promise { + async sendMsgExec({ value, fee, memo }: sendMsgExecParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSubmitProposal: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgExec: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSubmitProposal({ value: MsgSubmitProposal.fromPartial(value) }) + let msg = this.msgExec({ value: MsgExec.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSubmitProposal: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgExec: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCreateGroupPolicy({ value, fee, memo }: sendMsgCreateGroupPolicyParams): Promise { + async sendMsgVote({ value, fee, memo }: sendMsgVoteParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateGroupPolicy: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgVote: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateGroupPolicy({ value: MsgCreateGroupPolicy.fromPartial(value) }) + let msg = this.msgVote({ value: MsgVote.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateGroupPolicy: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgVote: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUpdateGroupMembers({ value, fee, memo }: sendMsgUpdateGroupMembersParams): Promise { + async sendMsgWithdrawProposal({ value, fee, memo }: sendMsgWithdrawProposalParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUpdateGroupMembers: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgWithdrawProposal: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateGroupMembers({ value: MsgUpdateGroupMembers.fromPartial(value) }) + let msg = this.msgWithdrawProposal({ value: MsgWithdrawProposal.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateGroupMembers: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgWithdrawProposal: Could not broadcast Tx: '+ e.message) } }, - msgLeaveGroup({ value }: msgLeaveGroupParams): EncodeObject { + msgCreateGroupPolicy({ value }: msgCreateGroupPolicyParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgLeaveGroup: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateGroupPolicy: Could not create message: ' + e.message) } }, - msgCreateGroup({ value }: msgCreateGroupParams): EncodeObject { + msgUpdateGroupPolicyAdmin({ value }: msgUpdateGroupPolicyAdminParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateGroup: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUpdateGroupPolicyAdmin: Could not create message: ' + e.message) } }, - msgUpdateGroupPolicyMetadata({ value }: msgUpdateGroupPolicyMetadataParams): EncodeObject { + msgLeaveGroup({ value }: msgLeaveGroupParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgLeaveGroup", value: MsgLeaveGroup.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUpdateGroupPolicyMetadata: Could not create message: ' + e.message) + throw new Error('TxClient:MsgLeaveGroup: Could not create message: ' + e.message) } }, - msgExec({ value }: msgExecParams): EncodeObject { + msgUpdateGroupMetadata({ value }: msgUpdateGroupMetadataParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgExec: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUpdateGroupMetadata: Could not create message: ' + e.message) } }, @@ -454,75 +454,75 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgCreateGroupWithPolicy({ value }: msgCreateGroupWithPolicyParams): EncodeObject { + msgUpdateGroupMembers({ value }: msgUpdateGroupMembersParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateGroupWithPolicy: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUpdateGroupMembers: Could not create message: ' + e.message) } }, - msgUpdateGroupPolicyAdmin({ value }: msgUpdateGroupPolicyAdminParams): EncodeObject { + msgUpdateGroupPolicyDecisionPolicy({ value }: msgUpdateGroupPolicyDecisionPolicyParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", value: MsgUpdateGroupPolicyAdmin.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUpdateGroupPolicyAdmin: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUpdateGroupPolicyDecisionPolicy: Could not create message: ' + e.message) } }, - msgWithdrawProposal({ value }: msgWithdrawProposalParams): EncodeObject { + msgCreateGroup({ value }: msgCreateGroupParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgCreateGroup", value: MsgCreateGroup.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgWithdrawProposal: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateGroup: Could not create message: ' + e.message) } }, - msgUpdateGroupPolicyDecisionPolicy({ value }: msgUpdateGroupPolicyDecisionPolicyParams): EncodeObject { + msgUpdateGroupPolicyMetadata({ value }: msgUpdateGroupPolicyMetadataParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", value: MsgUpdateGroupPolicyDecisionPolicy.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", value: MsgUpdateGroupPolicyMetadata.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUpdateGroupPolicyDecisionPolicy: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUpdateGroupPolicyMetadata: Could not create message: ' + e.message) } }, - msgUpdateGroupMetadata({ value }: msgUpdateGroupMetadataParams): EncodeObject { + msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMetadata", value: MsgUpdateGroupMetadata.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUpdateGroupMetadata: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message) } }, - msgVote({ value }: msgVoteParams): EncodeObject { + msgCreateGroupWithPolicy({ value }: msgCreateGroupWithPolicyParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgCreateGroupWithPolicy", value: MsgCreateGroupWithPolicy.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgVote: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateGroupWithPolicy: Could not create message: ' + e.message) } }, - msgSubmitProposal({ value }: msgSubmitProposalParams): EncodeObject { + msgExec({ value }: msgExecParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgSubmitProposal", value: MsgSubmitProposal.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgExec", value: MsgExec.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSubmitProposal: Could not create message: ' + e.message) + throw new Error('TxClient:MsgExec: Could not create message: ' + e.message) } }, - msgCreateGroupPolicy({ value }: msgCreateGroupPolicyParams): EncodeObject { + msgVote({ value }: msgVoteParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgCreateGroupPolicy", value: MsgCreateGroupPolicy.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgVote", value: MsgVote.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateGroupPolicy: Could not create message: ' + e.message) + throw new Error('TxClient:MsgVote: Could not create message: ' + e.message) } }, - msgUpdateGroupMembers({ value }: msgUpdateGroupMembersParams): EncodeObject { + msgWithdrawProposal({ value }: msgWithdrawProposalParams): EncodeObject { try { - return { typeUrl: "/cosmos.group.v1.MsgUpdateGroupMembers", value: MsgUpdateGroupMembers.fromPartial( value ) } + return { typeUrl: "/cosmos.group.v1.MsgWithdrawProposal", value: MsgWithdrawProposal.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUpdateGroupMembers: Could not create message: ' + e.message) + throw new Error('TxClient:MsgWithdrawProposal: Could not create message: ' + e.message) } }, diff --git a/blockchain/ts-client/cosmos.group.v1/registry.ts b/blockchain/ts-client/cosmos.group.v1/registry.ts index a9b4b6c..c18c6f6 100755 --- a/blockchain/ts-client/cosmos.group.v1/registry.ts +++ b/blockchain/ts-client/cosmos.group.v1/registry.ts @@ -1,34 +1,34 @@ import { GeneratedType } from "@cosmjs/proto-signing"; +import { MsgCreateGroupPolicy } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupPolicyAdmin } from "./types/cosmos/group/v1/tx"; import { MsgLeaveGroup } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupMetadata } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupMembers } from "./types/cosmos/group/v1/tx"; +import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx"; import { MsgCreateGroup } from "./types/cosmos/group/v1/tx"; import { MsgUpdateGroupPolicyMetadata } from "./types/cosmos/group/v1/tx"; -import { MsgExec } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupAdmin } from "./types/cosmos/group/v1/tx"; +import { MsgSubmitProposal } from "./types/cosmos/group/v1/tx"; import { MsgCreateGroupWithPolicy } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupPolicyAdmin } from "./types/cosmos/group/v1/tx"; -import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupPolicyDecisionPolicy } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupMetadata } from "./types/cosmos/group/v1/tx"; +import { MsgExec } from "./types/cosmos/group/v1/tx"; import { MsgVote } from "./types/cosmos/group/v1/tx"; -import { MsgSubmitProposal } from "./types/cosmos/group/v1/tx"; -import { MsgCreateGroupPolicy } from "./types/cosmos/group/v1/tx"; -import { MsgUpdateGroupMembers } from "./types/cosmos/group/v1/tx"; +import { MsgWithdrawProposal } from "./types/cosmos/group/v1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ + ["/cosmos.group.v1.MsgCreateGroupPolicy", MsgCreateGroupPolicy], + ["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", MsgUpdateGroupPolicyAdmin], ["/cosmos.group.v1.MsgLeaveGroup", MsgLeaveGroup], + ["/cosmos.group.v1.MsgUpdateGroupMetadata", MsgUpdateGroupMetadata], + ["/cosmos.group.v1.MsgUpdateGroupAdmin", MsgUpdateGroupAdmin], + ["/cosmos.group.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers], + ["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", MsgUpdateGroupPolicyDecisionPolicy], ["/cosmos.group.v1.MsgCreateGroup", MsgCreateGroup], ["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", MsgUpdateGroupPolicyMetadata], - ["/cosmos.group.v1.MsgExec", MsgExec], - ["/cosmos.group.v1.MsgUpdateGroupAdmin", MsgUpdateGroupAdmin], + ["/cosmos.group.v1.MsgSubmitProposal", MsgSubmitProposal], ["/cosmos.group.v1.MsgCreateGroupWithPolicy", MsgCreateGroupWithPolicy], - ["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", MsgUpdateGroupPolicyAdmin], - ["/cosmos.group.v1.MsgWithdrawProposal", MsgWithdrawProposal], - ["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", MsgUpdateGroupPolicyDecisionPolicy], - ["/cosmos.group.v1.MsgUpdateGroupMetadata", MsgUpdateGroupMetadata], + ["/cosmos.group.v1.MsgExec", MsgExec], ["/cosmos.group.v1.MsgVote", MsgVote], - ["/cosmos.group.v1.MsgSubmitProposal", MsgSubmitProposal], - ["/cosmos.group.v1.MsgCreateGroupPolicy", MsgCreateGroupPolicy], - ["/cosmos.group.v1.MsgUpdateGroupMembers", MsgUpdateGroupMembers], + ["/cosmos.group.v1.MsgWithdrawProposal", MsgWithdrawProposal], ]; diff --git a/blockchain/ts-client/cosmos.staking.v1beta1/module.ts b/blockchain/ts-client/cosmos.staking.v1beta1/module.ts index dab9b33..5ccff40 100755 --- a/blockchain/ts-client/cosmos.staking.v1beta1/module.ts +++ b/blockchain/ts-client/cosmos.staking.v1beta1/module.ts @@ -7,12 +7,12 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; import { StakeAuthorization as typeStakeAuthorization} from "./types" import { StakeAuthorization_Validators as typeStakeAuthorization_Validators} from "./types" @@ -39,16 +39,16 @@ import { RedelegationResponse as typeRedelegationResponse} from "./types" import { Pool as typePool} from "./types" import { ValidatorUpdates as typeValidatorUpdates} from "./types" -export { MsgCancelUnbondingDelegation, MsgCreateValidator, MsgEditValidator, MsgBeginRedelegate, MsgDelegate, MsgUndelegate }; +export { MsgDelegate, MsgBeginRedelegate, MsgEditValidator, MsgUndelegate, MsgCancelUnbondingDelegation, MsgCreateValidator }; -type sendMsgCancelUnbondingDelegationParams = { - value: MsgCancelUnbondingDelegation, +type sendMsgDelegateParams = { + value: MsgDelegate, fee?: StdFee, memo?: string }; -type sendMsgCreateValidatorParams = { - value: MsgCreateValidator, +type sendMsgBeginRedelegateParams = { + value: MsgBeginRedelegate, fee?: StdFee, memo?: string }; @@ -59,47 +59,47 @@ type sendMsgEditValidatorParams = { memo?: string }; -type sendMsgBeginRedelegateParams = { - value: MsgBeginRedelegate, +type sendMsgUndelegateParams = { + value: MsgUndelegate, fee?: StdFee, memo?: string }; -type sendMsgDelegateParams = { - value: MsgDelegate, +type sendMsgCancelUnbondingDelegationParams = { + value: MsgCancelUnbondingDelegation, fee?: StdFee, memo?: string }; -type sendMsgUndelegateParams = { - value: MsgUndelegate, +type sendMsgCreateValidatorParams = { + value: MsgCreateValidator, fee?: StdFee, memo?: string }; -type msgCancelUnbondingDelegationParams = { - value: MsgCancelUnbondingDelegation, +type msgDelegateParams = { + value: MsgDelegate, }; -type msgCreateValidatorParams = { - value: MsgCreateValidator, +type msgBeginRedelegateParams = { + value: MsgBeginRedelegate, }; type msgEditValidatorParams = { value: MsgEditValidator, }; -type msgBeginRedelegateParams = { - value: MsgBeginRedelegate, +type msgUndelegateParams = { + value: MsgUndelegate, }; -type msgDelegateParams = { - value: MsgDelegate, +type msgCancelUnbondingDelegationParams = { + value: MsgCancelUnbondingDelegation, }; -type msgUndelegateParams = { - value: MsgUndelegate, +type msgCreateValidatorParams = { + value: MsgCreateValidator, }; @@ -132,31 +132,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgCancelUnbondingDelegation({ value, fee, memo }: sendMsgCancelUnbondingDelegationParams): Promise { + async sendMsgDelegate({ value, fee, memo }: sendMsgDelegateParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) }) + let msg = this.msgDelegate({ value: MsgDelegate.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCreateValidator({ value, fee, memo }: sendMsgCreateValidatorParams): Promise { + async sendMsgBeginRedelegate({ value, fee, memo }: sendMsgBeginRedelegateParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) }) + let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: '+ e.message) } }, @@ -174,62 +174,62 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgBeginRedelegate({ value, fee, memo }: sendMsgBeginRedelegateParams): Promise { + async sendMsgUndelegate({ value, fee, memo }: sendMsgUndelegateParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgBeginRedelegate: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgBeginRedelegate({ value: MsgBeginRedelegate.fromPartial(value) }) + let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgBeginRedelegate: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: '+ e.message) } }, - async sendMsgDelegate({ value, fee, memo }: sendMsgDelegateParams): Promise { + async sendMsgCancelUnbondingDelegation({ value, fee, memo }: sendMsgCancelUnbondingDelegationParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgDelegate: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgDelegate({ value: MsgDelegate.fromPartial(value) }) + let msg = this.msgCancelUnbondingDelegation({ value: MsgCancelUnbondingDelegation.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgDelegate: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCancelUnbondingDelegation: Could not broadcast Tx: '+ e.message) } }, - async sendMsgUndelegate({ value, fee, memo }: sendMsgUndelegateParams): Promise { + async sendMsgCreateValidator({ value, fee, memo }: sendMsgCreateValidatorParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgUndelegate: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUndelegate({ value: MsgUndelegate.fromPartial(value) }) + let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgUndelegate: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: '+ e.message) } }, - msgCancelUnbondingDelegation({ value }: msgCancelUnbondingDelegationParams): EncodeObject { + msgDelegate({ value }: msgDelegateParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message) + throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message) } }, - msgCreateValidator({ value }: msgCreateValidatorParams): EncodeObject { + msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message) + throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message) } }, @@ -241,27 +241,27 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgBeginRedelegate({ value }: msgBeginRedelegateParams): EncodeObject { + msgUndelegate({ value }: msgUndelegateParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate", value: MsgBeginRedelegate.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgBeginRedelegate: Could not create message: ' + e.message) + throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message) } }, - msgDelegate({ value }: msgDelegateParams): EncodeObject { + msgCancelUnbondingDelegation({ value }: msgCancelUnbondingDelegationParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgDelegate", value: MsgDelegate.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", value: MsgCancelUnbondingDelegation.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgDelegate: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCancelUnbondingDelegation: Could not create message: ' + e.message) } }, - msgUndelegate({ value }: msgUndelegateParams): EncodeObject { + msgCreateValidator({ value }: msgCreateValidatorParams): EncodeObject { try { - return { typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate", value: MsgUndelegate.fromPartial( value ) } + return { typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator", value: MsgCreateValidator.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgUndelegate: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateValidator: Could not create message: ' + e.message) } }, diff --git a/blockchain/ts-client/cosmos.staking.v1beta1/registry.ts b/blockchain/ts-client/cosmos.staking.v1beta1/registry.ts index e283d6a..ab9a282 100755 --- a/blockchain/ts-client/cosmos.staking.v1beta1/registry.ts +++ b/blockchain/ts-client/cosmos.staking.v1beta1/registry.ts @@ -1,18 +1,18 @@ import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; -import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgCancelUnbondingDelegation } from "./types/cosmos/staking/v1beta1/tx"; +import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation], - ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], - ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], - ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], ["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate], + ["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate], + ["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator], ["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate], + ["/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", MsgCancelUnbondingDelegation], + ["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator], ]; diff --git a/blockchain/ts-client/cosmos.vesting.v1beta1/module.ts b/blockchain/ts-client/cosmos.vesting.v1beta1/module.ts index c685e67..78f4d03 100755 --- a/blockchain/ts-client/cosmos.vesting.v1beta1/module.ts +++ b/blockchain/ts-client/cosmos.vesting.v1beta1/module.ts @@ -7,9 +7,9 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; +import { MsgCreatePermanentLockedAccount } from "./types/cosmos/vesting/v1beta1/tx"; import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; import { MsgCreatePeriodicVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; -import { MsgCreatePermanentLockedAccount } from "./types/cosmos/vesting/v1beta1/tx"; import { BaseVestingAccount as typeBaseVestingAccount} from "./types" import { ContinuousVestingAccount as typeContinuousVestingAccount} from "./types" @@ -18,7 +18,13 @@ import { Period as typePeriod} from "./types" import { PeriodicVestingAccount as typePeriodicVestingAccount} from "./types" import { PermanentLockedAccount as typePermanentLockedAccount} from "./types" -export { MsgCreateVestingAccount, MsgCreatePeriodicVestingAccount, MsgCreatePermanentLockedAccount }; +export { MsgCreatePermanentLockedAccount, MsgCreateVestingAccount, MsgCreatePeriodicVestingAccount }; + +type sendMsgCreatePermanentLockedAccountParams = { + value: MsgCreatePermanentLockedAccount, + fee?: StdFee, + memo?: string +}; type sendMsgCreateVestingAccountParams = { value: MsgCreateVestingAccount, @@ -32,13 +38,11 @@ type sendMsgCreatePeriodicVestingAccountParams = { memo?: string }; -type sendMsgCreatePermanentLockedAccountParams = { + +type msgCreatePermanentLockedAccountParams = { value: MsgCreatePermanentLockedAccount, - fee?: StdFee, - memo?: string }; - type msgCreateVestingAccountParams = { value: MsgCreateVestingAccount, }; @@ -47,10 +51,6 @@ type msgCreatePeriodicVestingAccountParams = { value: MsgCreatePeriodicVestingAccount, }; -type msgCreatePermanentLockedAccountParams = { - value: MsgCreatePermanentLockedAccount, -}; - export const registry = new Registry(msgTypes); @@ -81,6 +81,20 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { + async sendMsgCreatePermanentLockedAccount({ value, fee, memo }: sendMsgCreatePermanentLockedAccountParams): Promise { + if (!signer) { + throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Unable to sign Tx. Signer is not present.') + } + try { + const { address } = (await signer.getAccounts())[0]; + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + let msg = this.msgCreatePermanentLockedAccount({ value: MsgCreatePermanentLockedAccount.fromPartial(value) }) + return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) + } catch (e: any) { + throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Could not broadcast Tx: '+ e.message) + } + }, + async sendMsgCreateVestingAccount({ value, fee, memo }: sendMsgCreateVestingAccountParams): Promise { if (!signer) { throw new Error('TxClient:sendMsgCreateVestingAccount: Unable to sign Tx. Signer is not present.') @@ -109,21 +123,15 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgCreatePermanentLockedAccount({ value, fee, memo }: sendMsgCreatePermanentLockedAccountParams): Promise { - if (!signer) { - throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Unable to sign Tx. Signer is not present.') - } - try { - const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreatePermanentLockedAccount({ value: MsgCreatePermanentLockedAccount.fromPartial(value) }) - return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) + + msgCreatePermanentLockedAccount({ value }: msgCreatePermanentLockedAccountParams): EncodeObject { + try { + return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:sendMsgCreatePermanentLockedAccount: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreatePermanentLockedAccount: Could not create message: ' + e.message) } }, - msgCreateVestingAccount({ value }: msgCreateVestingAccountParams): EncodeObject { try { return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: MsgCreateVestingAccount.fromPartial( value ) } @@ -140,14 +148,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgCreatePermanentLockedAccount({ value }: msgCreatePermanentLockedAccountParams): EncodeObject { - try { - return { typeUrl: "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", value: MsgCreatePermanentLockedAccount.fromPartial( value ) } - } catch (e: any) { - throw new Error('TxClient:MsgCreatePermanentLockedAccount: Could not create message: ' + e.message) - } - }, - } }; diff --git a/blockchain/ts-client/cosmos.vesting.v1beta1/registry.ts b/blockchain/ts-client/cosmos.vesting.v1beta1/registry.ts index ac871e5..7d452f8 100755 --- a/blockchain/ts-client/cosmos.vesting.v1beta1/registry.ts +++ b/blockchain/ts-client/cosmos.vesting.v1beta1/registry.ts @@ -1,12 +1,12 @@ import { GeneratedType } from "@cosmjs/proto-signing"; +import { MsgCreatePermanentLockedAccount } from "./types/cosmos/vesting/v1beta1/tx"; import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; import { MsgCreatePeriodicVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; -import { MsgCreatePermanentLockedAccount } from "./types/cosmos/vesting/v1beta1/tx"; const msgTypes: Array<[string, GeneratedType]> = [ + ["/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", MsgCreatePermanentLockedAccount], ["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], ["/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", MsgCreatePeriodicVestingAccount], - ["/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", MsgCreatePermanentLockedAccount], ]; diff --git a/blockchain/ts-client/env.ts b/blockchain/ts-client/env.ts index 92558e4..928eeae 100755 --- a/blockchain/ts-client/env.ts +++ b/blockchain/ts-client/env.ts @@ -1,5 +1,3 @@ -import { OfflineSigner } from "@cosmjs/proto-signing"; - export interface Env { apiURL: string rpcURL: string diff --git a/blockchain/ts-client/iconlake.drop/module.ts b/blockchain/ts-client/iconlake.drop/module.ts index d7484e0..26b3cc0 100755 --- a/blockchain/ts-client/iconlake.drop/module.ts +++ b/blockchain/ts-client/iconlake.drop/module.ts @@ -1,21 +1,26 @@ // Generated by Ignite ignite.com/cli import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate"; +import { SigningStargateClient, DeliverTxResponse, AminoTypes } from "@cosmjs/stargate"; import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing"; import { msgTypes } from './registry'; import { IgniteClient } from "../client" -import { MissingWalletError } from "../helpers" import { Api } from "./rest"; +import { createDropAminoConverters, MsgUpdateParams } from "./types/iconlake/drop/tx"; import { MsgInit } from "./types/iconlake/drop/tx"; import { MsgMint } from "./types/iconlake/drop/tx"; -import { MsgUpdateParams } from "./types/iconlake/drop/tx"; import { Info as typeInfo} from "./types" import { InfoRaw as typeInfoRaw} from "./types" import { Params as typeParams} from "./types" -export { MsgInit, MsgMint, MsgUpdateParams }; +export { MsgUpdateParams, MsgInit, MsgMint }; + +type sendMsgUpdateParamsParams = { + value: MsgUpdateParams, + fee?: StdFee, + memo?: string +}; type sendMsgInitParams = { value: MsgInit, @@ -29,13 +34,11 @@ type sendMsgMintParams = { memo?: string }; -type sendMsgUpdateParamsParams = { + +type msgUpdateParamsParams = { value: MsgUpdateParams, - fee?: StdFee, - memo?: string }; - type msgInitParams = { value: MsgInit, }; @@ -44,10 +47,6 @@ type msgMintParams = { value: MsgMint, }; -type msgUpdateParamsParams = { - value: MsgUpdateParams, -}; - export const registry = new Registry(msgTypes); @@ -74,17 +73,31 @@ interface TxClientOptions { signer?: OfflineSigner } -export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => { +export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "https://rpc.iconlake.com", prefix: "iconlake" }) => { return { + async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { + if (!signer) { + throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') + } + try { + const { address } = (await signer.getAccounts())[0]; + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix, aminoTypes: new AminoTypes(createDropAminoConverters())}); + let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) + return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) + } catch (e: any) { + throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) + } + }, + async sendMsgInit({ value, fee, memo }: sendMsgInitParams): Promise { if (!signer) { throw new Error('TxClient:sendMsgInit: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix, aminoTypes: new AminoTypes(createDropAminoConverters())}); let msg = this.msgInit({ value: MsgInit.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { @@ -98,7 +111,7 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } try { const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix, aminoTypes: new AminoTypes(createDropAminoConverters())}); let msg = this.msgMint({ value: MsgMint.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { @@ -106,21 +119,15 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgUpdateParams({ value, fee, memo }: sendMsgUpdateParamsParams): Promise { - if (!signer) { - throw new Error('TxClient:sendMsgUpdateParams: Unable to sign Tx. Signer is not present.') - } - try { - const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgUpdateParams({ value: MsgUpdateParams.fromPartial(value) }) - return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) + + msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject { + try { + return { typeUrl: "/iconlake.drop.MsgUpdateParams", value: MsgUpdateParams.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:sendMsgUpdateParams: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgUpdateParams: Could not create message: ' + e.message) } }, - msgInit({ value }: msgInitParams): EncodeObject { try { return { typeUrl: "/iconlake.drop.MsgInit", value: MsgInit.fromPartial( value ) } @@ -137,14 +144,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgUpdateParams({ value }: msgUpdateParamsParams): EncodeObject { - try { - return { typeUrl: "/iconlake.drop.MsgUpdateParams", value: MsgUpdateParams.fromPartial( value ) } - } catch (e: any) { - throw new Error('TxClient:MsgUpdateParams: Could not create message: ' + e.message) - } - }, - } }; @@ -152,7 +151,7 @@ interface QueryClientOptions { addr: string } -export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { +export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "https://lcd.iconlake.com" }) => { return new Api({ baseURL: addr }); }; @@ -180,7 +179,7 @@ class SDKModule { const methods = txClient({ signer: client.signer, addr: client.env.rpcURL, - prefix: client.env.prefix ?? "cosmos", + prefix: client.env.prefix ?? "iconlake", }) this.tx = methods; diff --git a/blockchain/ts-client/iconlake.drop/registry.ts b/blockchain/ts-client/iconlake.drop/registry.ts index b417fd5..7bfd52a 100755 --- a/blockchain/ts-client/iconlake.drop/registry.ts +++ b/blockchain/ts-client/iconlake.drop/registry.ts @@ -1,12 +1,12 @@ import { GeneratedType } from "@cosmjs/proto-signing"; +import { MsgUpdateParams } from "./types/iconlake/drop/tx"; import { MsgInit } from "./types/iconlake/drop/tx"; import { MsgMint } from "./types/iconlake/drop/tx"; -import { MsgUpdateParams } from "./types/iconlake/drop/tx"; const msgTypes: Array<[string, GeneratedType]> = [ + ["/iconlake.drop.MsgUpdateParams", MsgUpdateParams], ["/iconlake.drop.MsgInit", MsgInit], ["/iconlake.drop.MsgMint", MsgMint], - ["/iconlake.drop.MsgUpdateParams", MsgUpdateParams], ]; diff --git a/blockchain/ts-client/iconlake.drop/types/iconlake/drop/tx.ts b/blockchain/ts-client/iconlake.drop/types/iconlake/drop/tx.ts index 20cd784..4007a77 100644 --- a/blockchain/ts-client/iconlake.drop/types/iconlake/drop/tx.ts +++ b/blockchain/ts-client/iconlake.drop/types/iconlake/drop/tx.ts @@ -389,3 +389,87 @@ if (_m0.util.Long !== Long) { function isSet(value: any): boolean { return value !== null && value !== undefined; } + +export function createDropAminoConverters() { + return { + "/iconlake.drop.MsgMint": { + aminoType: "cosmos-sdk/Mint", + toAmino: ({ + creator, + amount + }: MsgMint): unknown => { + return { + creator, + amount: { + denom: amount.denom, + amount: amount.amount + } + }; + }, + fromAmino: ({ + creator, + amount + }: any): MsgMint => { + return MsgMint.fromPartial({ + creator, + amount: { + denom: amount.denom, + amount: amount.amount + } + }); + } + }, + + "/iconlake.drop.MsgInit": { + aminoType: "cosmos-sdk/Init", + toAmino: ({ + creator, + address + }: MsgInit): unknown => { + return { + creator, + address + }; + }, + fromAmino: ({ + creator, + address + }: any): MsgInit => { + return MsgInit.fromPartial({ + creator, + address + }); + } + }, + + "/iconlake.drop.MsgUpdateParams": { + aminoType: "cosmos-sdk/UpdateParams", + toAmino: ({ + authority, + params + }: MsgUpdateParams): unknown => { + return { + authority, + params: { + init_amount: params.initAmount, + min_amount_per_mint: params.minAmountPerMint, + max_amount_per_mint: params.maxAmountPerMint + } + }; + }, + fromAmino: ({ + authority, + params + }: any): MsgUpdateParams => { + return MsgUpdateParams.fromPartial({ + authority, + params: { + initAmount: params.init_amount, + minAmountPerMint: params.min_amount_per_mint, + maxAmountPerMint: params.max_amount_per_mint + } + }); + } + } + } +} diff --git a/blockchain/ts-client/iconlake.icon/module.ts b/blockchain/ts-client/iconlake.icon/module.ts index aa37e45..3b479e9 100755 --- a/blockchain/ts-client/iconlake.icon/module.ts +++ b/blockchain/ts-client/iconlake.icon/module.ts @@ -1,13 +1,12 @@ // Generated by Ignite ignite.com/cli import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate"; +import { SigningStargateClient, DeliverTxResponse, AminoTypes } from "@cosmjs/stargate"; import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing"; import { msgTypes } from './registry'; import { IgniteClient } from "../client" -import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgUpdateClass } from "./types/iconlake/icon/tx"; +import { createIconAminoConverters, MsgUpdateClass } from "./types/iconlake/icon/tx"; import { MsgBurn } from "./types/iconlake/icon/tx"; import { MsgMint } from "./types/iconlake/icon/tx"; @@ -80,7 +79,7 @@ interface TxClientOptions { signer?: OfflineSigner } -export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => { +export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "https://rpc.iconlake.com", prefix: "iconlake" }) => { return { @@ -90,7 +89,7 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } try { const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix, aminoTypes: new AminoTypes(createIconAminoConverters())}); let msg = this.msgUpdateClass({ value: MsgUpdateClass.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { @@ -104,7 +103,7 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } try { const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix, aminoTypes: new AminoTypes(createIconAminoConverters())}); let msg = this.msgBurn({ value: MsgBurn.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { @@ -118,7 +117,7 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } try { const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix, aminoTypes: new AminoTypes(createIconAminoConverters())}); let msg = this.msgMint({ value: MsgMint.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { @@ -158,7 +157,7 @@ interface QueryClientOptions { addr: string } -export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { +export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "https://lcd.iconlake.com" }) => { return new Api({ baseURL: addr }); }; @@ -192,7 +191,7 @@ class SDKModule { const methods = txClient({ signer: client.signer, addr: client.env.rpcURL, - prefix: client.env.prefix ?? "cosmos", + prefix: client.env.prefix ?? "iconlake", }) this.tx = methods; diff --git a/blockchain/ts-client/iconlake.icon/types/iconlake/icon/tx.ts b/blockchain/ts-client/iconlake.icon/types/iconlake/icon/tx.ts index ec41439..61d0eb4 100644 --- a/blockchain/ts-client/iconlake.icon/types/iconlake/icon/tx.ts +++ b/blockchain/ts-client/iconlake.icon/types/iconlake/icon/tx.ts @@ -12,7 +12,7 @@ export interface MsgMint { description: string; uri: string; uriHash: string; - supply: number; + supply: string; } export interface MsgMintResponse { @@ -41,7 +41,7 @@ export interface MsgBurnResponse { } function createBaseMsgMint(): MsgMint { - return { creator: "", classId: "", id: "", name: "", description: "", uri: "", uriHash: "", supply: 0 }; + return { creator: "", classId: "", id: "", name: "", description: "", uri: "", uriHash: "", supply: "" }; } export const MsgMint = { @@ -67,7 +67,7 @@ export const MsgMint = { if (message.uriHash !== "") { writer.uint32(58).string(message.uriHash); } - if (message.supply !== 0) { + if (message.supply !== "") { writer.uint32(64).uint64(message.supply); } return writer; @@ -102,7 +102,7 @@ export const MsgMint = { message.uriHash = reader.string(); break; case 8: - message.supply = longToNumber(reader.uint64() as Long); + message.supply = reader.uint64().toString(); break; default: reader.skipType(tag & 7); @@ -121,7 +121,7 @@ export const MsgMint = { description: isSet(object.description) ? String(object.description) : "", uri: isSet(object.uri) ? String(object.uri) : "", uriHash: isSet(object.uriHash) ? String(object.uriHash) : "", - supply: isSet(object.supply) ? Number(object.supply) : 0, + supply: isSet(object.supply) ? String(object.supply) : "", }; }, @@ -134,7 +134,7 @@ export const MsgMint = { message.description !== undefined && (obj.description = message.description); message.uri !== undefined && (obj.uri = message.uri); message.uriHash !== undefined && (obj.uriHash = message.uriHash); - message.supply !== undefined && (obj.supply = Math.round(message.supply)); + message.supply !== undefined && (obj.supply = message.supply); return obj; }, @@ -147,7 +147,7 @@ export const MsgMint = { message.description = object.description ?? ""; message.uri = object.uri ?? ""; message.uriHash = object.uriHash ?? ""; - message.supply = object.supply ?? 0; + message.supply = object.supply ?? ""; return message; }, }; @@ -522,3 +522,81 @@ if (_m0.util.Long !== Long) { function isSet(value: any): boolean { return value !== null && value !== undefined; } + +export function createIconAminoConverters() { + return { + '/iconlake.icon.MsgMint': { + aminoType: 'icon/Mint', + + fromAmino(object: any): MsgMint { + return MsgMint.fromPartial({ + creator: object.creator, + classId: object.class_id, + id: object.id, + name: object.name, + description: object.description, + uri: object.uri, + uriHash: object.uri_hash, + supply: object.supply, + }); + }, + + toAmino(message: MsgMint): unknown { + const obj: any = {}; + message.classId !== undefined && (obj.class_id = message.classId); + message.creator !== undefined && (obj.creator = message.creator); + message.description !== undefined && (obj.description = message.description); + message.id !== undefined && (obj.id = message.id); + message.name !== undefined && (obj.name = message.name); + message.supply !== undefined && (obj.supply = message.supply); + message.uri !== undefined && (obj.uri = message.uri); + message.uriHash !== undefined && (obj.uri_hash = message.uriHash); + return obj; + }, + }, + '/iconlake.icon.MsgBurn': { + aminoType: 'icon/Burn', + + fromAmino(object: any): MsgBurn { + return MsgBurn.fromPartial({ + creator: object.creator, + classId: object.class_id, + id: object.id, + }); + }, + + toAmino(message: MsgBurn): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.classId !== undefined && (obj.class_id = message.classId); + message.id !== undefined && (obj.id = message.id); + return obj; + }, + }, + '/iconlake.icon.MsgUpdateClass': { + aminoType: 'icon/UpdateClass', + + fromAmino(object: any): MsgUpdateClass { + return MsgUpdateClass.fromPartial({ + creator: object.creator, + id: object.id, + name: object.name, + description: object.description, + uri: object.uri, + uriHash: object.uri_hash, + }); + }, + + toAmino(message: MsgUpdateClass): unknown { + const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.id !== undefined && (obj.id = message.id); + message.name !== undefined && (obj.name = message.name); + message.description !== undefined && (obj.description = message.description); + message.uri !== undefined && (obj.uri = message.uri); + message.uriHash !== undefined && (obj.uri_hash = message.uriHash); + return obj; + }, + }, + } +} diff --git a/blockchain/ts-client/iconlake.iconlake/index.ts b/blockchain/ts-client/iconlake.iconlake/index.ts deleted file mode 100755 index c9dfa15..0000000 --- a/blockchain/ts-client/iconlake.iconlake/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Module from './module'; -import { txClient, queryClient, registry } from './module'; -import { msgTypes } from './registry'; - -export * from "./types"; -export { Module, msgTypes, txClient, queryClient, registry }; diff --git a/blockchain/ts-client/iconlake.iconlake/module.ts b/blockchain/ts-client/iconlake.iconlake/module.ts deleted file mode 100755 index 28aee7c..0000000 --- a/blockchain/ts-client/iconlake.iconlake/module.ts +++ /dev/null @@ -1,133 +0,0 @@ -// Generated by Ignite ignite.com/cli - -import { StdFee } from "@cosmjs/launchpad"; -import { SigningStargateClient, DeliverTxResponse } from "@cosmjs/stargate"; -import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing"; -import { msgTypes } from './registry'; -import { IgniteClient } from "../client" -import { MissingWalletError } from "../helpers" -import { Api } from "./rest"; -import { MsgMintDrop } from "./types/iconlake/iconlake/tx"; - -import { Account as typeAccount} from "./types" -import { Params as typeParams} from "./types" - -export { MsgMintDrop }; - -type sendMsgMintDropParams = { - value: MsgMintDrop, - fee?: StdFee, - memo?: string -}; - - -type msgMintDropParams = { - value: MsgMintDrop, -}; - - -export const registry = new Registry(msgTypes); - -type Field = { - name: string; - type: unknown; -} -function getStructure(template) { - const structure: {fields: Field[]} = { fields: [] } - for (let [key, value] of Object.entries(template)) { - let field = { name: key, type: typeof value } - structure.fields.push(field) - } - return structure -} -const defaultFee = { - amount: [], - gas: "200000", -}; - -interface TxClientOptions { - addr: string - prefix: string - signer?: OfflineSigner -} - -export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "http://localhost:26657", prefix: "cosmos" }) => { - - return { - - async sendMsgMintDrop({ value, fee, memo }: sendMsgMintDropParams): Promise { - if (!signer) { - throw new Error('TxClient:sendMsgMintDrop: Unable to sign Tx. Signer is not present.') - } - try { - const { address } = (await signer.getAccounts())[0]; - const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry}); - let msg = this.msgMintDrop({ value: MsgMintDrop.fromPartial(value) }) - return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) - } catch (e: any) { - throw new Error('TxClient:sendMsgMintDrop: Could not broadcast Tx: '+ e.message) - } - }, - - - msgMintDrop({ value }: msgMintDropParams): EncodeObject { - try { - return { typeUrl: "/iconlake.iconlake.MsgMintDrop", value: MsgMintDrop.fromPartial( value ) } - } catch (e: any) { - throw new Error('TxClient:MsgMintDrop: Could not create message: ' + e.message) - } - }, - - } -}; - -interface QueryClientOptions { - addr: string -} - -export const queryClient = ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { - return new Api({ baseURL: addr }); -}; - -class SDKModule { - public query: ReturnType; - public tx: ReturnType; - public structure: Record; - public registry: Array<[string, GeneratedType]> = []; - - constructor(client: IgniteClient) { - - this.query = queryClient({ addr: client.env.apiURL }); - this.updateTX(client); - this.structure = { - Account: getStructure(typeAccount.fromPartial({})), - Params: getStructure(typeParams.fromPartial({})), - - }; - client.on('signer-changed',(signer) => { - this.updateTX(client); - }) - } - updateTX(client: IgniteClient) { - const methods = txClient({ - signer: client.signer, - addr: client.env.rpcURL, - prefix: client.env.prefix ?? "cosmos", - }) - - this.tx = methods; - for (let m in methods) { - this.tx[m] = methods[m].bind(this.tx); - } - } -}; - -const Module = (test: IgniteClient) => { - return { - module: { - IconlakeIconlake: new SDKModule(test) - }, - registry: msgTypes - } -} -export default Module; \ No newline at end of file diff --git a/blockchain/ts-client/iconlake.iconlake/registry.ts b/blockchain/ts-client/iconlake.iconlake/registry.ts deleted file mode 100755 index ef4ac92..0000000 --- a/blockchain/ts-client/iconlake.iconlake/registry.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgMintDrop } from "./types/iconlake/iconlake/tx"; - -const msgTypes: Array<[string, GeneratedType]> = [ - ["/iconlake.iconlake.MsgMintDrop", MsgMintDrop], - -]; - -export { msgTypes } \ No newline at end of file diff --git a/blockchain/ts-client/iconlake.iconlake/rest.ts b/blockchain/ts-client/iconlake.iconlake/rest.ts deleted file mode 100644 index 9446023..0000000 --- a/blockchain/ts-client/iconlake.iconlake/rest.ts +++ /dev/null @@ -1,330 +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 IconlakeAccount { - address?: string; - - /** @format uint64 */ - lastMintDropTime?: string; -} - -export interface IconlakeMsgMintDropResponse { - lastMintDropTime?: string; -} - -/** - * Params defines the parameters for the module. - */ -export type IconlakeParams = object; - -export interface IconlakeQueryAllAccountResponse { - account?: IconlakeAccount[]; - - /** - * 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 IconlakeQueryGetAccountResponse { - account?: IconlakeAccount; -} - -/** - * QueryParamsResponse is response type for the Query/Params RPC method. - */ -export interface IconlakeQueryParamsResponse { - /** params holds all the parameters of this module. */ - params?: IconlakeParams; -} - -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; -} - -/** -* 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 { - /** - * next_key is the key to be passed to PageRequest.key to - * query the next page most efficiently. It will be empty if - * there are no more results. - * @format byte - */ - next_key?: string; - - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - * @format uint64 - */ - total?: string; -} - -import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios"; - -export type QueryParamsType = Record; - -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?: ResponseType; - /** request body */ - body?: unknown; -} - -export type RequestParams = Omit; - -export interface ApiConfig extends Omit { - securityWorker?: ( - securityData: SecurityDataType | null, - ) => Promise | AxiosRequestConfig | void; - secure?: boolean; - format?: ResponseType; -} - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", -} - -export class HttpClient { - public instance: AxiosInstance; - private securityData: SecurityDataType | null = null; - private securityWorker?: ApiConfig["securityWorker"]; - private secure?: boolean; - private format?: ResponseType; - - constructor({ securityWorker, secure, format, ...axiosConfig }: ApiConfig = {}) { - this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || "" }); - this.secure = secure; - this.format = format; - this.securityWorker = securityWorker; - } - - public setSecurityData = (data: SecurityDataType | null) => { - this.securityData = data; - }; - - private mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig { - return { - ...this.instance.defaults, - ...params1, - ...(params2 || {}), - headers: { - ...(this.instance.defaults.headers || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - private createFormData(input: Record): FormData { - return Object.keys(input || {}).reduce((formData, key) => { - const property = input[key]; - formData.append( - key, - property instanceof Blob - ? property - : typeof property === "object" && property !== null - ? JSON.stringify(property) - : `${property}`, - ); - return formData; - }, new FormData()); - } - - public request = async ({ - secure, - path, - type, - query, - format, - body, - ...params - }: FullRequestParams): Promise> => { - const secureParams = - ((typeof secure === "boolean" ? secure : this.secure) && - this.securityWorker && - (await this.securityWorker(this.securityData))) || - {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const responseFormat = (format && this.format) || void 0; - - if (type === ContentType.FormData && body && body !== null && typeof body === "object") { - requestParams.headers.common = { Accept: "*/*" }; - requestParams.headers.post = {}; - requestParams.headers.put = {}; - - body = this.createFormData(body as Record); - } - - return this.instance.request({ - ...requestParams, - headers: { - ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), - ...(requestParams.headers || {}), - }, - params: query, - responseType: responseFormat, - data: body, - url: path, - }); - }; -} - -/** - * @title iconlake/iconlake/account.proto - * @version version not set - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags Query - * @name QueryAccountAll - * @request GET:/iconlake/iconlake/account - */ - queryAccountAll = ( - query?: { - "pagination.key"?: string; - "pagination.offset"?: string; - "pagination.limit"?: string; - "pagination.count_total"?: boolean; - "pagination.reverse"?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/iconlake/iconlake/account`, - method: "GET", - query: query, - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryAccount - * @summary Queries a list of Account items. - * @request GET:/iconlake/iconlake/account/{address} - */ - queryAccount = (address: string, params: RequestParams = {}) => - this.request({ - path: `/iconlake/iconlake/account/${address}`, - method: "GET", - format: "json", - ...params, - }); - - /** - * No description - * - * @tags Query - * @name QueryParams - * @summary Parameters queries the parameters of the module. - * @request GET:/iconlake/iconlake/params - */ - queryParams = (params: RequestParams = {}) => - this.request({ - path: `/iconlake/iconlake/params`, - method: "GET", - format: "json", - ...params, - }); -} diff --git a/blockchain/ts-client/iconlake.iconlake/types.ts b/blockchain/ts-client/iconlake.iconlake/types.ts deleted file mode 100755 index a91e271..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Account } from "./types/iconlake/iconlake/account" -import { Params } from "./types/iconlake/iconlake/params" - - -export { - Account, - Params, - - } \ No newline at end of file diff --git a/blockchain/ts-client/iconlake.iconlake/types/amino/amino.ts b/blockchain/ts-client/iconlake.iconlake/types/amino/amino.ts deleted file mode 100644 index 4b67dcf..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/amino/amino.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "amino"; diff --git a/blockchain/ts-client/iconlake.iconlake/types/cosmos/base/query/v1beta1/pagination.ts b/blockchain/ts-client/iconlake.iconlake/types/cosmos/base/query/v1beta1/pagination.ts deleted file mode 100644 index a31ca24..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/cosmos/base/query/v1beta1/pagination.ts +++ /dev/null @@ -1,286 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 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. It will be empty if - * there are no more results. - */ - nextKey: Uint8Array; - /** - * total is total number of results available if PageRequest.count_total - * was set, its value is undefined otherwise - */ - total: number; -} - -function createBasePageRequest(): PageRequest { - return { key: new Uint8Array(), offset: 0, limit: 0, countTotal: false, reverse: false }; -} - -export const PageRequest = { - encode(message: PageRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): PageRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePageRequest(); - 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 { - return { - key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(), - offset: isSet(object.offset) ? Number(object.offset) : 0, - limit: isSet(object.limit) ? Number(object.limit) : 0, - countTotal: isSet(object.countTotal) ? Boolean(object.countTotal) : false, - reverse: isSet(object.reverse) ? Boolean(object.reverse) : false, - }; - }, - - 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 = Math.round(message.offset)); - message.limit !== undefined && (obj.limit = Math.round(message.limit)); - message.countTotal !== undefined && (obj.countTotal = message.countTotal); - message.reverse !== undefined && (obj.reverse = message.reverse); - return obj; - }, - - fromPartial, I>>(object: I): PageRequest { - const message = createBasePageRequest(); - message.key = object.key ?? new Uint8Array(); - message.offset = object.offset ?? 0; - message.limit = object.limit ?? 0; - message.countTotal = object.countTotal ?? false; - message.reverse = object.reverse ?? false; - return message; - }, -}; - -function createBasePageResponse(): PageResponse { - return { nextKey: new Uint8Array(), total: 0 }; -} - -export const PageResponse = { - encode(message: PageResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): PageResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePageResponse(); - 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 { - return { - nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(), - total: isSet(object.total) ? Number(object.total) : 0, - }; - }, - - 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 = Math.round(message.total)); - return obj; - }, - - fromPartial, I>>(object: I): PageResponse { - const message = createBasePageResponse(); - message.nextKey = object.nextKey ?? new Uint8Array(); - message.total = object.total ?? 0; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -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 (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/iconlake.iconlake/types/cosmos/base/v1beta1/coin.ts b/blockchain/ts-client/iconlake.iconlake/types/cosmos/base/v1beta1/coin.ts deleted file mode 100644 index b28eec0..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/cosmos/base/v1beta1/coin.ts +++ /dev/null @@ -1,261 +0,0 @@ -/* eslint-disable */ -import _m0 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; -} - -function createBaseCoin(): Coin { - return { denom: "", amount: "" }; -} - -export const Coin = { - encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Coin { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCoin(); - 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 { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - amount: isSet(object.amount) ? String(object.amount) : "", - }; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial, I>>(object: I): Coin { - const message = createBaseCoin(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; - return message; - }, -}; - -function createBaseDecCoin(): DecCoin { - return { denom: "", amount: "" }; -} - -export const DecCoin = { - encode(message: DecCoin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.denom !== "") { - writer.uint32(10).string(message.denom); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DecCoin { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecCoin(); - 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 { - return { - denom: isSet(object.denom) ? String(object.denom) : "", - amount: isSet(object.amount) ? String(object.amount) : "", - }; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - message.denom !== undefined && (obj.denom = message.denom); - message.amount !== undefined && (obj.amount = message.amount); - return obj; - }, - - fromPartial, I>>(object: I): DecCoin { - const message = createBaseDecCoin(); - message.denom = object.denom ?? ""; - message.amount = object.amount ?? ""; - return message; - }, -}; - -function createBaseIntProto(): IntProto { - return { int: "" }; -} - -export const IntProto = { - encode(message: IntProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.int !== "") { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): IntProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIntProto(); - 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 { - return { int: isSet(object.int) ? String(object.int) : "" }; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - message.int !== undefined && (obj.int = message.int); - return obj; - }, - - fromPartial, I>>(object: I): IntProto { - const message = createBaseIntProto(); - message.int = object.int ?? ""; - return message; - }, -}; - -function createBaseDecProto(): DecProto { - return { dec: "" }; -} - -export const DecProto = { - encode(message: DecProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.dec !== "") { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DecProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecProto(); - 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 { - return { dec: isSet(object.dec) ? String(object.dec) : "" }; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - message.dec !== undefined && (obj.dec = message.dec); - return obj; - }, - - fromPartial, I>>(object: I): DecProto { - const message = createBaseDecProto(); - message.dec = object.dec ?? ""; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/iconlake.iconlake/types/cosmos_proto/cosmos.ts b/blockchain/ts-client/iconlake.iconlake/types/cosmos_proto/cosmos.ts deleted file mode 100644 index 79c8d34..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/cosmos_proto/cosmos.ts +++ /dev/null @@ -1,247 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; - -export const protobufPackage = "cosmos_proto"; - -export enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0, - SCALAR_TYPE_STRING = 1, - SCALAR_TYPE_BYTES = 2, - UNRECOGNIZED = -1, -} - -export function scalarTypeFromJSON(object: any): ScalarType { - switch (object) { - case 0: - case "SCALAR_TYPE_UNSPECIFIED": - return ScalarType.SCALAR_TYPE_UNSPECIFIED; - case 1: - case "SCALAR_TYPE_STRING": - return ScalarType.SCALAR_TYPE_STRING; - case 2: - case "SCALAR_TYPE_BYTES": - return ScalarType.SCALAR_TYPE_BYTES; - case -1: - case "UNRECOGNIZED": - default: - return ScalarType.UNRECOGNIZED; - } -} - -export function scalarTypeToJSON(object: ScalarType): string { - switch (object) { - case ScalarType.SCALAR_TYPE_UNSPECIFIED: - return "SCALAR_TYPE_UNSPECIFIED"; - case ScalarType.SCALAR_TYPE_STRING: - return "SCALAR_TYPE_STRING"; - case ScalarType.SCALAR_TYPE_BYTES: - return "SCALAR_TYPE_BYTES"; - case ScalarType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** - * InterfaceDescriptor describes an interface type to be used with - * accepts_interface and implements_interface and declared by declare_interface. - */ -export interface InterfaceDescriptor { - /** - * name is the name of the interface. It should be a short-name (without - * a period) such that the fully qualified name of the interface will be - * package.name, ex. for the package a.b and interface named C, the - * fully-qualified name will be a.b.C. - */ - name: string; - /** - * description is a human-readable description of the interface and its - * purpose. - */ - description: string; -} - -/** - * ScalarDescriptor describes an scalar type to be used with - * the scalar field option and declared by declare_scalar. - * Scalars extend simple protobuf built-in types with additional - * syntax and semantics, for instance to represent big integers. - * Scalars should ideally define an encoding such that there is only one - * valid syntactical representation for a given semantic meaning, - * i.e. the encoding should be deterministic. - */ -export interface ScalarDescriptor { - /** - * name is the name of the scalar. It should be a short-name (without - * a period) such that the fully qualified name of the scalar will be - * package.name, ex. for the package a.b and scalar named C, the - * fully-qualified name will be a.b.C. - */ - name: string; - /** - * description is a human-readable description of the scalar and its - * encoding format. For instance a big integer or decimal scalar should - * specify precisely the expected encoding format. - */ - description: string; - /** - * field_type is the type of field with which this scalar can be used. - * Scalars can be used with one and only one type of field so that - * encoding standards and simple and clear. Currently only string and - * bytes fields are supported for scalars. - */ - fieldType: ScalarType[]; -} - -function createBaseInterfaceDescriptor(): InterfaceDescriptor { - return { name: "", description: "" }; -} - -export const InterfaceDescriptor = { - encode(message: InterfaceDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): InterfaceDescriptor { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInterfaceDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): InterfaceDescriptor { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : "", - }; - }, - - toJSON(message: InterfaceDescriptor): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - return obj; - }, - - fromPartial, I>>(object: I): InterfaceDescriptor { - const message = createBaseInterfaceDescriptor(); - message.name = object.name ?? ""; - message.description = object.description ?? ""; - return message; - }, -}; - -function createBaseScalarDescriptor(): ScalarDescriptor { - return { name: "", description: "", fieldType: [] }; -} - -export const ScalarDescriptor = { - encode(message: ScalarDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.description !== "") { - writer.uint32(18).string(message.description); - } - writer.uint32(26).fork(); - for (const v of message.fieldType) { - writer.int32(v); - } - writer.ldelim(); - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ScalarDescriptor { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScalarDescriptor(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = 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.fieldType.push(reader.int32() as any); - } - } else { - message.fieldType.push(reader.int32() as any); - } - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): ScalarDescriptor { - return { - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : "", - fieldType: Array.isArray(object?.fieldType) ? object.fieldType.map((e: any) => scalarTypeFromJSON(e)) : [], - }; - }, - - toJSON(message: ScalarDescriptor): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - if (message.fieldType) { - obj.fieldType = message.fieldType.map((e) => scalarTypeToJSON(e)); - } else { - obj.fieldType = []; - } - return obj; - }, - - fromPartial, I>>(object: I): ScalarDescriptor { - const message = createBaseScalarDescriptor(); - message.name = object.name ?? ""; - message.description = object.description ?? ""; - message.fieldType = object.fieldType?.map((e) => e) || []; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/iconlake.iconlake/types/gogoproto/gogo.ts b/blockchain/ts-client/iconlake.iconlake/types/gogoproto/gogo.ts deleted file mode 100644 index 3f41a04..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/gogoproto/gogo.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "gogoproto"; diff --git a/blockchain/ts-client/iconlake.iconlake/types/google/api/annotations.ts b/blockchain/ts-client/iconlake.iconlake/types/google/api/annotations.ts deleted file mode 100644 index aace478..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/google/api/annotations.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -export const protobufPackage = "google.api"; diff --git a/blockchain/ts-client/iconlake.iconlake/types/google/api/http.ts b/blockchain/ts-client/iconlake.iconlake/types/google/api/http.ts deleted file mode 100644 index 17e770d..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/google/api/http.ts +++ /dev/null @@ -1,589 +0,0 @@ -/* eslint-disable */ -import _m0 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; -} - -function createBaseHttp(): Http { - return { rules: [], fullyDecodeReservedExpansion: false }; -} - -export const Http = { - encode(message: Http, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): Http { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHttp(); - 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 { - return { - rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromJSON(e)) : [], - fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion) - ? Boolean(object.fullyDecodeReservedExpansion) - : false, - }; - }, - - 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, I>>(object: I): Http { - const message = createBaseHttp(); - message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || []; - message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false; - return message; - }, -}; - -function createBaseHttpRule(): HttpRule { - return { - selector: "", - get: undefined, - put: undefined, - post: undefined, - delete: undefined, - patch: undefined, - custom: undefined, - body: "", - responseBody: "", - additionalBindings: [], - }; -} - -export const HttpRule = { - encode(message: HttpRule, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): HttpRule { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHttpRule(); - 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 { - return { - selector: isSet(object.selector) ? String(object.selector) : "", - get: isSet(object.get) ? String(object.get) : undefined, - put: isSet(object.put) ? String(object.put) : undefined, - post: isSet(object.post) ? String(object.post) : undefined, - delete: isSet(object.delete) ? String(object.delete) : undefined, - patch: isSet(object.patch) ? String(object.patch) : undefined, - custom: isSet(object.custom) ? CustomHttpPattern.fromJSON(object.custom) : undefined, - body: isSet(object.body) ? String(object.body) : "", - responseBody: isSet(object.responseBody) ? String(object.responseBody) : "", - additionalBindings: Array.isArray(object?.additionalBindings) - ? object.additionalBindings.map((e: any) => HttpRule.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): HttpRule { - const message = createBaseHttpRule(); - message.selector = object.selector ?? ""; - message.get = object.get ?? undefined; - message.put = object.put ?? undefined; - message.post = object.post ?? undefined; - message.delete = object.delete ?? undefined; - message.patch = object.patch ?? undefined; - message.custom = (object.custom !== undefined && object.custom !== null) - ? CustomHttpPattern.fromPartial(object.custom) - : undefined; - message.body = object.body ?? ""; - message.responseBody = object.responseBody ?? ""; - message.additionalBindings = object.additionalBindings?.map((e) => HttpRule.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCustomHttpPattern(): CustomHttpPattern { - return { kind: "", path: "" }; -} - -export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.kind !== "") { - writer.uint32(10).string(message.kind); - } - if (message.path !== "") { - writer.uint32(18).string(message.path); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCustomHttpPattern(); - 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 { - return { kind: isSet(object.kind) ? String(object.kind) : "", path: isSet(object.path) ? String(object.path) : "" }; - }, - - toJSON(message: CustomHttpPattern): unknown { - const obj: any = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.path !== undefined && (obj.path = message.path); - return obj; - }, - - fromPartial, I>>(object: I): CustomHttpPattern { - const message = createBaseCustomHttpPattern(); - message.kind = object.kind ?? ""; - message.path = object.path ?? ""; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/iconlake.iconlake/types/google/protobuf/descriptor.ts b/blockchain/ts-client/iconlake.iconlake/types/google/protobuf/descriptor.ts deleted file mode 100644 index 8fb7bb2..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/google/protobuf/descriptor.ts +++ /dev/null @@ -1,3753 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 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"; - case FieldDescriptorProto_Type.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -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"; - case FieldDescriptorProto_Label.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** 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"; - case FileOptions_OptimizeMode.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -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"; - case FieldOptions_CType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -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"; - case FieldOptions_JSType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -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"; - case MethodOptions_IdempotencyLevel.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** - * 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; -} - -function createBaseFileDescriptorSet(): FileDescriptorSet { - return { file: [] }; -} - -export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.file) { - FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileDescriptorSet(); - 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 { - return { file: Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [] }; - }, - - 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, I>>(object: I): FileDescriptorSet { - const message = createBaseFileDescriptorSet(); - message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseFileDescriptorProto(): FileDescriptorProto { - return { - name: "", - package: "", - dependency: [], - publicDependency: [], - weakDependency: [], - messageType: [], - enumType: [], - service: [], - extension: [], - options: undefined, - sourceCodeInfo: undefined, - syntax: "", - }; -} - -export const FileDescriptorProto = { - encode(message: FileDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileDescriptorProto(); - 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 { - return { - name: isSet(object.name) ? String(object.name) : "", - package: isSet(object.package) ? String(object.package) : "", - dependency: Array.isArray(object?.dependency) ? object.dependency.map((e: any) => String(e)) : [], - publicDependency: Array.isArray(object?.publicDependency) - ? object.publicDependency.map((e: any) => Number(e)) - : [], - weakDependency: Array.isArray(object?.weakDependency) ? object.weakDependency.map((e: any) => Number(e)) : [], - messageType: Array.isArray(object?.messageType) - ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], - service: Array.isArray(object?.service) ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e)) : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined, - sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined, - syntax: isSet(object.syntax) ? String(object.syntax) : "", - }; - }, - - 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) => Math.round(e)); - } else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => Math.round(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, I>>(object: I): FileDescriptorProto { - const message = createBaseFileDescriptorProto(); - message.name = object.name ?? ""; - message.package = object.package ?? ""; - message.dependency = object.dependency?.map((e) => e) || []; - message.publicDependency = object.publicDependency?.map((e) => e) || []; - message.weakDependency = object.weakDependency?.map((e) => e) || []; - message.messageType = object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || []; - message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; - message.service = object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || []; - message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.options = (object.options !== undefined && object.options !== null) - ? FileOptions.fromPartial(object.options) - : undefined; - message.sourceCodeInfo = (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) - ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) - : undefined; - message.syntax = object.syntax ?? ""; - return message; - }, -}; - -function createBaseDescriptorProto(): DescriptorProto { - return { - name: "", - field: [], - extension: [], - nestedType: [], - enumType: [], - extensionRange: [], - oneofDecl: [], - options: undefined, - reservedRange: [], - reservedName: [], - }; -} - -export const DescriptorProto = { - encode(message: DescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): DescriptorProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto(); - 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 { - return { - name: isSet(object.name) ? String(object.name) : "", - field: Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - nestedType: Array.isArray(object?.nestedType) - ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], - extensionRange: Array.isArray(object?.extensionRange) - ? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e)) - : [], - oneofDecl: Array.isArray(object?.oneofDecl) - ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e)) - : [], - reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [], - }; - }, - - 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, I>>(object: I): DescriptorProto { - const message = createBaseDescriptorProto(); - message.name = object.name ?? ""; - message.field = object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.nestedType = object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || []; - message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; - message.extensionRange = object.extensionRange?.map((e) => DescriptorProto_ExtensionRange.fromPartial(e)) || []; - message.oneofDecl = object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || []; - message.options = (object.options !== undefined && object.options !== null) - ? MessageOptions.fromPartial(object.options) - : undefined; - message.reservedRange = object.reservedRange?.map((e) => DescriptorProto_ReservedRange.fromPartial(e)) || []; - message.reservedName = object.reservedName?.map((e) => e) || []; - return message; - }, -}; - -function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { - return { start: 0, end: 0, options: undefined }; -} - -export const DescriptorProto_ExtensionRange = { - encode(message: DescriptorProto_ExtensionRange, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto_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 { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined, - }; - }, - - toJSON(message: DescriptorProto_ExtensionRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - message.options !== undefined - && (obj.options = message.options ? ExtensionRangeOptions.toJSON(message.options) : undefined); - return obj; - }, - - fromPartial, I>>( - object: I, - ): DescriptorProto_ExtensionRange { - const message = createBaseDescriptorProto_ExtensionRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - message.options = (object.options !== undefined && object.options !== null) - ? ExtensionRangeOptions.fromPartial(object.options) - : undefined; - return message; - }, -}; - -function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { - return { start: 0, end: 0 }; -} - -export const DescriptorProto_ReservedRange = { - encode(message: DescriptorProto_ReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto_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 { - return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 }; - }, - - toJSON(message: DescriptorProto_ReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, - - fromPartial, I>>( - object: I, - ): DescriptorProto_ReservedRange { - const message = createBaseDescriptorProto_ReservedRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - return message; - }, -}; - -function createBaseExtensionRangeOptions(): ExtensionRangeOptions { - return { uninterpretedOption: [] }; -} - -export const ExtensionRangeOptions = { - encode(message: ExtensionRangeOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExtensionRangeOptions(); - 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 { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): ExtensionRangeOptions { - const message = createBaseExtensionRangeOptions(); - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseFieldDescriptorProto(): FieldDescriptorProto { - return { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - options: undefined, - proto3Optional: false, - }; -} - -export const FieldDescriptorProto = { - encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): FieldDescriptorProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldDescriptorProto(); - 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 { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1, - type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1, - typeName: isSet(object.typeName) ? String(object.typeName) : "", - extendee: isSet(object.extendee) ? String(object.extendee) : "", - defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "", - oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0, - jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", - options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined, - proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false, - }; - }, - - toJSON(message: FieldDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(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 = Math.round(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, I>>(object: I): FieldDescriptorProto { - const message = createBaseFieldDescriptorProto(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.label = object.label ?? 1; - message.type = object.type ?? 1; - message.typeName = object.typeName ?? ""; - message.extendee = object.extendee ?? ""; - message.defaultValue = object.defaultValue ?? ""; - message.oneofIndex = object.oneofIndex ?? 0; - message.jsonName = object.jsonName ?? ""; - message.options = (object.options !== undefined && object.options !== null) - ? FieldOptions.fromPartial(object.options) - : undefined; - message.proto3Optional = object.proto3Optional ?? false; - return message; - }, -}; - -function createBaseOneofDescriptorProto(): OneofDescriptorProto { - return { name: "", options: undefined }; -} - -export const OneofDescriptorProto = { - encode(message: OneofDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): OneofDescriptorProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofDescriptorProto(); - 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 { - return { - name: isSet(object.name) ? String(object.name) : "", - options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined, - }; - }, - - 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, I>>(object: I): OneofDescriptorProto { - const message = createBaseOneofDescriptorProto(); - message.name = object.name ?? ""; - message.options = (object.options !== undefined && object.options !== null) - ? OneofOptions.fromPartial(object.options) - : undefined; - return message; - }, -}; - -function createBaseEnumDescriptorProto(): EnumDescriptorProto { - return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] }; -} - -export const EnumDescriptorProto = { - encode(message: EnumDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumDescriptorProto(); - 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 { - return { - name: isSet(object.name) ? String(object.name) : "", - value: Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e)) - : [], - reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [], - }; - }, - - 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, I>>(object: I): EnumDescriptorProto { - const message = createBaseEnumDescriptorProto(); - message.name = object.name ?? ""; - message.value = object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || []; - message.options = (object.options !== undefined && object.options !== null) - ? EnumOptions.fromPartial(object.options) - : undefined; - message.reservedRange = object.reservedRange?.map((e) => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) - || []; - message.reservedName = object.reservedName?.map((e) => e) || []; - return message; - }, -}; - -function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { - return { start: 0, end: 0 }; -} - -export const EnumDescriptorProto_EnumReservedRange = { - encode(message: EnumDescriptorProto_EnumReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumDescriptorProto_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 { - return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 }; - }, - - toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { - const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, - - fromPartial, I>>( - object: I, - ): EnumDescriptorProto_EnumReservedRange { - const message = createBaseEnumDescriptorProto_EnumReservedRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - return message; - }, -}; - -function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { - return { name: "", number: 0, options: undefined }; -} - -export const EnumValueDescriptorProto = { - encode(message: EnumValueDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): EnumValueDescriptorProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumValueDescriptorProto(); - 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 { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined, - }; - }, - - toJSON(message: EnumValueDescriptorProto): unknown { - const obj: any = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.options !== undefined - && (obj.options = message.options ? EnumValueOptions.toJSON(message.options) : undefined); - return obj; - }, - - fromPartial, I>>(object: I): EnumValueDescriptorProto { - const message = createBaseEnumValueDescriptorProto(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.options = (object.options !== undefined && object.options !== null) - ? EnumValueOptions.fromPartial(object.options) - : undefined; - return message; - }, -}; - -function createBaseServiceDescriptorProto(): ServiceDescriptorProto { - return { name: "", method: [], options: undefined }; -} - -export const ServiceDescriptorProto = { - encode(message: ServiceDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): ServiceDescriptorProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseServiceDescriptorProto(); - 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 { - return { - name: isSet(object.name) ? String(object.name) : "", - method: Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined, - }; - }, - - 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, I>>(object: I): ServiceDescriptorProto { - const message = createBaseServiceDescriptorProto(); - message.name = object.name ?? ""; - message.method = object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || []; - message.options = (object.options !== undefined && object.options !== null) - ? ServiceOptions.fromPartial(object.options) - : undefined; - return message; - }, -}; - -function createBaseMethodDescriptorProto(): MethodDescriptorProto { - return { - name: "", - inputType: "", - outputType: "", - options: undefined, - clientStreaming: false, - serverStreaming: false, - }; -} - -export const MethodDescriptorProto = { - encode(message: MethodDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): MethodDescriptorProto { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMethodDescriptorProto(); - 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 { - return { - name: isSet(object.name) ? String(object.name) : "", - inputType: isSet(object.inputType) ? String(object.inputType) : "", - outputType: isSet(object.outputType) ? String(object.outputType) : "", - options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined, - clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false, - serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false, - }; - }, - - 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, I>>(object: I): MethodDescriptorProto { - const message = createBaseMethodDescriptorProto(); - message.name = object.name ?? ""; - message.inputType = object.inputType ?? ""; - message.outputType = object.outputType ?? ""; - message.options = (object.options !== undefined && object.options !== null) - ? MethodOptions.fromPartial(object.options) - : undefined; - message.clientStreaming = object.clientStreaming ?? false; - message.serverStreaming = object.serverStreaming ?? false; - return message; - }, -}; - -function createBaseFileOptions(): FileOptions { - return { - 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: "", - uninterpretedOption: [], - }; -} - -export const FileOptions = { - encode(message: FileOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): FileOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileOptions(); - 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 { - return { - javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "", - javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "", - javaMultipleFiles: isSet(object.javaMultipleFiles) ? Boolean(object.javaMultipleFiles) : false, - javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) - ? Boolean(object.javaGenerateEqualsAndHash) - : false, - javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false, - optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1, - goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", - ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false, - javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false, - pyGenericServices: isSet(object.pyGenericServices) ? Boolean(object.pyGenericServices) : false, - phpGenericServices: isSet(object.phpGenericServices) ? Boolean(object.phpGenericServices) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false, - objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "", - csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "", - swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "", - phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "", - phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "", - phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? String(object.phpMetadataNamespace) : "", - rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "", - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): FileOptions { - const message = createBaseFileOptions(); - message.javaPackage = object.javaPackage ?? ""; - message.javaOuterClassname = object.javaOuterClassname ?? ""; - message.javaMultipleFiles = object.javaMultipleFiles ?? false; - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; - message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; - message.optimizeFor = object.optimizeFor ?? 1; - message.goPackage = object.goPackage ?? ""; - message.ccGenericServices = object.ccGenericServices ?? false; - message.javaGenericServices = object.javaGenericServices ?? false; - message.pyGenericServices = object.pyGenericServices ?? false; - message.phpGenericServices = object.phpGenericServices ?? false; - message.deprecated = object.deprecated ?? false; - message.ccEnableArenas = object.ccEnableArenas ?? false; - message.objcClassPrefix = object.objcClassPrefix ?? ""; - message.csharpNamespace = object.csharpNamespace ?? ""; - message.swiftPrefix = object.swiftPrefix ?? ""; - message.phpClassPrefix = object.phpClassPrefix ?? ""; - message.phpNamespace = object.phpNamespace ?? ""; - message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; - message.rubyPackage = object.rubyPackage ?? ""; - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseMessageOptions(): MessageOptions { - return { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, - uninterpretedOption: [], - }; -} - -export const MessageOptions = { - encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): MessageOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMessageOptions(); - 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 { - return { - messageSetWireFormat: isSet(object.messageSetWireFormat) ? Boolean(object.messageSetWireFormat) : false, - noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) - ? Boolean(object.noStandardDescriptorAccessor) - : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): MessageOptions { - const message = createBaseMessageOptions(); - message.messageSetWireFormat = object.messageSetWireFormat ?? false; - message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false; - message.deprecated = object.deprecated ?? false; - message.mapEntry = object.mapEntry ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseFieldOptions(): FieldOptions { - return { ctype: 0, packed: false, jstype: 0, lazy: false, deprecated: false, weak: false, uninterpretedOption: [] }; -} - -export const FieldOptions = { - encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): FieldOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldOptions(); - 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 { - return { - ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0, - packed: isSet(object.packed) ? Boolean(object.packed) : false, - jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0, - lazy: isSet(object.lazy) ? Boolean(object.lazy) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - weak: isSet(object.weak) ? Boolean(object.weak) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): FieldOptions { - const message = createBaseFieldOptions(); - message.ctype = object.ctype ?? 0; - message.packed = object.packed ?? false; - message.jstype = object.jstype ?? 0; - message.lazy = object.lazy ?? false; - message.deprecated = object.deprecated ?? false; - message.weak = object.weak ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseOneofOptions(): OneofOptions { - return { uninterpretedOption: [] }; -} - -export const OneofOptions = { - encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.uninterpretedOption) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofOptions(); - 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 { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): OneofOptions { - const message = createBaseOneofOptions(); - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseEnumOptions(): EnumOptions { - return { allowAlias: false, deprecated: false, uninterpretedOption: [] }; -} - -export const EnumOptions = { - encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumOptions(); - 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 { - return { - allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): EnumOptions { - const message = createBaseEnumOptions(); - message.allowAlias = object.allowAlias ?? false; - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseEnumValueOptions(): EnumValueOptions { - return { deprecated: false, uninterpretedOption: [] }; -} - -export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumValueOptions(); - 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 { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): EnumValueOptions { - const message = createBaseEnumValueOptions(); - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseServiceOptions(): ServiceOptions { - return { deprecated: false, uninterpretedOption: [] }; -} - -export const ServiceOptions = { - encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): ServiceOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseServiceOptions(); - 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 { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): ServiceOptions { - const message = createBaseServiceOptions(); - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseMethodOptions(): MethodOptions { - return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; -} - -export const MethodOptions = { - encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): MethodOptions { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMethodOptions(); - 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 { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - idempotencyLevel: isSet(object.idempotencyLevel) - ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) - : 0, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): MethodOptions { - const message = createBaseMethodOptions(); - message.deprecated = object.deprecated ?? false; - message.idempotencyLevel = object.idempotencyLevel ?? 0; - message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseUninterpretedOption(): UninterpretedOption { - return { - name: [], - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - stringValue: new Uint8Array(), - aggregateValue: "", - }; -} - -export const UninterpretedOption = { - encode(message: UninterpretedOption, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUninterpretedOption(); - 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 { - return { - name: Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [], - identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", - positiveIntValue: isSet(object.positiveIntValue) ? Number(object.positiveIntValue) : 0, - negativeIntValue: isSet(object.negativeIntValue) ? Number(object.negativeIntValue) : 0, - doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, - stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(), - aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "", - }; - }, - - 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 = Math.round(message.positiveIntValue)); - message.negativeIntValue !== undefined && (obj.negativeIntValue = Math.round(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, I>>(object: I): UninterpretedOption { - const message = createBaseUninterpretedOption(); - message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || []; - message.identifierValue = object.identifierValue ?? ""; - message.positiveIntValue = object.positiveIntValue ?? 0; - message.negativeIntValue = object.negativeIntValue ?? 0; - message.doubleValue = object.doubleValue ?? 0; - message.stringValue = object.stringValue ?? new Uint8Array(); - message.aggregateValue = object.aggregateValue ?? ""; - return message; - }, -}; - -function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { - return { namePart: "", isExtension: false }; -} - -export const UninterpretedOption_NamePart = { - encode(message: UninterpretedOption_NamePart, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.namePart !== "") { - writer.uint32(10).string(message.namePart); - } - if (message.isExtension === true) { - writer.uint32(16).bool(message.isExtension); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption_NamePart { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUninterpretedOption_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 { - return { - namePart: isSet(object.namePart) ? String(object.namePart) : "", - isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false, - }; - }, - - 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, I>>(object: I): UninterpretedOption_NamePart { - const message = createBaseUninterpretedOption_NamePart(); - message.namePart = object.namePart ?? ""; - message.isExtension = object.isExtension ?? false; - return message; - }, -}; - -function createBaseSourceCodeInfo(): SourceCodeInfo { - return { location: [] }; -} - -export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.location) { - SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSourceCodeInfo(); - 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 { - return { - location: Array.isArray(object?.location) - ? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): SourceCodeInfo { - const message = createBaseSourceCodeInfo(); - message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { - return { path: [], span: [], leadingComments: "", trailingComments: "", leadingDetachedComments: [] }; -} - -export const SourceCodeInfo_Location = { - encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo_Location { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSourceCodeInfo_Location(); - 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 { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], - span: Array.isArray(object?.span) ? object.span.map((e: any) => Number(e)) : [], - leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "", - trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "", - leadingDetachedComments: Array.isArray(object?.leadingDetachedComments) - ? object.leadingDetachedComments.map((e: any) => String(e)) - : [], - }; - }, - - toJSON(message: SourceCodeInfo_Location): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => Math.round(e)); - } else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => Math.round(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, I>>(object: I): SourceCodeInfo_Location { - const message = createBaseSourceCodeInfo_Location(); - message.path = object.path?.map((e) => e) || []; - message.span = object.span?.map((e) => e) || []; - message.leadingComments = object.leadingComments ?? ""; - message.trailingComments = object.trailingComments ?? ""; - message.leadingDetachedComments = object.leadingDetachedComments?.map((e) => e) || []; - return message; - }, -}; - -function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { - return { annotation: [] }; -} - -export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGeneratedCodeInfo(); - 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 { - return { - annotation: Array.isArray(object?.annotation) - ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e)) - : [], - }; - }, - - 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, I>>(object: I): GeneratedCodeInfo { - const message = createBaseGeneratedCodeInfo(); - message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { - return { path: [], sourceFile: "", begin: 0, end: 0 }; -} - -export const GeneratedCodeInfo_Annotation = { - encode(message: GeneratedCodeInfo_Annotation, writer: _m0.Writer = _m0.Writer.create()): _m0.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: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGeneratedCodeInfo_Annotation(); - 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 { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], - sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "", - begin: isSet(object.begin) ? Number(object.begin) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - }; - }, - - toJSON(message: GeneratedCodeInfo_Annotation): unknown { - const obj: any = {}; - if (message.path) { - obj.path = message.path.map((e) => Math.round(e)); - } else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = Math.round(message.begin)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, - - fromPartial, I>>(object: I): GeneratedCodeInfo_Annotation { - const message = createBaseGeneratedCodeInfo_Annotation(); - message.path = object.path?.map((e) => e) || []; - message.sourceFile = object.sourceFile ?? ""; - message.begin = object.begin ?? 0; - message.end = object.end ?? 0; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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"; -})(); - -function bytesFromBase64(b64: string): Uint8Array { - if (globalThis.Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if (globalThis.Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -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 (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/account.ts b/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/account.ts deleted file mode 100644 index 6826f27..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/account.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; - -export const protobufPackage = "iconlake.iconlake"; - -export interface Account { - address: string; - lastMintDropTime: number; -} - -function createBaseAccount(): Account { - return { address: "", lastMintDropTime: 0 }; -} - -export const Account = { - encode(message: Account, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.lastMintDropTime !== 0) { - writer.uint32(16).uint64(message.lastMintDropTime); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Account { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccount(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.lastMintDropTime = longToNumber(reader.uint64() as Long); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): Account { - return { - address: isSet(object.address) ? String(object.address) : "", - lastMintDropTime: isSet(object.lastMintDropTime) ? Number(object.lastMintDropTime) : 0, - }; - }, - - toJSON(message: Account): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - message.lastMintDropTime !== undefined && (obj.lastMintDropTime = Math.round(message.lastMintDropTime)); - return obj; - }, - - fromPartial, I>>(object: I): Account { - const message = createBaseAccount(); - message.address = object.address ?? ""; - message.lastMintDropTime = object.lastMintDropTime ?? 0; - return message; - }, -}; - -declare var self: any | undefined; -declare var window: any | undefined; -declare var global: 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 | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -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 (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/genesis.ts b/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/genesis.ts deleted file mode 100644 index e1f0a0f..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/genesis.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; -import { Account } from "./account"; -import { Params } from "./params"; - -export const protobufPackage = "iconlake.iconlake"; - -/** GenesisState defines the iconlake module's genesis state. */ -export interface GenesisState { - params: Params | undefined; - accountList: Account[]; -} - -function createBaseGenesisState(): GenesisState { - return { params: undefined, accountList: [] }; -} - -export const GenesisState = { - encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.accountList) { - Account.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = Params.decode(reader, reader.uint32()); - break; - case 2: - message.accountList.push(Account.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): GenesisState { - return { - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - accountList: Array.isArray(object?.accountList) ? object.accountList.map((e: any) => Account.fromJSON(e)) : [], - }; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - if (message.accountList) { - obj.accountList = message.accountList.map((e) => e ? Account.toJSON(e) : undefined); - } else { - obj.accountList = []; - } - return obj; - }, - - fromPartial, I>>(object: I): GenesisState { - const message = createBaseGenesisState(); - message.params = (object.params !== undefined && object.params !== null) - ? Params.fromPartial(object.params) - : undefined; - message.accountList = object.accountList?.map((e) => Account.fromPartial(e)) || []; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/params.ts b/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/params.ts deleted file mode 100644 index 7a11bb6..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/params.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; - -export const protobufPackage = "iconlake.iconlake"; - -/** Params defines the parameters for the module. */ -export interface Params { -} - -function createBaseParams(): Params { - return {}; -} - -export const Params = { - encode(_: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseParams(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): Params { - return {}; - }, - - toJSON(_: Params): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial, I>>(_: I): Params { - const message = createBaseParams(); - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; diff --git a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/query.ts b/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/query.ts deleted file mode 100644 index 81b91a7..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/query.ts +++ /dev/null @@ -1,388 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../cosmos/base/query/v1beta1/pagination"; -import { Account } from "./account"; -import { Params } from "./params"; - -export const protobufPackage = "iconlake.iconlake"; - -/** 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 QueryGetAccountRequest { - address: string; -} - -export interface QueryGetAccountResponse { - account: Account | undefined; -} - -export interface QueryAllAccountRequest { - pagination: PageRequest | undefined; -} - -export interface QueryAllAccountResponse { - account: Account[]; - pagination: PageResponse | undefined; -} - -function createBaseQueryParamsRequest(): QueryParamsRequest { - return {}; -} - -export const QueryParamsRequest = { - encode(_: QueryParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(_: any): QueryParamsRequest { - return {}; - }, - - toJSON(_: QueryParamsRequest): unknown { - const obj: any = {}; - return obj; - }, - - fromPartial, I>>(_: I): QueryParamsRequest { - const message = createBaseQueryParamsRequest(); - return message; - }, -}; - -function createBaseQueryParamsResponse(): QueryParamsResponse { - return { params: undefined }; -} - -export const QueryParamsResponse = { - encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.params !== undefined) { - Params.encode(message.params, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryParamsResponse(); - 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 { - return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; - }, - - toJSON(message: QueryParamsResponse): unknown { - const obj: any = {}; - message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); - return obj; - }, - - fromPartial, I>>(object: I): QueryParamsResponse { - const message = createBaseQueryParamsResponse(); - message.params = (object.params !== undefined && object.params !== null) - ? Params.fromPartial(object.params) - : undefined; - return message; - }, -}; - -function createBaseQueryGetAccountRequest(): QueryGetAccountRequest { - return { address: "" }; -} - -export const QueryGetAccountRequest = { - encode(message: QueryGetAccountRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetAccountRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGetAccountRequest(); - 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): QueryGetAccountRequest { - return { address: isSet(object.address) ? String(object.address) : "" }; - }, - - toJSON(message: QueryGetAccountRequest): unknown { - const obj: any = {}; - message.address !== undefined && (obj.address = message.address); - return obj; - }, - - fromPartial, I>>(object: I): QueryGetAccountRequest { - const message = createBaseQueryGetAccountRequest(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseQueryGetAccountResponse(): QueryGetAccountResponse { - return { account: undefined }; -} - -export const QueryGetAccountResponse = { - encode(message: QueryGetAccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.account !== undefined) { - Account.encode(message.account, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetAccountResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGetAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = Account.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): QueryGetAccountResponse { - return { account: isSet(object.account) ? Account.fromJSON(object.account) : undefined }; - }, - - toJSON(message: QueryGetAccountResponse): unknown { - const obj: any = {}; - message.account !== undefined && (obj.account = message.account ? Account.toJSON(message.account) : undefined); - return obj; - }, - - fromPartial, I>>(object: I): QueryGetAccountResponse { - const message = createBaseQueryGetAccountResponse(); - message.account = (object.account !== undefined && object.account !== null) - ? Account.fromPartial(object.account) - : undefined; - return message; - }, -}; - -function createBaseQueryAllAccountRequest(): QueryAllAccountRequest { - return { pagination: undefined }; -} - -export const QueryAllAccountRequest = { - encode(message: QueryAllAccountRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllAccountRequest { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllAccountRequest(); - 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): QueryAllAccountRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; - }, - - toJSON(message: QueryAllAccountRequest): unknown { - const obj: any = {}; - message.pagination !== undefined - && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial, I>>(object: I): QueryAllAccountRequest { - const message = createBaseQueryAllAccountRequest(); - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryAllAccountResponse(): QueryAllAccountResponse { - return { account: [], pagination: undefined }; -} - -export const QueryAllAccountResponse = { - encode(message: QueryAllAccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.account) { - Account.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllAccountResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAllAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account.push(Account.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): QueryAllAccountResponse { - return { - account: Array.isArray(object?.account) ? object.account.map((e: any) => Account.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryAllAccountResponse): unknown { - const obj: any = {}; - if (message.account) { - obj.account = message.account.map((e) => e ? Account.toJSON(e) : undefined); - } else { - obj.account = []; - } - message.pagination !== undefined - && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); - return obj; - }, - - fromPartial, I>>(object: I): QueryAllAccountResponse { - const message = createBaseQueryAllAccountResponse(); - message.account = object.account?.map((e) => Account.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : 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 list of Account items. */ - Account(request: QueryGetAccountRequest): Promise; - AccountAll(request: QueryAllAccountRequest): Promise; -} - -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.Params = this.Params.bind(this); - this.Account = this.Account.bind(this); - this.AccountAll = this.AccountAll.bind(this); - } - Params(request: QueryParamsRequest): Promise { - const data = QueryParamsRequest.encode(request).finish(); - const promise = this.rpc.request("iconlake.iconlake.Query", "Params", data); - return promise.then((data) => QueryParamsResponse.decode(new _m0.Reader(data))); - } - - Account(request: QueryGetAccountRequest): Promise { - const data = QueryGetAccountRequest.encode(request).finish(); - const promise = this.rpc.request("iconlake.iconlake.Query", "Account", data); - return promise.then((data) => QueryGetAccountResponse.decode(new _m0.Reader(data))); - } - - AccountAll(request: QueryAllAccountRequest): Promise { - const data = QueryAllAccountRequest.encode(request).finish(); - const promise = this.rpc.request("iconlake.iconlake.Query", "AccountAll", data); - return promise.then((data) => QueryAllAccountResponse.decode(new _m0.Reader(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/tx.ts b/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/tx.ts deleted file mode 100644 index 7f2ea76..0000000 --- a/blockchain/ts-client/iconlake.iconlake/types/iconlake/iconlake/tx.ts +++ /dev/null @@ -1,158 +0,0 @@ -/* eslint-disable */ -import _m0 from "protobufjs/minimal"; -import { Coin } from "../../cosmos/base/v1beta1/coin"; - -export const protobufPackage = "iconlake.iconlake"; - -export interface MsgMintDrop { - creator: string; - amount: Coin | undefined; -} - -export interface MsgMintDropResponse { - lastMintDropTime: string; -} - -function createBaseMsgMintDrop(): MsgMintDrop { - return { creator: "", amount: undefined }; -} - -export const MsgMintDrop = { - encode(message: MsgMintDrop, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.creator !== "") { - writer.uint32(10).string(message.creator); - } - if (message.amount !== undefined) { - Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgMintDrop { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMintDrop(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.amount = Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgMintDrop { - return { - creator: isSet(object.creator) ? String(object.creator) : "", - amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined, - }; - }, - - toJSON(message: MsgMintDrop): unknown { - const obj: any = {}; - message.creator !== undefined && (obj.creator = message.creator); - message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); - return obj; - }, - - fromPartial, I>>(object: I): MsgMintDrop { - const message = createBaseMsgMintDrop(); - message.creator = object.creator ?? ""; - message.amount = (object.amount !== undefined && object.amount !== null) - ? Coin.fromPartial(object.amount) - : undefined; - return message; - }, -}; - -function createBaseMsgMintDropResponse(): MsgMintDropResponse { - return { lastMintDropTime: "" }; -} - -export const MsgMintDropResponse = { - encode(message: MsgMintDropResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.lastMintDropTime !== "") { - writer.uint32(10).string(message.lastMintDropTime); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgMintDropResponse { - const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMintDropResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.lastMintDropTime = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }, - - fromJSON(object: any): MsgMintDropResponse { - return { lastMintDropTime: isSet(object.lastMintDropTime) ? String(object.lastMintDropTime) : "" }; - }, - - toJSON(message: MsgMintDropResponse): unknown { - const obj: any = {}; - message.lastMintDropTime !== undefined && (obj.lastMintDropTime = message.lastMintDropTime); - return obj; - }, - - fromPartial, I>>(object: I): MsgMintDropResponse { - const message = createBaseMsgMintDropResponse(); - message.lastMintDropTime = object.lastMintDropTime ?? ""; - return message; - }, -}; - -/** Msg defines the Msg service. */ -export interface Msg { - MintDrop(request: MsgMintDrop): Promise; -} - -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - constructor(rpc: Rpc) { - this.rpc = rpc; - this.MintDrop = this.MintDrop.bind(this); - } - MintDrop(request: MsgMintDrop): Promise { - const data = MsgMintDrop.encode(request).finish(); - const promise = this.rpc.request("iconlake.iconlake.Msg", "MintDrop", data); - return promise.then((data) => MsgMintDropResponse.decode(new _m0.Reader(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/blockchain/ts-client/package.json b/blockchain/ts-client/package.json index 5e17f9b..cbab1b3 100755 --- a/blockchain/ts-client/package.json +++ b/blockchain/ts-client/package.json @@ -1,6 +1,6 @@ { "name": "@iconlake/client", - "version": "0.6.0", + "version": "1.0.0", "description": "iconLake Typescript Client", "author": "iconLake", "license": "Apache-2.0", @@ -22,7 +22,7 @@ "build-js": "vite build", "build": "pnpm run build-ts && pnpm run build-js" }, - "packageManager": "pnpm@8.15.4", + "packageManager": "pnpm@9.5.0", "dependencies": { "axios": "^0.21.4", "buffer": "^6.0.3", diff --git a/blockchain/ts-client/pnpm-lock.yaml b/blockchain/ts-client/pnpm-lock.yaml index 696c5e0..6d69b44 100644 --- a/blockchain/ts-client/pnpm-lock.yaml +++ b/blockchain/ts-client/pnpm-lock.yaml @@ -1,78 +1,689 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - '@cosmjs/launchpad': - specifier: 0.27.1 - version: 0.27.1 - '@cosmjs/proto-signing': - specifier: 0.31.1 - version: 0.31.1 - '@cosmjs/stargate': - specifier: 0.31.1 - version: 0.31.1 - axios: - specifier: ^0.21.4 - version: 0.21.4 - buffer: - specifier: ^6.0.3 - version: 6.0.3 - events: - specifier: ^3.3.0 - version: 3.3.0 - long: - specifier: ^5.2.3 - version: 5.2.3 - protobufjs: - specifier: ^7.2.4 - version: 7.2.4 - -devDependencies: - '@keplr-wallet/types': - specifier: ^0.11.3 - version: 0.11.3 - '@types/events': - specifier: ^3.0.0 - version: 3.0.0 - typescript: - specifier: ^5.1.6 - version: 5.1.6 - vite: - specifier: ^4.4.6 - version: 4.4.6 +importers: + + .: + dependencies: + '@cosmjs/launchpad': + specifier: 0.27.1 + version: 0.27.1 + '@cosmjs/proto-signing': + specifier: 0.31.1 + version: 0.31.1 + '@cosmjs/stargate': + specifier: 0.31.1 + version: 0.31.1 + axios: + specifier: ^0.21.4 + version: 0.21.4 + buffer: + specifier: ^6.0.3 + version: 6.0.3 + events: + specifier: ^3.3.0 + version: 3.3.0 + long: + specifier: ^5.2.3 + version: 5.2.3 + protobufjs: + specifier: ^7.2.4 + version: 7.2.4 + devDependencies: + '@keplr-wallet/types': + specifier: ^0.11.3 + version: 0.11.3 + '@types/events': + specifier: ^3.0.0 + version: 3.0.0 + typescript: + specifier: ^5.1.6 + version: 5.1.6 + vite: + specifier: ^4.4.6 + version: 4.4.6 packages: - /@confio/ics23@0.6.8: + '@confio/ics23@0.6.8': resolution: {integrity: sha512-wB6uo+3A50m0sW/EWcU64xpV/8wShZ6bMTa7pF8eYsTrSkQA7oLUIJcs/wb8g4y2Oyq701BaGiO6n/ak5WXO1w==} + + '@cosmjs/amino@0.27.1': + resolution: {integrity: sha512-w56ar/nK9+qlvWDpBPRmD0Blk2wfkkLqRi1COs1x7Ll1LF0AtkIBUjbRKplENLbNovK0T3h+w8bHiFm+GBGQOA==} + + '@cosmjs/amino@0.31.1': + resolution: {integrity: sha512-kkB9IAkNEUFtjp/uwHv95TgM8VGJ4VWfZwrTyLNqBDD1EpSX2dsNrmUe7k8OMPzKlZUFcKmD4iA0qGvIwzjbGA==} + + '@cosmjs/crypto@0.24.1': + resolution: {integrity: sha512-GPhaWmQO06mXldKj/b+oKF5o3jMNfRKpAw+Q8XQhrD7ItinVPDMu8Xgl6frUXWTUdgpYwqpvqOcpm85QUsYV0Q==} + + '@cosmjs/crypto@0.27.1': + resolution: {integrity: sha512-vbcxwSt99tIYJg8Spp00wc3zx72qx+pY3ozGuBN8gAvySnagK9dQ/jHwtWQWdammmdD6oW+75WfIHZ+gNa+Ybg==} + + '@cosmjs/crypto@0.31.1': + resolution: {integrity: sha512-4R/SqdzdVzd4E5dpyEh1IKm5GbTqwDogutyIyyb1bcOXiX/x3CrvPI9Tb4WSIMDLvlb5TVzu2YnUV51Q1+6mMA==} + + '@cosmjs/encoding@0.24.1': + resolution: {integrity: sha512-PMr+gaXAuM0XgjeXwB1zdX1QI0t+PgVhbmjgI/RSgswDzdExNH97qUopecL0/HG3p64vhIT/6ZjXYYTljZL7WA==} + + '@cosmjs/encoding@0.27.1': + resolution: {integrity: sha512-rayLsA0ojHeniaRfWWcqSsrE/T1rl1gl0OXVNtXlPwLJifKBeLEefGbOUiAQaT0wgJ8VNGBazVtAZBpJidfDhw==} + + '@cosmjs/encoding@0.31.1': + resolution: {integrity: sha512-IuxP6ewwX6vg9sUJ8ocJD92pkerI4lyG8J5ynAM3NaX3q+n+uMoPRSQXNeL9bnlrv01FF1kIm8if/f5F7ZPtkA==} + + '@cosmjs/json-rpc@0.31.1': + resolution: {integrity: sha512-gIkCj2mUDHAxvmJnHtybXtMLZDeXrkDZlujjzhvJlWsIuj1kpZbKtYqh+eNlfwhMkMMAlQa/y4422jDmizW+ng==} + + '@cosmjs/launchpad@0.24.1': + resolution: {integrity: sha512-syqVGKRH6z1vw4DdAJOSu4OgUXJdkXQozqvDde0cXYwnvhb7EXGSg5CTtp+2GqTBJuNVfMZ2DSvrC2Ig8cWBQQ==} + + '@cosmjs/launchpad@0.27.1': + resolution: {integrity: sha512-DcFwGD/z5PK8CzO2sojDxa+Be9EIEtRZb2YawgVnw2Ht/p5FlNv+OVo8qlishpBdalXEN7FvQ1dVeDFEe9TuJw==} + + '@cosmjs/math@0.24.1': + resolution: {integrity: sha512-eBQk8twgzmpHFCVkoNjTZhsZwWRbR+JXt0FhjXJoD85SBm4K8b2OnOyTg68uPHVKOJjLRwzyRVYgMrg5TBVgwQ==} + + '@cosmjs/math@0.27.1': + resolution: {integrity: sha512-cHWVjmfIjtRc7f80n7x+J5k8pe+vTVTQ0lA82tIxUgqUvgS6rogPP/TmGtTiZ4+NxWxd11DUISY6gVpr18/VNQ==} + + '@cosmjs/math@0.31.1': + resolution: {integrity: sha512-kiuHV6m6DSB8/4UV1qpFhlc4ul8SgLXTGRlYkYiIIP4l0YNeJ+OpPYaOlEgx4Unk2mW3/O2FWYj7Jc93+BWXng==} + + '@cosmjs/proto-signing@0.24.1': + resolution: {integrity: sha512-/rnyNx+FlG6b6O+igsb42eMN1/RXY+pTrNnAE8/YZaRloP9A6MXiTMO5JdYSTcjaD0mEVhejiy96bcyflKYXBg==} + + '@cosmjs/proto-signing@0.31.1': + resolution: {integrity: sha512-hipbBVrssPu+jnmRzQRP5hhS/mbz2nU7RvxG/B1ZcdNhr1AtZC5DN09OTUoEpMSRgyQvScXmk/NTbyf+xmCgYg==} + + '@cosmjs/socket@0.31.1': + resolution: {integrity: sha512-XTtEr+x3WGbqkzoGX0sCkwVqf5n+bBqDwqNgb+DWaBABQxHVRuuainrTVp0Yc91D3Iy2twLQzeBA9OrRxDSerw==} + + '@cosmjs/stargate@0.31.1': + resolution: {integrity: sha512-TqOJZYOH5W3sZIjR6949GfjhGXO3kSHQ3/KmE+SuKyMMmQ5fFZ45beawiRtVF0/CJg5RyPFyFGJKhb1Xxv3Lcg==} + + '@cosmjs/stream@0.31.1': + resolution: {integrity: sha512-xsIGD9bpBvYYZASajCyOevh1H5pDdbOWmvb4UwGZ78doGVz3IC3Kb9BZKJHIX2fjq9CMdGVJHmlM+Zp5aM8yZA==} + + '@cosmjs/tendermint-rpc@0.31.1': + resolution: {integrity: sha512-KX+wwi725sSePqIxfMPPOqg+xTETV8BHGOBhRhCZXEl5Fq48UlXXq3/yG1sn7K67ADC0kqHqcCF41Wn1GxNNPA==} + + '@cosmjs/utils@0.24.1': + resolution: {integrity: sha512-VA3WFx1lMFb7esp9BqHWkDgMvHoA3D9w+uDRvWhVRpUpDc7RYHxMbWExASjz+gNblTCg556WJGzF64tXnf9tdQ==} + + '@cosmjs/utils@0.27.1': + resolution: {integrity: sha512-VG7QPDiMUzVPxRdJahDV8PXxVdnuAHiIuG56hldV4yPnOz/si/DLNd7VAUUA5923b6jS1Hhev0Hr6AhEkcxBMg==} + + '@cosmjs/utils@0.31.1': + resolution: {integrity: sha512-n4Se1wu4GnKwztQHNFfJvUeWcpvx3o8cWhSbNs9JQShEuB3nv3R5lqFBtDCgHZF/emFQAP+ZjF8bTfCs9UBGhA==} + + '@esbuild/android-arm64@0.18.15': + resolution: {integrity: sha512-NI/gnWcMl2kXt1HJKOn2H69SYn4YNheKo6NZt1hyfKWdMbaGadxjZIkcj4Gjk/WPxnbFXs9/3HjGHaknCqjrww==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.18.15': + resolution: {integrity: sha512-wlkQBWb79/jeEEoRmrxt/yhn5T1lU236OCNpnfRzaCJHZ/5gf82uYx1qmADTBWE0AR/v7FiozE1auk2riyQd3w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.18.15': + resolution: {integrity: sha512-FM9NQamSaEm/IZIhegF76aiLnng1kEsZl2eve/emxDeReVfRuRNmvT28l6hoFD9TsCxpK+i4v8LPpEj74T7yjA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.18.15': + resolution: {integrity: sha512-XmrFwEOYauKte9QjS6hz60FpOCnw4zaPAb7XV7O4lx1r39XjJhTN7ZpXqJh4sN6q60zbP6QwAVVA8N/wUyBH/w==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.18.15': + resolution: {integrity: sha512-bMqBmpw1e//7Fh5GLetSZaeo9zSC4/CMtrVFdj+bqKPGJuKyfNJ5Nf2m3LknKZTS+Q4oyPiON+v3eaJ59sLB5A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.18.15': + resolution: {integrity: sha512-LoTK5N3bOmNI9zVLCeTgnk5Rk0WdUTrr9dyDAQGVMrNTh9EAPuNwSTCgaKOKiDpverOa0htPcO9NwslSE5xuLA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.18.15': + resolution: {integrity: sha512-62jX5n30VzgrjAjOk5orYeHFq6sqjvsIj1QesXvn5OZtdt5Gdj0vUNJy9NIpjfdNdqr76jjtzBJKf+h2uzYuTQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.18.15': + resolution: {integrity: sha512-BWncQeuWDgYv0jTNzJjaNgleduV4tMbQjmk/zpPh/lUdMcNEAxy+jvneDJ6RJkrqloG7tB9S9rCrtfk/kuplsQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.18.15': + resolution: {integrity: sha512-dT4URUv6ir45ZkBqhwZwyFV6cH61k8MttIwhThp2BGiVtagYvCToF+Bggyx2VI57RG4Fbt21f9TmXaYx0DeUJg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.18.15': + resolution: {integrity: sha512-JPXORvgHRHITqfms1dWT/GbEY89u848dC08o0yK3fNskhp0t2TuNUnsrrSgOdH28ceb1hJuwyr8R/1RnyPwocw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.18.15': + resolution: {integrity: sha512-kArPI0DopjJCEplsVj/H+2Qgzz7vdFSacHNsgoAKpPS6W/Ndh8Oe24HRDQ5QCu4jHgN6XOtfFfLpRx3TXv/mEg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.18.15': + resolution: {integrity: sha512-b/tmngUfO02E00c1XnNTw/0DmloKjb6XQeqxaYuzGwHe0fHVgx5/D6CWi+XH1DvkszjBUkK9BX7n1ARTOst59w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.18.15': + resolution: {integrity: sha512-KXPY69MWw79QJkyvUYb2ex/OgnN/8N/Aw5UDPlgoRtoEfcBqfeLodPr42UojV3NdkoO4u10NXQdamWm1YEzSKw==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.18.15': + resolution: {integrity: sha512-komK3NEAeeGRnvFEjX1SfVg6EmkfIi5aKzevdvJqMydYr9N+pRQK0PGJXk+bhoPZwOUgLO4l99FZmLGk/L1jWg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.18.15': + resolution: {integrity: sha512-632T5Ts6gQ2WiMLWRRyeflPAm44u2E/s/TJvn+BP6M5mnHSk93cieaypj3VSMYO2ePTCRqAFXtuYi1yv8uZJNA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.18.15': + resolution: {integrity: sha512-MsHtX0NgvRHsoOtYkuxyk4Vkmvk3PLRWfA4okK7c+6dT0Fu4SUqXAr9y4Q3d8vUf1VWWb6YutpL4XNe400iQ1g==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.18.15': + resolution: {integrity: sha512-djST6s+jQiwxMIVQ5rlt24JFIAr4uwUnzceuFL7BQT4CbrRtqBPueS4GjXSiIpmwVri1Icj/9pFRJ7/aScvT+A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-x64@0.18.15': + resolution: {integrity: sha512-naeRhUIvhsgeounjkF5mvrNAVMGAm6EJWiabskeE5yOeBbLp7T89tAEw0j5Jm/CZAwyLe3c67zyCWH6fsBLCpw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.18.15': + resolution: {integrity: sha512-qkT2+WxyKbNIKV1AEhI8QiSIgTHMcRctzSaa/I3kVgMS5dl3fOeoqkb7pW76KwxHoriImhx7Mg3TwN/auMDsyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.18.15': + resolution: {integrity: sha512-HC4/feP+pB2Vb+cMPUjAnFyERs+HJN7E6KaeBlFdBv799MhD+aPJlfi/yk36SED58J9TPwI8MAcVpJgej4ud0A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.18.15': + resolution: {integrity: sha512-ovjwoRXI+gf52EVF60u9sSDj7myPixPxqzD5CmkEUmvs+W9Xd0iqISVBQn8xcx4ciIaIVlWCuTbYDOXOnOL44Q==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.18.15': + resolution: {integrity: sha512-imUxH9a3WJARyAvrG7srLyiK73XdX83NXQkjKvQ+7vPh3ZxoLrzvPkQKKw2DwZ+RV2ZB6vBfNHP8XScAmQC3aA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@iov/crypto@2.1.0': + resolution: {integrity: sha512-jnb4XuK50admolm7fBxOcxfAW2TO+wYrZlhDWiMETItY/Y5gNNa1zaDSO2wNIjjfGng+8nQ1yqnNhqy7busV2Q==} + + '@iov/encoding@2.1.0': + resolution: {integrity: sha512-5IOdLO7Xg/uRykuiCqeMYghQ3IjWDtGxv7NTWXkgpHuna0aewx43mRpT2NPCpOZd1tpuorDtQ7/zbDNRaIIF/w==} + + '@iov/utils@2.0.2': + resolution: {integrity: sha512-4D8MEvTcFc/DVy5q25vHxRItmgJyeX85dixMH+MxdKr+yy71h3sYk+sVBEIn70uqGP7VqAJkGOPNFs08/XYELw==} + + '@keplr-wallet/types@0.11.3': + resolution: {integrity: sha512-OA0OoimsUI22iTXgup3BAlLt+FJdGKniJqzJyQji+rqfXqreBT+Ie9c5Ng7qY81+RO/nJ5SZfa1gIns+3A0YxA==} + + '@noble/hashes@1.3.1': + resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} + engines: {node: '>= 16'} + + '@protobufjs/aspromise@1.1.2': + resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + + '@protobufjs/base64@1.1.2': + resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + + '@protobufjs/codegen@2.0.4': + resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + + '@protobufjs/eventemitter@1.1.0': + resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + + '@protobufjs/fetch@1.1.0': + resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + + '@protobufjs/float@1.0.2': + resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + + '@protobufjs/inquire@1.1.0': + resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + + '@protobufjs/path@1.1.2': + resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + + '@protobufjs/pool@1.1.0': + resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + + '@protobufjs/utf8@1.1.0': + resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + + '@types/events@3.0.0': + resolution: {integrity: sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==} + + '@types/long@4.0.2': + resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} + + '@types/node@13.13.52': + resolution: {integrity: sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==} + + '@types/node@20.4.1': + resolution: {integrity: sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + axios@0.21.1: + resolution: {integrity: sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==} + + axios@0.21.4: + resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} + + axios@0.27.2: + resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + bech32@1.1.4: + resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} + + bip39@3.1.0: + resolution: {integrity: sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==} + + bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + + bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + + brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + + buffer@5.4.3: + resolution: {integrity: sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==} + + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + + charenc@0.0.2: + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} + + cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + cosmjs-types@0.8.0: + resolution: {integrity: sha512-Q2Mj95Fl0PYMWEhA2LuGEIhipF7mQwd9gTQ85DdP9jjjopeoGaDxvmPa5nakNzsq7FnO1DMTatXTAx6bxMH7Lg==} + + create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + + create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + + crypt@0.0.2: + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} + + curve25519-js@0.0.4: + resolution: {integrity: sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w==} + + define-properties@1.2.0: + resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + engines: {node: '>= 0.4'} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + elliptic@6.5.4: + resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + + esbuild@0.18.15: + resolution: {integrity: sha512-3WOOLhrvuTGPRzQPU6waSDWrDTnQriia72McWcn6UCi43GhCHrXH4S59hKMeez+IITmdUuUyvbU9JIp+t3xlPQ==} + engines: {node: '>=12'} + hasBin: true + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + fast-deep-equal@3.1.1: + resolution: {integrity: sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + follow-redirects@1.15.2: + resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + + fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + + get-intrinsic@1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + + globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + + has-property-descriptors@1.0.0: + resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + + has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has@1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + + hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + + hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + + hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + is-buffer@1.1.6: + resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + + isomorphic-ws@4.0.1: + resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} + peerDependencies: + ws: '*' + + js-crypto-env@0.3.2: + resolution: {integrity: sha512-F1uHiCkSOo36qBuuZABA4sBf+xeFBzhJZ0Sd7af8FAruszIhm1Xxv+Zr5Ne90Zlh7/fnxCsrdkj0N8f0a3lVlQ==} + + js-crypto-hash@0.6.3: + resolution: {integrity: sha512-SG8c9tM8y3sUb4k7WvpVfu5vU7zfPvX+eaYR5578TvehkehdaQbqAc+y+1FwxnqQ3WZ0gsYoOKp/mW+mqtNoWA==} + + js-crypto-hkdf@0.7.3: + resolution: {integrity: sha512-eAaVArAjS2GCacWGXY4hjBiexrLQYlI0PMOcbwtrSEj84XU3kUfMYZm9bpTyaTXgdHC/eQoXe/Of6biG+RSEaQ==} + + js-crypto-hmac@0.6.3: + resolution: {integrity: sha512-T0pKOaHACOSG6Xs6/06G8RDDeZouQwIQNBq9L/zoUGsd4F67gAjpT3q2lGigAGpUd1hiyy7vnhvLpz7VDt6DbA==} + + js-crypto-random@0.4.3: + resolution: {integrity: sha512-C3gzphPPfw9jfQ9Q/LjhJMZxQNp3AaoVRDvyZkiB+zYltfs8tKQPsskWkXACpg1Nzh01PtSRUvVijjptd2qGHQ==} + + js-encoding-utils@0.5.6: + resolution: {integrity: sha512-qnAGsUIWrmzh5n+3AXqbxX1KsB9hkQmJZf3aA9DLAS7GpL/NEHCBreFFbW+imramoU+Q0TDyvkwhRbBRH1TVkg==} + + js-sha3@0.8.0: + resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + + libsodium-sumo@0.7.11: + resolution: {integrity: sha512-bY+7ph7xpk51Ez2GbE10lXAQ5sJma6NghcIDaSPbM/G9elfrjLa0COHl/7P6Wb/JizQzl5UQontOOP1z0VwbLA==} + + libsodium-wrappers-sumo@0.7.11: + resolution: {integrity: sha512-DGypHOmJbB1nZn89KIfGOAkDgfv5N6SBGC3Qvmy/On0P0WD1JQvNRS/e3UL3aFF+xC0m+MYz5M+MnRnK2HMrKQ==} + + libsodium-wrappers@0.7.11: + resolution: {integrity: sha512-SrcLtXj7BM19vUKtQuyQKiQCRJPgbpauzl3s0rSwD+60wtHqSUuqcoawlMDheCJga85nKOQwxNYQxf/CKAvs6Q==} + + libsodium@0.7.11: + resolution: {integrity: sha512-WPfJ7sS53I2s4iM58QxY3Inb83/6mjlYgcmZs7DJsvDlnmVUwNinBCi5vBT43P6bHRy01O4zsMU2CoVR6xJ40A==} + + long@4.0.0: + resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + + long@5.2.3: + resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} + + md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + + md5@2.2.1: + resolution: {integrity: sha512-PlGG4z5mBANDGCKsYQe0CaUYHdZYZt8ZPZLmEt+Urf0W4GlpTX4HescwHU+dc9+Z/G/vZKYZYFrwgm9VxK6QOQ==} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + + miscreant@0.3.2: + resolution: {integrity: sha512-fL9KxsQz9BJB2KGPMHFrReioywkiomBiuaLk6EuChijK0BsJsIKJXdVomR+/bPj5mvbFD6wM0CM3bZio9g7OHA==} + + nanoid@3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + + pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + + picocolors@1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + + postcss@8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + + protobufjs@6.10.3: + resolution: {integrity: sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg==} + hasBin: true + + protobufjs@6.11.3: + resolution: {integrity: sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==} + hasBin: true + + protobufjs@7.2.4: + resolution: {integrity: sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==} + engines: {node: '>=12.0.0'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readonly-date@1.0.0: + resolution: {integrity: sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==} + + ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + + rollup@3.26.3: + resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + secretjs@0.17.7: + resolution: {integrity: sha512-j39l9+vR2A8067QBqDDejS7LmRLgdkG4uRw2Ar6HMfzDGo26eTh7cIXVlVu/yHBumxtQzKun20epOXwuYHXjQg==} + deprecated: deprecated + + secure-random@1.1.2: + resolution: {integrity: sha512-H2bdSKERKdBV1SwoqYm6C0y+9EA94v6SUBOWO8kDndc4NoUih7Dv6Tsgma7zO1lv27wIvjlD0ZpMQk7um5dheQ==} + + sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + + sha3@2.1.4: + resolution: {integrity: sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==} + + source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + symbol-observable@2.0.3: + resolution: {integrity: sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA==} + engines: {node: '>=0.10'} + + type-tagger@1.0.0: + resolution: {integrity: sha512-FIPqqpmDgdaulCnRoKv1/d3U4xVBUrYn42QXWNP3XYmgfPUDuBUsgFOb9ntT0aIe0UsUP+lknpQ5d9Kn36RssA==} + + typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} + hasBin: true + + unorm@1.6.0: + resolution: {integrity: sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==} + engines: {node: '>= 0.4.0'} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + vite@4.4.6: + resolution: {integrity: sha512-EY6Mm8vJ++S3D4tNAckaZfw3JwG3wa794Vt70M6cNJ6NxT87yhq7EC8Rcap3ahyHdo8AhCmV9PTk+vG1HiYn1A==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + ws@7.5.9: + resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xstream@11.14.0: + resolution: {integrity: sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==} + +snapshots: + + '@confio/ics23@0.6.8': dependencies: '@noble/hashes': 1.3.1 protobufjs: 6.11.3 - dev: false - /@cosmjs/amino@0.27.1: - resolution: {integrity: sha512-w56ar/nK9+qlvWDpBPRmD0Blk2wfkkLqRi1COs1x7Ll1LF0AtkIBUjbRKplENLbNovK0T3h+w8bHiFm+GBGQOA==} + '@cosmjs/amino@0.27.1': dependencies: '@cosmjs/crypto': 0.27.1 '@cosmjs/encoding': 0.27.1 '@cosmjs/math': 0.27.1 '@cosmjs/utils': 0.27.1 - dev: false - /@cosmjs/amino@0.31.1: - resolution: {integrity: sha512-kkB9IAkNEUFtjp/uwHv95TgM8VGJ4VWfZwrTyLNqBDD1EpSX2dsNrmUe7k8OMPzKlZUFcKmD4iA0qGvIwzjbGA==} + '@cosmjs/amino@0.31.1': dependencies: '@cosmjs/crypto': 0.31.1 '@cosmjs/encoding': 0.31.1 '@cosmjs/math': 0.31.1 '@cosmjs/utils': 0.31.1 - dev: false - /@cosmjs/crypto@0.24.1: - resolution: {integrity: sha512-GPhaWmQO06mXldKj/b+oKF5o3jMNfRKpAw+Q8XQhrD7ItinVPDMu8Xgl6frUXWTUdgpYwqpvqOcpm85QUsYV0Q==} + '@cosmjs/crypto@0.24.1': dependencies: '@cosmjs/encoding': 0.24.1 '@cosmjs/math': 0.24.1 @@ -86,10 +697,8 @@ packages: ripemd160: 2.0.2 sha.js: 2.4.11 unorm: 1.6.0 - dev: true - /@cosmjs/crypto@0.27.1: - resolution: {integrity: sha512-vbcxwSt99tIYJg8Spp00wc3zx72qx+pY3ozGuBN8gAvySnagK9dQ/jHwtWQWdammmdD6oW+75WfIHZ+gNa+Ybg==} + '@cosmjs/crypto@0.27.1': dependencies: '@cosmjs/encoding': 0.27.1 '@cosmjs/math': 0.27.1 @@ -101,10 +710,8 @@ packages: libsodium-wrappers: 0.7.11 ripemd160: 2.0.2 sha.js: 2.4.11 - dev: false - /@cosmjs/crypto@0.31.1: - resolution: {integrity: sha512-4R/SqdzdVzd4E5dpyEh1IKm5GbTqwDogutyIyyb1bcOXiX/x3CrvPI9Tb4WSIMDLvlb5TVzu2YnUV51Q1+6mMA==} + '@cosmjs/crypto@0.31.1': dependencies: '@cosmjs/encoding': 0.31.1 '@cosmjs/math': 0.31.1 @@ -113,41 +720,31 @@ packages: bn.js: 5.2.1 elliptic: 6.5.4 libsodium-wrappers-sumo: 0.7.11 - dev: false - /@cosmjs/encoding@0.24.1: - resolution: {integrity: sha512-PMr+gaXAuM0XgjeXwB1zdX1QI0t+PgVhbmjgI/RSgswDzdExNH97qUopecL0/HG3p64vhIT/6ZjXYYTljZL7WA==} + '@cosmjs/encoding@0.24.1': dependencies: base64-js: 1.5.1 bech32: 1.1.4 readonly-date: 1.0.0 - dev: true - /@cosmjs/encoding@0.27.1: - resolution: {integrity: sha512-rayLsA0ojHeniaRfWWcqSsrE/T1rl1gl0OXVNtXlPwLJifKBeLEefGbOUiAQaT0wgJ8VNGBazVtAZBpJidfDhw==} + '@cosmjs/encoding@0.27.1': dependencies: base64-js: 1.5.1 bech32: 1.1.4 readonly-date: 1.0.0 - dev: false - /@cosmjs/encoding@0.31.1: - resolution: {integrity: sha512-IuxP6ewwX6vg9sUJ8ocJD92pkerI4lyG8J5ynAM3NaX3q+n+uMoPRSQXNeL9bnlrv01FF1kIm8if/f5F7ZPtkA==} + '@cosmjs/encoding@0.31.1': dependencies: base64-js: 1.5.1 bech32: 1.1.4 readonly-date: 1.0.0 - dev: false - /@cosmjs/json-rpc@0.31.1: - resolution: {integrity: sha512-gIkCj2mUDHAxvmJnHtybXtMLZDeXrkDZlujjzhvJlWsIuj1kpZbKtYqh+eNlfwhMkMMAlQa/y4422jDmizW+ng==} + '@cosmjs/json-rpc@0.31.1': dependencies: '@cosmjs/stream': 0.31.1 xstream: 11.14.0 - dev: false - /@cosmjs/launchpad@0.24.1: - resolution: {integrity: sha512-syqVGKRH6z1vw4DdAJOSu4OgUXJdkXQozqvDde0cXYwnvhb7EXGSg5CTtp+2GqTBJuNVfMZ2DSvrC2Ig8cWBQQ==} + '@cosmjs/launchpad@0.24.1': dependencies: '@cosmjs/crypto': 0.24.1 '@cosmjs/encoding': 0.24.1 @@ -157,10 +754,8 @@ packages: fast-deep-equal: 3.1.3 transitivePeerDependencies: - debug - dev: true - /@cosmjs/launchpad@0.27.1: - resolution: {integrity: sha512-DcFwGD/z5PK8CzO2sojDxa+Be9EIEtRZb2YawgVnw2Ht/p5FlNv+OVo8qlishpBdalXEN7FvQ1dVeDFEe9TuJw==} + '@cosmjs/launchpad@0.27.1': dependencies: '@cosmjs/amino': 0.27.1 '@cosmjs/crypto': 0.27.1 @@ -171,38 +766,28 @@ packages: fast-deep-equal: 3.1.3 transitivePeerDependencies: - debug - dev: false - /@cosmjs/math@0.24.1: - resolution: {integrity: sha512-eBQk8twgzmpHFCVkoNjTZhsZwWRbR+JXt0FhjXJoD85SBm4K8b2OnOyTg68uPHVKOJjLRwzyRVYgMrg5TBVgwQ==} + '@cosmjs/math@0.24.1': dependencies: bn.js: 4.12.0 - dev: true - /@cosmjs/math@0.27.1: - resolution: {integrity: sha512-cHWVjmfIjtRc7f80n7x+J5k8pe+vTVTQ0lA82tIxUgqUvgS6rogPP/TmGtTiZ4+NxWxd11DUISY6gVpr18/VNQ==} + '@cosmjs/math@0.27.1': dependencies: bn.js: 5.2.1 - dev: false - /@cosmjs/math@0.31.1: - resolution: {integrity: sha512-kiuHV6m6DSB8/4UV1qpFhlc4ul8SgLXTGRlYkYiIIP4l0YNeJ+OpPYaOlEgx4Unk2mW3/O2FWYj7Jc93+BWXng==} + '@cosmjs/math@0.31.1': dependencies: bn.js: 5.2.1 - dev: false - /@cosmjs/proto-signing@0.24.1: - resolution: {integrity: sha512-/rnyNx+FlG6b6O+igsb42eMN1/RXY+pTrNnAE8/YZaRloP9A6MXiTMO5JdYSTcjaD0mEVhejiy96bcyflKYXBg==} + '@cosmjs/proto-signing@0.24.1': dependencies: '@cosmjs/launchpad': 0.24.1 long: 4.0.0 protobufjs: 6.10.3 transitivePeerDependencies: - debug - dev: true - /@cosmjs/proto-signing@0.31.1: - resolution: {integrity: sha512-hipbBVrssPu+jnmRzQRP5hhS/mbz2nU7RvxG/B1ZcdNhr1AtZC5DN09OTUoEpMSRgyQvScXmk/NTbyf+xmCgYg==} + '@cosmjs/proto-signing@0.31.1': dependencies: '@cosmjs/amino': 0.31.1 '@cosmjs/crypto': 0.31.1 @@ -211,10 +796,8 @@ packages: '@cosmjs/utils': 0.31.1 cosmjs-types: 0.8.0 long: 4.0.0 - dev: false - /@cosmjs/socket@0.31.1: - resolution: {integrity: sha512-XTtEr+x3WGbqkzoGX0sCkwVqf5n+bBqDwqNgb+DWaBABQxHVRuuainrTVp0Yc91D3Iy2twLQzeBA9OrRxDSerw==} + '@cosmjs/socket@0.31.1': dependencies: '@cosmjs/stream': 0.31.1 isomorphic-ws: 4.0.1(ws@7.5.9) @@ -223,10 +806,8 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate - dev: false - /@cosmjs/stargate@0.31.1: - resolution: {integrity: sha512-TqOJZYOH5W3sZIjR6949GfjhGXO3kSHQ3/KmE+SuKyMMmQ5fFZ45beawiRtVF0/CJg5RyPFyFGJKhb1Xxv3Lcg==} + '@cosmjs/stargate@0.31.1': dependencies: '@confio/ics23': 0.6.8 '@cosmjs/amino': 0.31.1 @@ -244,16 +825,12 @@ packages: - bufferutil - debug - utf-8-validate - dev: false - /@cosmjs/stream@0.31.1: - resolution: {integrity: sha512-xsIGD9bpBvYYZASajCyOevh1H5pDdbOWmvb4UwGZ78doGVz3IC3Kb9BZKJHIX2fjq9CMdGVJHmlM+Zp5aM8yZA==} + '@cosmjs/stream@0.31.1': dependencies: xstream: 11.14.0 - dev: false - /@cosmjs/tendermint-rpc@0.31.1: - resolution: {integrity: sha512-KX+wwi725sSePqIxfMPPOqg+xTETV8BHGOBhRhCZXEl5Fq48UlXXq3/yG1sn7K67ADC0kqHqcCF41Wn1GxNNPA==} + '@cosmjs/tendermint-rpc@0.31.1': dependencies: '@cosmjs/crypto': 0.31.1 '@cosmjs/encoding': 0.31.1 @@ -269,220 +846,80 @@ packages: - bufferutil - debug - utf-8-validate - dev: false - /@cosmjs/utils@0.24.1: - resolution: {integrity: sha512-VA3WFx1lMFb7esp9BqHWkDgMvHoA3D9w+uDRvWhVRpUpDc7RYHxMbWExASjz+gNblTCg556WJGzF64tXnf9tdQ==} - dev: true + '@cosmjs/utils@0.24.1': {} - /@cosmjs/utils@0.27.1: - resolution: {integrity: sha512-VG7QPDiMUzVPxRdJahDV8PXxVdnuAHiIuG56hldV4yPnOz/si/DLNd7VAUUA5923b6jS1Hhev0Hr6AhEkcxBMg==} - dev: false + '@cosmjs/utils@0.27.1': {} - /@cosmjs/utils@0.31.1: - resolution: {integrity: sha512-n4Se1wu4GnKwztQHNFfJvUeWcpvx3o8cWhSbNs9JQShEuB3nv3R5lqFBtDCgHZF/emFQAP+ZjF8bTfCs9UBGhA==} - dev: false + '@cosmjs/utils@0.31.1': {} - /@esbuild/android-arm64@0.18.15: - resolution: {integrity: sha512-NI/gnWcMl2kXt1HJKOn2H69SYn4YNheKo6NZt1hyfKWdMbaGadxjZIkcj4Gjk/WPxnbFXs9/3HjGHaknCqjrww==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true + '@esbuild/android-arm64@0.18.15': optional: true - /@esbuild/android-arm@0.18.15: - resolution: {integrity: sha512-wlkQBWb79/jeEEoRmrxt/yhn5T1lU236OCNpnfRzaCJHZ/5gf82uYx1qmADTBWE0AR/v7FiozE1auk2riyQd3w==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true + '@esbuild/android-arm@0.18.15': optional: true - /@esbuild/android-x64@0.18.15: - resolution: {integrity: sha512-FM9NQamSaEm/IZIhegF76aiLnng1kEsZl2eve/emxDeReVfRuRNmvT28l6hoFD9TsCxpK+i4v8LPpEj74T7yjA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true + '@esbuild/android-x64@0.18.15': optional: true - /@esbuild/darwin-arm64@0.18.15: - resolution: {integrity: sha512-XmrFwEOYauKte9QjS6hz60FpOCnw4zaPAb7XV7O4lx1r39XjJhTN7ZpXqJh4sN6q60zbP6QwAVVA8N/wUyBH/w==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true + '@esbuild/darwin-arm64@0.18.15': optional: true - /@esbuild/darwin-x64@0.18.15: - resolution: {integrity: sha512-bMqBmpw1e//7Fh5GLetSZaeo9zSC4/CMtrVFdj+bqKPGJuKyfNJ5Nf2m3LknKZTS+Q4oyPiON+v3eaJ59sLB5A==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true + '@esbuild/darwin-x64@0.18.15': optional: true - /@esbuild/freebsd-arm64@0.18.15: - resolution: {integrity: sha512-LoTK5N3bOmNI9zVLCeTgnk5Rk0WdUTrr9dyDAQGVMrNTh9EAPuNwSTCgaKOKiDpverOa0htPcO9NwslSE5xuLA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true + '@esbuild/freebsd-arm64@0.18.15': optional: true - /@esbuild/freebsd-x64@0.18.15: - resolution: {integrity: sha512-62jX5n30VzgrjAjOk5orYeHFq6sqjvsIj1QesXvn5OZtdt5Gdj0vUNJy9NIpjfdNdqr76jjtzBJKf+h2uzYuTQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true + '@esbuild/freebsd-x64@0.18.15': optional: true - /@esbuild/linux-arm64@0.18.15: - resolution: {integrity: sha512-BWncQeuWDgYv0jTNzJjaNgleduV4tMbQjmk/zpPh/lUdMcNEAxy+jvneDJ6RJkrqloG7tB9S9rCrtfk/kuplsQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-arm64@0.18.15': optional: true - /@esbuild/linux-arm@0.18.15: - resolution: {integrity: sha512-dT4URUv6ir45ZkBqhwZwyFV6cH61k8MttIwhThp2BGiVtagYvCToF+Bggyx2VI57RG4Fbt21f9TmXaYx0DeUJg==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-arm@0.18.15': optional: true - /@esbuild/linux-ia32@0.18.15: - resolution: {integrity: sha512-JPXORvgHRHITqfms1dWT/GbEY89u848dC08o0yK3fNskhp0t2TuNUnsrrSgOdH28ceb1hJuwyr8R/1RnyPwocw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-ia32@0.18.15': optional: true - /@esbuild/linux-loong64@0.18.15: - resolution: {integrity: sha512-kArPI0DopjJCEplsVj/H+2Qgzz7vdFSacHNsgoAKpPS6W/Ndh8Oe24HRDQ5QCu4jHgN6XOtfFfLpRx3TXv/mEg==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-loong64@0.18.15': optional: true - /@esbuild/linux-mips64el@0.18.15: - resolution: {integrity: sha512-b/tmngUfO02E00c1XnNTw/0DmloKjb6XQeqxaYuzGwHe0fHVgx5/D6CWi+XH1DvkszjBUkK9BX7n1ARTOst59w==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-mips64el@0.18.15': optional: true - /@esbuild/linux-ppc64@0.18.15: - resolution: {integrity: sha512-KXPY69MWw79QJkyvUYb2ex/OgnN/8N/Aw5UDPlgoRtoEfcBqfeLodPr42UojV3NdkoO4u10NXQdamWm1YEzSKw==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-ppc64@0.18.15': optional: true - /@esbuild/linux-riscv64@0.18.15: - resolution: {integrity: sha512-komK3NEAeeGRnvFEjX1SfVg6EmkfIi5aKzevdvJqMydYr9N+pRQK0PGJXk+bhoPZwOUgLO4l99FZmLGk/L1jWg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-riscv64@0.18.15': optional: true - /@esbuild/linux-s390x@0.18.15: - resolution: {integrity: sha512-632T5Ts6gQ2WiMLWRRyeflPAm44u2E/s/TJvn+BP6M5mnHSk93cieaypj3VSMYO2ePTCRqAFXtuYi1yv8uZJNA==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-s390x@0.18.15': optional: true - /@esbuild/linux-x64@0.18.15: - resolution: {integrity: sha512-MsHtX0NgvRHsoOtYkuxyk4Vkmvk3PLRWfA4okK7c+6dT0Fu4SUqXAr9y4Q3d8vUf1VWWb6YutpL4XNe400iQ1g==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true + '@esbuild/linux-x64@0.18.15': optional: true - /@esbuild/netbsd-x64@0.18.15: - resolution: {integrity: sha512-djST6s+jQiwxMIVQ5rlt24JFIAr4uwUnzceuFL7BQT4CbrRtqBPueS4GjXSiIpmwVri1Icj/9pFRJ7/aScvT+A==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true + '@esbuild/netbsd-x64@0.18.15': optional: true - /@esbuild/openbsd-x64@0.18.15: - resolution: {integrity: sha512-naeRhUIvhsgeounjkF5mvrNAVMGAm6EJWiabskeE5yOeBbLp7T89tAEw0j5Jm/CZAwyLe3c67zyCWH6fsBLCpw==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true + '@esbuild/openbsd-x64@0.18.15': optional: true - /@esbuild/sunos-x64@0.18.15: - resolution: {integrity: sha512-qkT2+WxyKbNIKV1AEhI8QiSIgTHMcRctzSaa/I3kVgMS5dl3fOeoqkb7pW76KwxHoriImhx7Mg3TwN/auMDsyQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true + '@esbuild/sunos-x64@0.18.15': optional: true - /@esbuild/win32-arm64@0.18.15: - resolution: {integrity: sha512-HC4/feP+pB2Vb+cMPUjAnFyERs+HJN7E6KaeBlFdBv799MhD+aPJlfi/yk36SED58J9TPwI8MAcVpJgej4ud0A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true + '@esbuild/win32-arm64@0.18.15': optional: true - /@esbuild/win32-ia32@0.18.15: - resolution: {integrity: sha512-ovjwoRXI+gf52EVF60u9sSDj7myPixPxqzD5CmkEUmvs+W9Xd0iqISVBQn8xcx4ciIaIVlWCuTbYDOXOnOL44Q==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true + '@esbuild/win32-ia32@0.18.15': optional: true - /@esbuild/win32-x64@0.18.15: - resolution: {integrity: sha512-imUxH9a3WJARyAvrG7srLyiK73XdX83NXQkjKvQ+7vPh3ZxoLrzvPkQKKw2DwZ+RV2ZB6vBfNHP8XScAmQC3aA==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true + '@esbuild/win32-x64@0.18.15': optional: true - /@iov/crypto@2.1.0: - resolution: {integrity: sha512-jnb4XuK50admolm7fBxOcxfAW2TO+wYrZlhDWiMETItY/Y5gNNa1zaDSO2wNIjjfGng+8nQ1yqnNhqy7busV2Q==} + '@iov/crypto@2.1.0': dependencies: '@iov/encoding': 2.1.0 bip39: 3.1.0 @@ -495,23 +932,17 @@ packages: sha.js: 2.4.11 type-tagger: 1.0.0 unorm: 1.6.0 - dev: true - /@iov/encoding@2.1.0: - resolution: {integrity: sha512-5IOdLO7Xg/uRykuiCqeMYghQ3IjWDtGxv7NTWXkgpHuna0aewx43mRpT2NPCpOZd1tpuorDtQ7/zbDNRaIIF/w==} + '@iov/encoding@2.1.0': dependencies: base64-js: 1.5.1 bech32: 1.1.4 bn.js: 4.12.0 readonly-date: 1.0.0 - dev: true - /@iov/utils@2.0.2: - resolution: {integrity: sha512-4D8MEvTcFc/DVy5q25vHxRItmgJyeX85dixMH+MxdKr+yy71h3sYk+sVBEIn70uqGP7VqAJkGOPNFs08/XYELw==} - dev: true + '@iov/utils@2.0.2': {} - /@keplr-wallet/types@0.11.3: - resolution: {integrity: sha512-OA0OoimsUI22iTXgup3BAlLt+FJdGKniJqzJyQji+rqfXqreBT+Ie9c5Ng7qY81+RO/nJ5SZfa1gIns+3A0YxA==} + '@keplr-wallet/types@0.11.3': dependencies: '@cosmjs/launchpad': 0.24.1 '@cosmjs/proto-signing': 0.24.1 @@ -520,158 +951,110 @@ packages: secretjs: 0.17.7 transitivePeerDependencies: - debug - dev: true - /@noble/hashes@1.3.1: - resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} - engines: {node: '>= 16'} + '@noble/hashes@1.3.1': {} - /@protobufjs/aspromise@1.1.2: - resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + '@protobufjs/aspromise@1.1.2': {} - /@protobufjs/base64@1.1.2: - resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + '@protobufjs/base64@1.1.2': {} - /@protobufjs/codegen@2.0.4: - resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + '@protobufjs/codegen@2.0.4': {} - /@protobufjs/eventemitter@1.1.0: - resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + '@protobufjs/eventemitter@1.1.0': {} - /@protobufjs/fetch@1.1.0: - resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + '@protobufjs/fetch@1.1.0': dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/inquire': 1.1.0 - /@protobufjs/float@1.0.2: - resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + '@protobufjs/float@1.0.2': {} - /@protobufjs/inquire@1.1.0: - resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + '@protobufjs/inquire@1.1.0': {} - /@protobufjs/path@1.1.2: - resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + '@protobufjs/path@1.1.2': {} - /@protobufjs/pool@1.1.0: - resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + '@protobufjs/pool@1.1.0': {} - /@protobufjs/utf8@1.1.0: - resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + '@protobufjs/utf8@1.1.0': {} - /@types/events@3.0.0: - resolution: {integrity: sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==} - dev: true + '@types/events@3.0.0': {} - /@types/long@4.0.2: - resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} + '@types/long@4.0.2': {} - /@types/node@13.13.52: - resolution: {integrity: sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==} - dev: true + '@types/node@13.13.52': {} - /@types/node@20.4.1: - resolution: {integrity: sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==} + '@types/node@20.4.1': {} - /asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: true + asynckit@0.4.0: {} - /axios@0.21.1: - resolution: {integrity: sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==} + axios@0.21.1: dependencies: follow-redirects: 1.15.2 transitivePeerDependencies: - debug - dev: true - /axios@0.21.4: - resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} + axios@0.21.4: dependencies: follow-redirects: 1.15.2 transitivePeerDependencies: - debug - /axios@0.27.2: - resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} + axios@0.27.2: dependencies: follow-redirects: 1.15.2 form-data: 4.0.0 transitivePeerDependencies: - debug - dev: true - /base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + base64-js@1.5.1: {} - /bech32@1.1.4: - resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} + bech32@1.1.4: {} - /bip39@3.1.0: - resolution: {integrity: sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==} + bip39@3.1.0: dependencies: '@noble/hashes': 1.3.1 - /bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + bn.js@4.12.0: {} - /bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - dev: false + bn.js@5.2.1: {} - /brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + brorand@1.1.0: {} - /buffer@5.4.3: - resolution: {integrity: sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==} + buffer@5.4.3: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 - dev: true - /buffer@6.0.3: - resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + buffer@6.0.3: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 - /charenc@0.0.2: - resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} - dev: true + charenc@0.0.2: {} - /cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + cipher-base@1.0.4: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} + combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 - dev: true - /cosmjs-types@0.8.0: - resolution: {integrity: sha512-Q2Mj95Fl0PYMWEhA2LuGEIhipF7mQwd9gTQ85DdP9jjjopeoGaDxvmPa5nakNzsq7FnO1DMTatXTAx6bxMH7Lg==} + cosmjs-types@0.8.0: dependencies: long: 4.0.0 protobufjs: 6.11.3 - dev: false - /create-hash@1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + create-hash@1.2.0: dependencies: cipher-base: 1.0.4 inherits: 2.0.4 md5.js: 1.3.5 ripemd160: 2.0.2 sha.js: 2.4.11 - dev: true - /create-hmac@1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + create-hmac@1.1.7: dependencies: cipher-base: 1.0.4 create-hash: 1.2.0 @@ -679,31 +1062,19 @@ packages: ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - dev: true - /crypt@0.0.2: - resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} - dev: true + crypt@0.0.2: {} - /curve25519-js@0.0.4: - resolution: {integrity: sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w==} - dev: true + curve25519-js@0.0.4: {} - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} - engines: {node: '>= 0.4'} + define-properties@1.2.0: dependencies: has-property-descriptors: 1.0.0 object-keys: 1.1.1 - dev: false - /delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - dev: true + delayed-stream@1.0.0: {} - /elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + elliptic@6.5.4: dependencies: bn.js: 4.12.0 brorand: 1.1.0 @@ -713,11 +1084,7 @@ packages: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - /esbuild@0.18.15: - resolution: {integrity: sha512-3WOOLhrvuTGPRzQPU6waSDWrDTnQriia72McWcn6UCi43GhCHrXH4S59hKMeez+IITmdUuUyvbU9JIp+t3xlPQ==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true + esbuild@0.18.15: optionalDependencies: '@esbuild/android-arm': 0.18.15 '@esbuild/android-arm64': 0.18.15 @@ -741,277 +1108,169 @@ packages: '@esbuild/win32-arm64': 0.18.15 '@esbuild/win32-ia32': 0.18.15 '@esbuild/win32-x64': 0.18.15 - dev: true - /events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - dev: false + events@3.3.0: {} - /fast-deep-equal@3.1.1: - resolution: {integrity: sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==} - dev: true + fast-deep-equal@3.1.1: {} - /fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-deep-equal@3.1.3: {} - /follow-redirects@1.15.2: - resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true + follow-redirects@1.15.2: {} - /form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} - engines: {node: '>= 6'} + form-data@4.0.0: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - dev: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true + fsevents@2.3.2: optional: true - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: false + function-bind@1.1.1: {} - /get-intrinsic@1.2.1: - resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + get-intrinsic@1.2.1: dependencies: function-bind: 1.1.1 has: 1.0.3 has-proto: 1.0.1 has-symbols: 1.0.3 - dev: false - /globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} + globalthis@1.0.3: dependencies: define-properties: 1.2.0 - dev: false - /has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + has-property-descriptors@1.0.0: dependencies: get-intrinsic: 1.2.1 - dev: false - /has-proto@1.0.1: - resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} - engines: {node: '>= 0.4'} - dev: false + has-proto@1.0.1: {} - /has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - dev: false + has-symbols@1.0.3: {} - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} + has@1.0.3: dependencies: function-bind: 1.1.1 - dev: false - /hash-base@3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} + hash-base@3.1.0: dependencies: inherits: 2.0.4 readable-stream: 3.6.2 safe-buffer: 5.2.1 - /hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + hash.js@1.1.7: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 - /hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + hmac-drbg@1.0.1: dependencies: hash.js: 1.1.7 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - /ieee754@1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ieee754@1.2.1: {} - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + inherits@2.0.4: {} - /is-buffer@1.1.6: - resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - dev: true + is-buffer@1.1.6: {} - /isomorphic-ws@4.0.1(ws@7.5.9): - resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} - peerDependencies: - ws: '*' + isomorphic-ws@4.0.1(ws@7.5.9): dependencies: ws: 7.5.9 - dev: false - /js-crypto-env@0.3.2: - resolution: {integrity: sha512-F1uHiCkSOo36qBuuZABA4sBf+xeFBzhJZ0Sd7af8FAruszIhm1Xxv+Zr5Ne90Zlh7/fnxCsrdkj0N8f0a3lVlQ==} - dev: true + js-crypto-env@0.3.2: {} - /js-crypto-hash@0.6.3: - resolution: {integrity: sha512-SG8c9tM8y3sUb4k7WvpVfu5vU7zfPvX+eaYR5578TvehkehdaQbqAc+y+1FwxnqQ3WZ0gsYoOKp/mW+mqtNoWA==} + js-crypto-hash@0.6.3: dependencies: buffer: 5.4.3 hash.js: 1.1.7 js-crypto-env: 0.3.2 md5: 2.2.1 sha3: 2.1.4 - dev: true - /js-crypto-hkdf@0.7.3: - resolution: {integrity: sha512-eAaVArAjS2GCacWGXY4hjBiexrLQYlI0PMOcbwtrSEj84XU3kUfMYZm9bpTyaTXgdHC/eQoXe/Of6biG+RSEaQ==} + js-crypto-hkdf@0.7.3: dependencies: js-crypto-env: 0.3.2 js-crypto-hmac: 0.6.3 js-crypto-random: 0.4.3 js-encoding-utils: 0.5.6 - dev: true - /js-crypto-hmac@0.6.3: - resolution: {integrity: sha512-T0pKOaHACOSG6Xs6/06G8RDDeZouQwIQNBq9L/zoUGsd4F67gAjpT3q2lGigAGpUd1hiyy7vnhvLpz7VDt6DbA==} + js-crypto-hmac@0.6.3: dependencies: js-crypto-env: 0.3.2 js-crypto-hash: 0.6.3 - dev: true - /js-crypto-random@0.4.3: - resolution: {integrity: sha512-C3gzphPPfw9jfQ9Q/LjhJMZxQNp3AaoVRDvyZkiB+zYltfs8tKQPsskWkXACpg1Nzh01PtSRUvVijjptd2qGHQ==} + js-crypto-random@0.4.3: dependencies: js-crypto-env: 0.3.2 - dev: true - /js-encoding-utils@0.5.6: - resolution: {integrity: sha512-qnAGsUIWrmzh5n+3AXqbxX1KsB9hkQmJZf3aA9DLAS7GpL/NEHCBreFFbW+imramoU+Q0TDyvkwhRbBRH1TVkg==} - dev: true + js-encoding-utils@0.5.6: {} - /js-sha3@0.8.0: - resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + js-sha3@0.8.0: {} - /libsodium-sumo@0.7.11: - resolution: {integrity: sha512-bY+7ph7xpk51Ez2GbE10lXAQ5sJma6NghcIDaSPbM/G9elfrjLa0COHl/7P6Wb/JizQzl5UQontOOP1z0VwbLA==} - dev: false + libsodium-sumo@0.7.11: {} - /libsodium-wrappers-sumo@0.7.11: - resolution: {integrity: sha512-DGypHOmJbB1nZn89KIfGOAkDgfv5N6SBGC3Qvmy/On0P0WD1JQvNRS/e3UL3aFF+xC0m+MYz5M+MnRnK2HMrKQ==} + libsodium-wrappers-sumo@0.7.11: dependencies: libsodium-sumo: 0.7.11 - dev: false - /libsodium-wrappers@0.7.11: - resolution: {integrity: sha512-SrcLtXj7BM19vUKtQuyQKiQCRJPgbpauzl3s0rSwD+60wtHqSUuqcoawlMDheCJga85nKOQwxNYQxf/CKAvs6Q==} + libsodium-wrappers@0.7.11: dependencies: libsodium: 0.7.11 - /libsodium@0.7.11: - resolution: {integrity: sha512-WPfJ7sS53I2s4iM58QxY3Inb83/6mjlYgcmZs7DJsvDlnmVUwNinBCi5vBT43P6bHRy01O4zsMU2CoVR6xJ40A==} + libsodium@0.7.11: {} - /long@4.0.0: - resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + long@4.0.0: {} - /long@5.2.3: - resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} - dev: false + long@5.2.3: {} - /md5.js@1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + md5.js@1.3.5: dependencies: hash-base: 3.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /md5@2.2.1: - resolution: {integrity: sha512-PlGG4z5mBANDGCKsYQe0CaUYHdZYZt8ZPZLmEt+Urf0W4GlpTX4HescwHU+dc9+Z/G/vZKYZYFrwgm9VxK6QOQ==} + md5@2.2.1: dependencies: charenc: 0.0.2 crypt: 0.0.2 is-buffer: 1.1.6 - dev: true - /mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - dev: true + mime-db@1.52.0: {} - /mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} + mime-types@2.1.35: dependencies: mime-db: 1.52.0 - dev: true - /minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + minimalistic-assert@1.0.1: {} - /minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + minimalistic-crypto-utils@1.0.1: {} - /miscreant@0.3.2: - resolution: {integrity: sha512-fL9KxsQz9BJB2KGPMHFrReioywkiomBiuaLk6EuChijK0BsJsIKJXdVomR+/bPj5mvbFD6wM0CM3bZio9g7OHA==} - dev: true + miscreant@0.3.2: {} - /nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true + nanoid@3.3.6: {} - /object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: false + object-keys@1.1.1: {} - /pako@1.0.11: - resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} - dev: true + pako@1.0.11: {} - /pbkdf2@3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} + pbkdf2@3.1.2: dependencies: create-hash: 1.2.0 create-hmac: 1.1.7 ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - dev: true - /picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true + picocolors@1.0.0: {} - /postcss@8.4.27: - resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} - engines: {node: ^10 || ^12 || >=14} + postcss@8.4.27: dependencies: nanoid: 3.3.6 picocolors: 1.0.0 source-map-js: 1.0.2 - dev: true - /protobufjs@6.10.3: - resolution: {integrity: sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg==} - hasBin: true - requiresBuild: true + protobufjs@6.10.3: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2 @@ -1026,12 +1285,8 @@ packages: '@types/long': 4.0.2 '@types/node': 13.13.52 long: 4.0.0 - dev: true - /protobufjs@6.11.3: - resolution: {integrity: sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==} - hasBin: true - requiresBuild: true + protobufjs@6.11.3: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2 @@ -1047,10 +1302,7 @@ packages: '@types/node': 20.4.1 long: 4.0.0 - /protobufjs@7.2.4: - resolution: {integrity: sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==} - engines: {node: '>=12.0.0'} - requiresBuild: true + protobufjs@7.2.4: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2 @@ -1064,39 +1316,27 @@ packages: '@protobufjs/utf8': 1.1.0 '@types/node': 20.4.1 long: 5.2.3 - dev: false - /readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} + readable-stream@3.6.2: dependencies: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - /readonly-date@1.0.0: - resolution: {integrity: sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==} + readonly-date@1.0.0: {} - /ripemd160@2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + ripemd160@2.0.2: dependencies: hash-base: 3.1.0 inherits: 2.0.4 - /rollup@3.26.3: - resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true + rollup@3.26.3: optionalDependencies: fsevents: 2.3.2 - dev: true - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + safe-buffer@5.2.1: {} - /secretjs@0.17.7: - resolution: {integrity: sha512-j39l9+vR2A8067QBqDDejS7LmRLgdkG4uRw2Ar6HMfzDGo26eTh7cIXVlVu/yHBumxtQzKun20epOXwuYHXjQg==} - deprecated: deprecated + secretjs@0.17.7: dependencies: '@iov/crypto': 2.1.0 '@iov/encoding': 2.1.0 @@ -1111,109 +1351,45 @@ packages: secure-random: 1.1.2 transitivePeerDependencies: - debug - dev: true - /secure-random@1.1.2: - resolution: {integrity: sha512-H2bdSKERKdBV1SwoqYm6C0y+9EA94v6SUBOWO8kDndc4NoUih7Dv6Tsgma7zO1lv27wIvjlD0ZpMQk7um5dheQ==} - dev: true + secure-random@1.1.2: {} - /sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true + sha.js@2.4.11: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - /sha3@2.1.4: - resolution: {integrity: sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==} + sha3@2.1.4: dependencies: buffer: 6.0.3 - dev: true - /source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - dev: true + source-map-js@1.0.2: {} - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 - /symbol-observable@2.0.3: - resolution: {integrity: sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA==} - engines: {node: '>=0.10'} - dev: false + symbol-observable@2.0.3: {} - /type-tagger@1.0.0: - resolution: {integrity: sha512-FIPqqpmDgdaulCnRoKv1/d3U4xVBUrYn42QXWNP3XYmgfPUDuBUsgFOb9ntT0aIe0UsUP+lknpQ5d9Kn36RssA==} - dev: true + type-tagger@1.0.0: {} - /typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} - engines: {node: '>=14.17'} - hasBin: true - dev: true + typescript@5.1.6: {} - /unorm@1.6.0: - resolution: {integrity: sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==} - engines: {node: '>= 0.4.0'} - dev: true + unorm@1.6.0: {} - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + util-deprecate@1.0.2: {} - /vite@4.4.6: - resolution: {integrity: sha512-EY6Mm8vJ++S3D4tNAckaZfw3JwG3wa794Vt70M6cNJ6NxT87yhq7EC8Rcap3ahyHdo8AhCmV9PTk+vG1HiYn1A==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true + vite@4.4.6: dependencies: esbuild: 0.18.15 postcss: 8.4.27 rollup: 3.26.3 optionalDependencies: fsevents: 2.3.2 - dev: true - /ws@7.5.9: - resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} - engines: {node: '>=8.3.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: false + ws@7.5.9: {} - /xstream@11.14.0: - resolution: {integrity: sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==} + xstream@11.14.0: dependencies: globalthis: 1.0.3 symbol-observable: 2.0.3 - dev: false diff --git a/blockchain/x/icon/types/tx.pb.go b/blockchain/x/icon/types/tx.pb.go index 89c5e5d..c622e38 100644 --- a/blockchain/x/icon/types/tx.pb.go +++ b/blockchain/x/icon/types/tx.pb.go @@ -293,7 +293,7 @@ var xxx_messageInfo_MsgUpdateClassResponse proto.InternalMessageInfo type MsgBurn struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ClassId string `protobuf:"bytes,2,opt,name=classId,proto3" json:"classId,omitempty"` + ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` } @@ -399,33 +399,32 @@ func init() { func init() { proto.RegisterFile("iconlake/icon/tx.proto", fileDescriptor_86a033f3437d40ab) } var fileDescriptor_86a033f3437d40ab = []byte{ - // 402 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x41, 0xab, 0xda, 0x40, - 0x10, 0x76, 0x93, 0x54, 0xed, 0x48, 0x6d, 0xbb, 0xd0, 0xb0, 0x15, 0x0c, 0x12, 0x28, 0x78, 0x8a, - 0xd0, 0xde, 0x3d, 0xd8, 0x4b, 0x7b, 0xc8, 0xc5, 0xd2, 0x4b, 0x2f, 0xb2, 0x26, 0x8b, 0x2e, 0x8d, - 0x49, 0xd8, 0x4d, 0x40, 0xff, 0x45, 0xff, 0x4c, 0xff, 0xc3, 0x7b, 0x37, 0x8f, 0x8f, 0x77, 0x7a, - 0xe8, 0x1f, 0x79, 0xec, 0x66, 0x23, 0x11, 0xc5, 0x77, 0x79, 0x97, 0x65, 0xe6, 0xfb, 0x86, 0x99, - 0xf9, 0x66, 0x76, 0xc0, 0xe5, 0x51, 0x96, 0x26, 0xf4, 0x2f, 0x9b, 0x28, 0x63, 0x52, 0x6c, 0x83, - 0x5c, 0x64, 0x45, 0x86, 0xdf, 0xd5, 0x78, 0xa0, 0x8c, 0xc1, 0xf0, 0x3c, 0x4c, 0x3d, 0x8b, 0x98, - 0x16, 0xb4, 0x8a, 0xf6, 0xef, 0x11, 0x74, 0x42, 0xb9, 0x0a, 0x79, 0x5a, 0x60, 0x02, 0x9d, 0x48, - 0x30, 0x5a, 0x64, 0x82, 0xa0, 0x11, 0x1a, 0xbf, 0x9d, 0xd7, 0x2e, 0xfe, 0x0c, 0xdd, 0x28, 0xa1, - 0x52, 0x2e, 0x78, 0x4c, 0x2c, 0x43, 0x29, 0xff, 0x67, 0x8c, 0xfb, 0x60, 0xf1, 0x98, 0xd8, 0x1a, - 0xb4, 0x78, 0x8c, 0x31, 0x38, 0x29, 0xdd, 0x30, 0xe2, 0x68, 0x44, 0xdb, 0x78, 0x04, 0xbd, 0x98, - 0xc9, 0x48, 0xf0, 0xbc, 0xe0, 0x59, 0x4a, 0xde, 0x68, 0xaa, 0x09, 0xe1, 0x0f, 0x60, 0x97, 0x82, - 0x93, 0xb6, 0x66, 0x94, 0xa9, 0x4a, 0x96, 0x82, 0x2f, 0xd6, 0x54, 0xae, 0x49, 0xa7, 0x2a, 0x59, - 0x0a, 0xfe, 0x83, 0xca, 0x35, 0x76, 0xa1, 0x2d, 0xcb, 0x3c, 0x4f, 0x76, 0xa4, 0x3b, 0x42, 0x63, - 0x67, 0x6e, 0x3c, 0xff, 0x23, 0xbc, 0x37, 0x52, 0xe6, 0x4c, 0xe6, 0x59, 0x2a, 0x99, 0xff, 0x1f, - 0x41, 0x3f, 0x94, 0xab, 0xdf, 0x79, 0x4c, 0x0b, 0xf6, 0x5d, 0xb5, 0x7c, 0x43, 0x65, 0x25, 0xc5, - 0xba, 0x90, 0x62, 0x37, 0xa4, 0xa8, 0xda, 0xbb, 0xcd, 0x32, 0x4b, 0x8c, 0x40, 0xe3, 0xbd, 0xb2, - 0x44, 0x9f, 0x80, 0x7b, 0xde, 0xf6, 0x49, 0x51, 0xa8, 0xf7, 0x35, 0x2b, 0x45, 0x7a, 0x43, 0x89, - 0x62, 0xaa, 0xfd, 0xbc, 0xb0, 0x2e, 0x33, 0x33, 0x95, 0xae, 0xae, 0xf0, 0xf5, 0x11, 0x81, 0x1d, - 0xca, 0x15, 0x9e, 0x82, 0xa3, 0xbf, 0x85, 0x1b, 0x9c, 0xfd, 0xa8, 0xc0, 0xcc, 0x78, 0xe0, 0x5d, - 0xc7, 0xeb, 0x3c, 0xf8, 0x17, 0xf4, 0x9a, 0x73, 0x1f, 0x5e, 0x86, 0x37, 0xe8, 0xc1, 0x97, 0x9b, - 0xf4, 0x29, 0xe9, 0x14, 0x1c, 0xad, 0xfd, 0x4a, 0x53, 0x0a, 0xbf, 0xd6, 0x54, 0x53, 0xdc, 0x6c, - 0x72, 0x77, 0xf0, 0xd0, 0xfe, 0xe0, 0xa1, 0xa7, 0x83, 0x87, 0xfe, 0x1d, 0xbd, 0xd6, 0xfe, 0xe8, - 0xb5, 0x1e, 0x8e, 0x5e, 0xeb, 0xcf, 0xa7, 0xd3, 0xa1, 0x6c, 0xcd, 0x45, 0xed, 0x72, 0x26, 0x97, - 0x6d, 0x7d, 0x27, 0xdf, 0x9e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xaf, 0x8e, 0x7e, 0x6f, 0x03, - 0x00, 0x00, + // 397 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x41, 0xab, 0xda, 0x40, + 0x10, 0xc7, 0xdd, 0x24, 0x55, 0x3b, 0x52, 0xdb, 0x2e, 0x34, 0x6c, 0x05, 0x83, 0x04, 0x0a, 0x9e, + 0x22, 0xb4, 0x77, 0x0f, 0xf6, 0xd2, 0x1e, 0xd2, 0x83, 0xa5, 0x97, 0x5e, 0x64, 0x4d, 0x16, 0x5d, + 0x5e, 0x4c, 0xc2, 0x6e, 0x02, 0xfa, 0x2d, 0xde, 0x97, 0x79, 0xdf, 0xe1, 0xbd, 0x9b, 0xc7, 0xc7, + 0x3b, 0x3d, 0xf4, 0x8b, 0x3c, 0x76, 0xdd, 0x48, 0x44, 0xf1, 0xe4, 0x25, 0xcc, 0xfc, 0x67, 0x98, + 0x99, 0xdf, 0x64, 0x07, 0x5c, 0x1e, 0x65, 0x69, 0x42, 0xef, 0xd8, 0x48, 0x19, 0xa3, 0x62, 0x1d, + 0xe4, 0x22, 0x2b, 0x32, 0xfc, 0xa1, 0xd2, 0x03, 0x65, 0xf4, 0xfa, 0xa7, 0x69, 0xea, 0x33, 0x8b, + 0x69, 0x41, 0x0f, 0xd9, 0xfe, 0x13, 0x82, 0x56, 0x28, 0x17, 0x21, 0x4f, 0x0b, 0x4c, 0xa0, 0x15, + 0x09, 0x46, 0x8b, 0x4c, 0x10, 0x34, 0x40, 0xc3, 0xf7, 0xd3, 0xca, 0xc5, 0x5f, 0xa1, 0x1d, 0x25, + 0x54, 0xca, 0x19, 0x8f, 0x89, 0x65, 0x42, 0xca, 0xff, 0x1d, 0xe3, 0x2e, 0x58, 0x3c, 0x26, 0xb6, + 0x16, 0x2d, 0x1e, 0x63, 0x0c, 0x4e, 0x4a, 0x57, 0x8c, 0x38, 0x5a, 0xd1, 0x36, 0x1e, 0x40, 0x27, + 0x66, 0x32, 0x12, 0x3c, 0x2f, 0x78, 0x96, 0x92, 0x77, 0x3a, 0x54, 0x97, 0xf0, 0x27, 0xb0, 0x4b, + 0xc1, 0x49, 0x53, 0x47, 0x94, 0xa9, 0x5a, 0x96, 0x82, 0xcf, 0x96, 0x54, 0x2e, 0x49, 0xeb, 0xd0, + 0xb2, 0x14, 0xfc, 0x17, 0x95, 0x4b, 0xec, 0x42, 0x53, 0x96, 0x79, 0x9e, 0x6c, 0x48, 0x7b, 0x80, + 0x86, 0xce, 0xd4, 0x78, 0xfe, 0x67, 0xf8, 0x68, 0x50, 0xa6, 0x4c, 0xe6, 0x59, 0x2a, 0x99, 0xff, + 0x80, 0xa0, 0x1b, 0xca, 0xc5, 0xbf, 0x3c, 0xa6, 0x05, 0xfb, 0xa9, 0x46, 0xbe, 0x42, 0x79, 0x40, + 0xb1, 0xce, 0x50, 0xec, 0x1a, 0x8a, 0xea, 0xbd, 0x59, 0xcd, 0xb3, 0xc4, 0x00, 0x1a, 0xef, 0xc6, + 0x88, 0x3e, 0x01, 0xf7, 0x74, 0xec, 0x23, 0xd1, 0x1f, 0xfd, 0xbf, 0x26, 0xa5, 0x48, 0x6f, 0xf2, + 0xbf, 0xcc, 0xd2, 0x54, 0xbd, 0xaa, 0xc5, 0xf7, 0x17, 0x04, 0x76, 0x28, 0x17, 0x78, 0x0c, 0x8e, + 0x7e, 0x17, 0x6e, 0x70, 0xf2, 0xa4, 0x02, 0xb3, 0xe4, 0x9e, 0x77, 0x59, 0xaf, 0xea, 0xe0, 0xbf, + 0xd0, 0xa9, 0x2f, 0xbe, 0x7f, 0x9e, 0x5e, 0x0b, 0xf7, 0xbe, 0x5d, 0x0d, 0x1f, 0x8b, 0x8e, 0xc1, + 0xd1, 0xf0, 0x17, 0x86, 0x52, 0xfa, 0xa5, 0xa1, 0xea, 0x70, 0x93, 0xd1, 0xe3, 0xce, 0x43, 0xdb, + 0x9d, 0x87, 0x5e, 0x77, 0x1e, 0xba, 0xdf, 0x7b, 0x8d, 0xed, 0xde, 0x6b, 0x3c, 0xef, 0xbd, 0xc6, + 0xff, 0x2f, 0xc7, 0x4b, 0x59, 0x9b, 0x93, 0xda, 0xe4, 0x4c, 0xce, 0x9b, 0xfa, 0x50, 0x7e, 0xbc, + 0x05, 0x00, 0x00, 0xff, 0xff, 0x34, 0x93, 0x23, 0x50, 0x70, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/www/package.json b/www/package.json index f01b8b0..eca86fd 100644 --- a/www/package.json +++ b/www/package.json @@ -18,7 +18,7 @@ "license": "AGPLv3", "dependencies": { "@cosmjs/encoding": "^0.31.3", - "@iconlake/client": "^0.6.0", + "@iconlake/client": "^1.0.0", "axios": "^0.27.2", "crypto-js": "^4.1.1", "dexie": "^4.0.7", diff --git a/www/pnpm-lock.yaml b/www/pnpm-lock.yaml index f545dd2..6489848 100644 --- a/www/pnpm-lock.yaml +++ b/www/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^0.31.3 version: 0.31.3 '@iconlake/client': - specifier: ^0.6.0 - version: 0.6.0(@cosmjs/launchpad@0.27.1)(@cosmjs/proto-signing@0.31.1)(@cosmjs/stargate@0.31.1) + specifier: ^1.0.0 + version: 1.0.0(@cosmjs/launchpad@0.27.1)(@cosmjs/proto-signing@0.31.1)(@cosmjs/stargate@0.31.1) axios: specifier: ^0.27.2 version: 0.27.2 @@ -126,14 +126,14 @@ packages: '@cosmjs/amino@0.27.1': resolution: {integrity: sha512-w56ar/nK9+qlvWDpBPRmD0Blk2wfkkLqRi1COs1x7Ll1LF0AtkIBUjbRKplENLbNovK0T3h+w8bHiFm+GBGQOA==} - '@cosmjs/amino@0.31.1': - resolution: {integrity: sha512-kkB9IAkNEUFtjp/uwHv95TgM8VGJ4VWfZwrTyLNqBDD1EpSX2dsNrmUe7k8OMPzKlZUFcKmD4iA0qGvIwzjbGA==} + '@cosmjs/amino@0.31.3': + resolution: {integrity: sha512-36emtUq895sPRX8PTSOnG+lhJDCVyIcE0Tr5ct59sUbgQiI14y43vj/4WAlJ/utSOxy+Zhj9wxcs4AZfu0BHsw==} '@cosmjs/crypto@0.27.1': resolution: {integrity: sha512-vbcxwSt99tIYJg8Spp00wc3zx72qx+pY3ozGuBN8gAvySnagK9dQ/jHwtWQWdammmdD6oW+75WfIHZ+gNa+Ybg==} - '@cosmjs/crypto@0.31.1': - resolution: {integrity: sha512-4R/SqdzdVzd4E5dpyEh1IKm5GbTqwDogutyIyyb1bcOXiX/x3CrvPI9Tb4WSIMDLvlb5TVzu2YnUV51Q1+6mMA==} + '@cosmjs/crypto@0.31.3': + resolution: {integrity: sha512-vRbvM9ZKR2017TO73dtJ50KxoGcFzKtKI7C8iO302BQ5p+DuB+AirUg1952UpSoLfv5ki9O416MFANNg8UN/EQ==} '@cosmjs/encoding@0.27.1': resolution: {integrity: sha512-rayLsA0ojHeniaRfWWcqSsrE/T1rl1gl0OXVNtXlPwLJifKBeLEefGbOUiAQaT0wgJ8VNGBazVtAZBpJidfDhw==} @@ -141,8 +141,8 @@ packages: '@cosmjs/encoding@0.31.3': resolution: {integrity: sha512-6IRtG0fiVYwyP7n+8e54uTx2pLYijO48V3t9TLiROERm5aUAIzIlz6Wp0NYaI5he9nh1lcEGJ1lkquVKFw3sUg==} - '@cosmjs/json-rpc@0.31.1': - resolution: {integrity: sha512-gIkCj2mUDHAxvmJnHtybXtMLZDeXrkDZlujjzhvJlWsIuj1kpZbKtYqh+eNlfwhMkMMAlQa/y4422jDmizW+ng==} + '@cosmjs/json-rpc@0.31.3': + resolution: {integrity: sha512-7LVYerXjnm69qqYR3uA6LGCrBW2EO5/F7lfJxAmY+iII2C7xO3a0vAjMSt5zBBh29PXrJVS6c2qRP22W1Le2Wg==} '@cosmjs/launchpad@0.27.1': resolution: {integrity: sha512-DcFwGD/z5PK8CzO2sojDxa+Be9EIEtRZb2YawgVnw2Ht/p5FlNv+OVo8qlishpBdalXEN7FvQ1dVeDFEe9TuJw==} @@ -150,29 +150,29 @@ packages: '@cosmjs/math@0.27.1': resolution: {integrity: sha512-cHWVjmfIjtRc7f80n7x+J5k8pe+vTVTQ0lA82tIxUgqUvgS6rogPP/TmGtTiZ4+NxWxd11DUISY6gVpr18/VNQ==} - '@cosmjs/math@0.31.1': - resolution: {integrity: sha512-kiuHV6m6DSB8/4UV1qpFhlc4ul8SgLXTGRlYkYiIIP4l0YNeJ+OpPYaOlEgx4Unk2mW3/O2FWYj7Jc93+BWXng==} + '@cosmjs/math@0.31.3': + resolution: {integrity: sha512-kZ2C6glA5HDb9hLz1WrftAjqdTBb3fWQsRR+Us2HsjAYdeE6M3VdXMsYCP5M3yiihal1WDwAY2U7HmfJw7Uh4A==} '@cosmjs/proto-signing@0.31.1': resolution: {integrity: sha512-hipbBVrssPu+jnmRzQRP5hhS/mbz2nU7RvxG/B1ZcdNhr1AtZC5DN09OTUoEpMSRgyQvScXmk/NTbyf+xmCgYg==} - '@cosmjs/socket@0.31.1': - resolution: {integrity: sha512-XTtEr+x3WGbqkzoGX0sCkwVqf5n+bBqDwqNgb+DWaBABQxHVRuuainrTVp0Yc91D3Iy2twLQzeBA9OrRxDSerw==} + '@cosmjs/socket@0.31.3': + resolution: {integrity: sha512-aqrDGGi7os/hsz5p++avI4L0ZushJ+ItnzbqA7C6hamFSCJwgOkXaOUs+K9hXZdX4rhY7rXO4PH9IH8q09JkTw==} '@cosmjs/stargate@0.31.1': resolution: {integrity: sha512-TqOJZYOH5W3sZIjR6949GfjhGXO3kSHQ3/KmE+SuKyMMmQ5fFZ45beawiRtVF0/CJg5RyPFyFGJKhb1Xxv3Lcg==} - '@cosmjs/stream@0.31.1': - resolution: {integrity: sha512-xsIGD9bpBvYYZASajCyOevh1H5pDdbOWmvb4UwGZ78doGVz3IC3Kb9BZKJHIX2fjq9CMdGVJHmlM+Zp5aM8yZA==} + '@cosmjs/stream@0.31.3': + resolution: {integrity: sha512-8keYyI7X0RjsLyVcZuBeNjSv5FA4IHwbFKx7H60NHFXszN8/MvXL6aZbNIvxtcIHHsW7K9QSQos26eoEWlAd+w==} - '@cosmjs/tendermint-rpc@0.31.1': - resolution: {integrity: sha512-KX+wwi725sSePqIxfMPPOqg+xTETV8BHGOBhRhCZXEl5Fq48UlXXq3/yG1sn7K67ADC0kqHqcCF41Wn1GxNNPA==} + '@cosmjs/tendermint-rpc@0.31.3': + resolution: {integrity: sha512-s3TiWkPCW4QceTQjpYqn4xttUJH36mTPqplMl+qyocdqk5+X5mergzExU/pHZRWQ4pbby8bnR7kMvG4OC1aZ8g==} '@cosmjs/utils@0.27.1': resolution: {integrity: sha512-VG7QPDiMUzVPxRdJahDV8PXxVdnuAHiIuG56hldV4yPnOz/si/DLNd7VAUUA5923b6jS1Hhev0Hr6AhEkcxBMg==} - '@cosmjs/utils@0.31.1': - resolution: {integrity: sha512-n4Se1wu4GnKwztQHNFfJvUeWcpvx3o8cWhSbNs9JQShEuB3nv3R5lqFBtDCgHZF/emFQAP+ZjF8bTfCs9UBGhA==} + '@cosmjs/utils@0.31.3': + resolution: {integrity: sha512-VBhAgzrrYdIe0O5IbKRqwszbQa7ZyQLx9nEQuHQ3HUplQW7P44COG/ye2n6AzCudtqxmwdX7nyX8ta1J07GoqA==} '@ctrl/tinycolor@3.4.1': resolution: {integrity: sha512-ej5oVy6lykXsvieQtqZxCOaLT+xD4+QNarq78cIYISHmZXshCvROLudpQN3lfL8G0NL7plMSSK+zlyvCaIJ4Iw==} @@ -230,8 +230,8 @@ packages: '@humanwhocodes/object-schema@1.2.1': resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - '@iconlake/client@0.6.0': - resolution: {integrity: sha512-wjbC7HuQ5u7FeGoq0fGpa66kDKW6jicOfTZQkKkcLZ5BJgK5r4+uQxRP7UI5ALPXGDGrJmL5QblIvLCQmW3IiQ==} + '@iconlake/client@1.0.0': + resolution: {integrity: sha512-zXXiRazXMMFyopBFrbQnk1nScjUY7iAWQeqPOYIvvDfo/oiE8PkN9du7LgfRySP69VkKwfKXCqzioAVzGOmVEQ==} peerDependencies: '@cosmjs/launchpad': 0.27.1 '@cosmjs/proto-signing': 0.31.1 @@ -263,8 +263,8 @@ packages: '@keplr-wallet/types@0.12.16': resolution: {integrity: sha512-13V/6swfg0jBaMamkt4X2nJ83l1y0WM81l3MMhfsDutumrENYnVqflGMvdu9RNNtn2VR8IwiAYLr8iS6/a+Q4Q==} - '@noble/hashes@1.3.1': - resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} + '@noble/hashes@1.4.0': + resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} '@nodelib/fs.scandir@2.1.5': @@ -676,12 +676,16 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + define-properties@1.1.4: resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} engines: {node: '>= 0.4'} - define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} delayed-stream@1.0.0: @@ -704,8 +708,8 @@ packages: peerDependencies: vue: ^3.2.0 - elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + elliptic@6.5.6: + resolution: {integrity: sha512-mpzdtpeCLuS3BmE3pO3Cpp5bbjlOPY2Q0PgoF+Od1XZrHLYI28Xe3ossCmYCQt11FQKEYd9+PF8jymTvtWJSHQ==} error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -714,6 +718,14 @@ packages: resolution: {integrity: sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==} engines: {node: '>= 0.4'} + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + es-module-lexer@0.10.5: resolution: {integrity: sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==} @@ -973,6 +985,9 @@ packages: function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + function.prototype.name@1.1.5: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} engines: {node: '>= 0.4'} @@ -983,6 +998,10 @@ packages: get-intrinsic@1.1.2: resolution: {integrity: sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==} + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} @@ -1002,14 +1021,17 @@ packages: resolution: {integrity: sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==} engines: {node: '>=8'} - globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + graceful-fs@4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} @@ -1033,6 +1055,10 @@ packages: has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} @@ -1052,6 +1078,10 @@ packages: hash.js@1.1.7: resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true @@ -1202,17 +1232,17 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - libsodium-sumo@0.7.11: - resolution: {integrity: sha512-bY+7ph7xpk51Ez2GbE10lXAQ5sJma6NghcIDaSPbM/G9elfrjLa0COHl/7P6Wb/JizQzl5UQontOOP1z0VwbLA==} + libsodium-sumo@0.7.14: + resolution: {integrity: sha512-2nDge6qlAjcwyslAhWfVumlkeSNK5+WCfKa2/VEq9prvlT5vP2FR0m0o5hmKaYqfsZ4TQVj5czQsimZvXDB1CQ==} - libsodium-wrappers-sumo@0.7.11: - resolution: {integrity: sha512-DGypHOmJbB1nZn89KIfGOAkDgfv5N6SBGC3Qvmy/On0P0WD1JQvNRS/e3UL3aFF+xC0m+MYz5M+MnRnK2HMrKQ==} + libsodium-wrappers-sumo@0.7.14: + resolution: {integrity: sha512-0lm7ZwN5a95J2yUi8R1rgQeeaVDIWnvNzgVmXmZswis4mC+bQtbDrB+QpJlL4qklaKx3hVpJjoc6ubzJFiv64Q==} - libsodium-wrappers@0.7.11: - resolution: {integrity: sha512-SrcLtXj7BM19vUKtQuyQKiQCRJPgbpauzl3s0rSwD+60wtHqSUuqcoawlMDheCJga85nKOQwxNYQxf/CKAvs6Q==} + libsodium-wrappers@0.7.14: + resolution: {integrity: sha512-300TtsePizhJZ7HjLmWr6hLHAgJUxIGhapSw+EwfCtDuWaEmEdGXSQv6j6qFw0bs9l4vS2NH9BtOHfXAq6h5kQ==} - libsodium@0.7.11: - resolution: {integrity: sha512-WPfJ7sS53I2s4iM58QxY3Inb83/6mjlYgcmZs7DJsvDlnmVUwNinBCi5vBT43P6bHRy01O4zsMU2CoVR6xJ40A==} + libsodium@0.7.14: + resolution: {integrity: sha512-/pOd7eO6oZrfORquRTC4284OUJFcMi8F3Vnc9xtRBT0teLfOUxWIItaBFF3odYjZ7nlJNwnLdUVEUFHxVyX/Sw==} lie@3.3.0: resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} @@ -1437,12 +1467,12 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - protobufjs@6.11.3: - resolution: {integrity: sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==} + protobufjs@6.11.4: + resolution: {integrity: sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==} hasBin: true - protobufjs@7.2.4: - resolution: {integrity: sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==} + protobufjs@7.3.2: + resolution: {integrity: sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==} engines: {node: '>=12.0.0'} punycode@2.1.1: @@ -1601,9 +1631,6 @@ packages: string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -1785,8 +1812,8 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@7.5.9: - resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + ws@7.5.10: + resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} engines: {node: '>=8.3.0'} peerDependencies: bufferutil: ^4.0.1 @@ -1831,8 +1858,8 @@ snapshots: '@confio/ics23@0.6.8': dependencies: - '@noble/hashes': 1.3.1 - protobufjs: 6.11.3 + '@noble/hashes': 1.4.0 + protobufjs: 6.11.4 '@cosmjs/amino@0.27.1': dependencies: @@ -1841,12 +1868,12 @@ snapshots: '@cosmjs/math': 0.27.1 '@cosmjs/utils': 0.27.1 - '@cosmjs/amino@0.31.1': + '@cosmjs/amino@0.31.3': dependencies: - '@cosmjs/crypto': 0.31.1 + '@cosmjs/crypto': 0.31.3 '@cosmjs/encoding': 0.31.3 - '@cosmjs/math': 0.31.1 - '@cosmjs/utils': 0.31.1 + '@cosmjs/math': 0.31.3 + '@cosmjs/utils': 0.31.3 '@cosmjs/crypto@0.27.1': dependencies: @@ -1855,21 +1882,21 @@ snapshots: '@cosmjs/utils': 0.27.1 bip39: 3.1.0 bn.js: 5.2.1 - elliptic: 6.5.4 + elliptic: 6.5.6 js-sha3: 0.8.0 - libsodium-wrappers: 0.7.11 + libsodium-wrappers: 0.7.14 ripemd160: 2.0.2 sha.js: 2.4.11 - '@cosmjs/crypto@0.31.1': + '@cosmjs/crypto@0.31.3': dependencies: '@cosmjs/encoding': 0.31.3 - '@cosmjs/math': 0.31.1 - '@cosmjs/utils': 0.31.1 - '@noble/hashes': 1.3.1 + '@cosmjs/math': 0.31.3 + '@cosmjs/utils': 0.31.3 + '@noble/hashes': 1.4.0 bn.js: 5.2.1 - elliptic: 6.5.4 - libsodium-wrappers-sumo: 0.7.11 + elliptic: 6.5.6 + libsodium-wrappers-sumo: 0.7.14 '@cosmjs/encoding@0.27.1': dependencies: @@ -1883,9 +1910,9 @@ snapshots: bech32: 1.1.4 readonly-date: 1.0.0 - '@cosmjs/json-rpc@0.31.1': + '@cosmjs/json-rpc@0.31.3': dependencies: - '@cosmjs/stream': 0.31.1 + '@cosmjs/stream': 0.31.3 xstream: 11.14.0 '@cosmjs/launchpad@0.27.1': @@ -1904,25 +1931,25 @@ snapshots: dependencies: bn.js: 5.2.1 - '@cosmjs/math@0.31.1': + '@cosmjs/math@0.31.3': dependencies: bn.js: 5.2.1 '@cosmjs/proto-signing@0.31.1': dependencies: - '@cosmjs/amino': 0.31.1 - '@cosmjs/crypto': 0.31.1 + '@cosmjs/amino': 0.31.3 + '@cosmjs/crypto': 0.31.3 '@cosmjs/encoding': 0.31.3 - '@cosmjs/math': 0.31.1 - '@cosmjs/utils': 0.31.1 + '@cosmjs/math': 0.31.3 + '@cosmjs/utils': 0.31.3 cosmjs-types: 0.8.0 long: 4.0.0 - '@cosmjs/socket@0.31.1': + '@cosmjs/socket@0.31.3': dependencies: - '@cosmjs/stream': 0.31.1 - isomorphic-ws: 4.0.1(ws@7.5.9) - ws: 7.5.9 + '@cosmjs/stream': 0.31.3 + isomorphic-ws: 4.0.1(ws@7.5.10) + ws: 7.5.10 xstream: 11.14.0 transitivePeerDependencies: - bufferutil @@ -1931,35 +1958,35 @@ snapshots: '@cosmjs/stargate@0.31.1': dependencies: '@confio/ics23': 0.6.8 - '@cosmjs/amino': 0.31.1 + '@cosmjs/amino': 0.31.3 '@cosmjs/encoding': 0.31.3 - '@cosmjs/math': 0.31.1 + '@cosmjs/math': 0.31.3 '@cosmjs/proto-signing': 0.31.1 - '@cosmjs/stream': 0.31.1 - '@cosmjs/tendermint-rpc': 0.31.1 - '@cosmjs/utils': 0.31.1 + '@cosmjs/stream': 0.31.3 + '@cosmjs/tendermint-rpc': 0.31.3 + '@cosmjs/utils': 0.31.3 cosmjs-types: 0.8.0 long: 4.0.0 - protobufjs: 6.11.3 + protobufjs: 6.11.4 xstream: 11.14.0 transitivePeerDependencies: - bufferutil - debug - utf-8-validate - '@cosmjs/stream@0.31.1': + '@cosmjs/stream@0.31.3': dependencies: xstream: 11.14.0 - '@cosmjs/tendermint-rpc@0.31.1': + '@cosmjs/tendermint-rpc@0.31.3': dependencies: - '@cosmjs/crypto': 0.31.1 + '@cosmjs/crypto': 0.31.3 '@cosmjs/encoding': 0.31.3 - '@cosmjs/json-rpc': 0.31.1 - '@cosmjs/math': 0.31.1 - '@cosmjs/socket': 0.31.1 - '@cosmjs/stream': 0.31.1 - '@cosmjs/utils': 0.31.1 + '@cosmjs/json-rpc': 0.31.3 + '@cosmjs/math': 0.31.3 + '@cosmjs/socket': 0.31.3 + '@cosmjs/stream': 0.31.3 + '@cosmjs/utils': 0.31.3 axios: 0.21.4 readonly-date: 1.0.0 xstream: 11.14.0 @@ -1970,7 +1997,7 @@ snapshots: '@cosmjs/utils@0.27.1': {} - '@cosmjs/utils@0.31.1': {} + '@cosmjs/utils@0.31.3': {} '@ctrl/tinycolor@3.4.1': {} @@ -2025,7 +2052,7 @@ snapshots: '@humanwhocodes/object-schema@1.2.1': {} - '@iconlake/client@0.6.0(@cosmjs/launchpad@0.27.1)(@cosmjs/proto-signing@0.31.1)(@cosmjs/stargate@0.31.1)': + '@iconlake/client@1.0.0(@cosmjs/launchpad@0.27.1)(@cosmjs/proto-signing@0.31.1)(@cosmjs/stargate@0.31.1)': dependencies: '@cosmjs/launchpad': 0.27.1 '@cosmjs/proto-signing': 0.31.1 @@ -2034,7 +2061,7 @@ snapshots: buffer: 6.0.3 events: 3.3.0 long: 5.2.3 - protobufjs: 7.2.4 + protobufjs: 7.3.2 transitivePeerDependencies: - debug @@ -2067,7 +2094,7 @@ snapshots: dependencies: long: 4.0.0 - '@noble/hashes@1.3.1': {} + '@noble/hashes@1.4.0': {} '@nodelib/fs.scandir@2.1.5': dependencies: @@ -2417,7 +2444,7 @@ snapshots: bip39@3.1.0: dependencies: - '@noble/hashes': 1.3.1 + '@noble/hashes': 1.4.0 bn.js@4.12.0: {} @@ -2498,7 +2525,7 @@ snapshots: cosmjs-types@0.8.0: dependencies: long: 4.0.0 - protobufjs: 6.11.3 + protobufjs: 6.11.4 cross-spawn@6.0.5: dependencies: @@ -2530,13 +2557,20 @@ snapshots: deep-is@0.1.4: {} + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + define-properties@1.1.4: dependencies: has-property-descriptors: 1.0.0 object-keys: 1.1.1 - define-properties@1.2.0: + define-properties@1.2.1: dependencies: + define-data-property: 1.1.4 has-property-descriptors: 1.0.0 object-keys: 1.1.1 @@ -2573,7 +2607,7 @@ snapshots: transitivePeerDependencies: - '@vue/composition-api' - elliptic@6.5.4: + elliptic@6.5.6: dependencies: bn.js: 4.12.0 brorand: 1.1.0 @@ -2613,6 +2647,12 @@ snapshots: string.prototype.trimstart: 1.0.5 unbox-primitive: 1.0.2 + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + es-module-lexer@0.10.5: {} es-to-primitive@1.2.1: @@ -2860,6 +2900,8 @@ snapshots: function-bind@1.1.1: {} + function-bind@1.1.2: {} + function.prototype.name@1.1.5: dependencies: call-bind: 1.0.2 @@ -2875,6 +2917,14 @@ snapshots: has: 1.0.3 has-symbols: 1.0.3 + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + get-symbol-description@1.0.0: dependencies: call-bind: 1.0.2 @@ -2901,9 +2951,10 @@ snapshots: dependencies: type-fest: 0.20.2 - globalthis@1.0.3: + globalthis@1.0.4: dependencies: - define-properties: 1.2.0 + define-properties: 1.2.1 + gopd: 1.0.1 globby@11.1.0: dependencies: @@ -2914,6 +2965,10 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 + graceful-fs@4.2.10: {} grapheme-splitter@1.0.4: {} @@ -2930,6 +2985,8 @@ snapshots: dependencies: get-intrinsic: 1.1.2 + has-proto@1.0.3: {} + has-symbols@1.0.3: {} has-tostringtag@1.0.0: @@ -2951,6 +3008,10 @@ snapshots: inherits: 2.0.4 minimalistic-assert: 1.0.1 + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + he@1.2.0: {} hmac-drbg@1.0.1: @@ -3057,9 +3118,9 @@ snapshots: isexe@2.0.0: {} - isomorphic-ws@4.0.1(ws@7.5.9): + isomorphic-ws@4.0.1(ws@7.5.10): dependencies: - ws: 7.5.9 + ws: 7.5.10 js-cookie@3.0.5: {} @@ -3087,17 +3148,17 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - libsodium-sumo@0.7.11: {} + libsodium-sumo@0.7.14: {} - libsodium-wrappers-sumo@0.7.11: + libsodium-wrappers-sumo@0.7.14: dependencies: - libsodium-sumo: 0.7.11 + libsodium-sumo: 0.7.14 - libsodium-wrappers@0.7.11: + libsodium-wrappers@0.7.14: dependencies: - libsodium: 0.7.11 + libsodium: 0.7.14 - libsodium@0.7.11: {} + libsodium@0.7.14: {} lie@3.3.0: dependencies: @@ -3300,7 +3361,7 @@ snapshots: process-nextick-args@2.0.1: {} - protobufjs@6.11.3: + protobufjs@6.11.4: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2 @@ -3316,7 +3377,7 @@ snapshots: '@types/node': 18.16.19 long: 4.0.0 - protobufjs@7.2.4: + protobufjs@7.3.2: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2 @@ -3354,7 +3415,7 @@ snapshots: readable-stream@3.6.2: dependencies: inherits: 2.0.4 - string_decoder: 1.3.0 + string_decoder: 1.1.1 util-deprecate: 1.0.2 readdirp@3.6.0: @@ -3425,7 +3486,7 @@ snapshots: sha.js@2.4.11: dependencies: inherits: 2.0.4 - safe-buffer: 5.2.1 + safe-buffer: 5.1.2 shebang-command@1.2.0: dependencies: @@ -3491,10 +3552,6 @@ snapshots: dependencies: safe-buffer: 5.1.2 - string_decoder@1.3.0: - dependencies: - safe-buffer: 5.2.1 - strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -3662,13 +3719,13 @@ snapshots: wrappy@1.0.2: {} - ws@7.5.9: {} + ws@7.5.10: {} xml-name-validator@4.0.0: {} xstream@11.14.0: dependencies: - globalthis: 1.0.3 + globalthis: 1.0.4 symbol-observable: 2.0.3 yallist@4.0.0: {} diff --git a/www/src/apis/blockchain.ts b/www/src/apis/blockchain.ts index 846cebe..e677d12 100644 --- a/www/src/apis/blockchain.ts +++ b/www/src/apis/blockchain.ts @@ -1,12 +1,10 @@ import { CHAIN_ID, DROP_DENOM_MINI, IS_PRODUCTION } from '@/utils/const' -import request, { handleResponse } from '@/utils/request' +import request from '@/utils/request' import { Client } from '@iconlake/client' -import type { V1Beta1GetTxResponse } from '@iconlake/client/types/cosmos.tx.v1beta1/rest' -import type { DropQueryGetInfoResponse } from '@iconlake/client/types/iconlake.drop/rest' import type { MsgMint as MsgMintIcon, MsgBurn as MsgBurnIcon, MsgUpdateClass } from '@iconlake/client/types/iconlake.icon/module' -import type { IconQueryHashResponse, IconlakeiconQueryClassResponse, IconlakeiconQueryNFTsResponse } from '@iconlake/client/types/iconlake.icon/rest' import { SHA256, lib } from 'crypto-js' import i18n from '@/i18n' +import { toast } from '@/utils' const baseURL = '/api/blockchain/' @@ -37,9 +35,12 @@ export const client = new Client(env) let isKeplrDetected = false export async function detectKeplr() { - if (isKeplrDetected) return + if (isKeplrDetected) { + return window.keplr + } if (!window.keplr) { - alert('Please install keplr extension'); + toast('Please install keplr extension'); + throw new Error('keplr extension not found') } else { const chainId = CHAIN_ID; try { @@ -58,34 +59,65 @@ export async function detectKeplr() { client.useSigner(offlineSigner) isKeplrDetected = true } + return window.keplr } export async function getBalance(address: string, denom: string) { - const res = await client.CosmosBankV1Beta1.query.queryBalance(address, { - denom + const res = await fetch(`${apiURL}/cosmos/bank/v1beta1/balances/${address}?denom=${denom}`).then<{ + balances: { + amount: string; + denom: string; + }[] + }>(res => res.json()).catch((e) => { + console.error(e) + return { balances: [] } }) - return res.data.balance + return res.balances.find(balance => balance.denom === denom) } -export async function getAccount() { - await detectKeplr() - if (!window.keplr) return - const offlineSigner = window.keplr.getOfflineSigner(CHAIN_ID) - const accounts = await offlineSigner.getAccounts() +export async function getAccount(address?: string) { + const keplr = await detectKeplr() + const offlineSigner = keplr.getOfflineSigner(CHAIN_ID) + const accounts = await offlineSigner.getAccounts().catch((e) => { + console.error(e) + toast.error(t('cannotGetKeplrAccount')) + return [] + }) + if (address) { + const account = accounts.find(account => account.address === address) + if (!account) { + toast.error(t('activeKeplrAccountAs', { addr: address })) + } else { + return account + } + } return accounts[0] } export async function getChainAccount(address: string) { - const res = await client.CosmosAuthV1Beta1.query.queryAccount(address) - return res + const res = await fetch(`${apiURL}/cosmos/auth/v1beta1/accounts/${address}`).then<{ + account: { + '@type': string; + address: string; + pub_key: { + '@type': string; + value: string; + }; + account_number: string; + sequence: string; + } + }>(res => res.json()).catch((e) => { + console.error(e) + return { account: undefined } + }) + return res.account } export async function mintDrop(address: string, amount: string) { await detectKeplr() - if (!isKeplrDetected) return - const account = await getAccount() - if (!account || account.address !== address) { - return Promise.reject(new Error(t('activeKeplrAccountAs', { addr: address }))) + const account = await getAccount(address) + if (!account) { + return undefined } const res = await client.IconlakeDrop.tx.sendMsgMint({ value: { @@ -96,16 +128,25 @@ export async function mintDrop(address: string, amount: string) { } }, fee + }).catch((err) => { + console.error(err) + toast.error(err.message ?? t('fail')) + return undefined }) return res } export async function signMsg(msg: string) { - await detectKeplr() - if (!window.keplr) return + const keplr = await detectKeplr() const account = await getAccount() - if (!account) return - const res = await window.keplr.signArbitrary(CHAIN_ID, account.address, msg) + if (!account) { + return undefined + } + const res = await keplr.signArbitrary(CHAIN_ID, account.address, msg).catch((err) => { + console.error(err) + toast.error(err.message ?? t('fail')) + return undefined + }) return res } @@ -113,52 +154,61 @@ export async function getHash(uri: string) { const res = await client.IconlakeIcon.query.queryHash({ hash_type: 'p', uri + }).catch((err) => { + console.error(err) + return undefined }) - return await new Promise((resolve: (v: IconQueryHashResponse) => void, reject) => { - handleResponse(res as any, resolve, reject); - }) + return res?.data } export async function mintIcon(value: MsgMintIcon) { await detectKeplr() - if (!isKeplrDetected) return - const account = await getAccount() - if (!account || account.address !== value.creator) { - return Promise.reject(new Error(t('activeKeplrAccountAs', { addr: value.creator }))) + const account = await getAccount(value.creator) + if (!account) { + return undefined } const res = await client.IconlakeIcon.tx.sendMsgMint({ value, fee + }).catch((err) => { + console.error(err) + toast.error(err.message ?? t('fail')) + return undefined }) return res } export async function burnIcon(value: MsgBurnIcon) { await detectKeplr() - if (!isKeplrDetected) return - const account = await getAccount() - if (!account || account.address !== value.creator) { - return Promise.reject(new Error(t('activeKeplrAccountAs', { addr: value.creator }))) + const account = await getAccount(value.creator) + if (!account) { + return undefined } const res = await client.IconlakeIcon.tx.sendMsgBurn({ value, fee + }).catch((err) => { + console.error(err) + toast.error(err.message ?? t('fail')) + return undefined }) return res } export async function getTx(txHash: string) { - const res = await client.CosmosTxV1Beta1.query.serviceGetTx(txHash) - return await new Promise((resolve: (v: V1Beta1GetTxResponse) => void, reject) => { - handleResponse(res as any, resolve, reject); + const res = await fetch(`${apiURL}/cosmos/tx/v1beta1/txs/${txHash}`).then(res => res.json()).catch((e) => { + console.error(e) + return { tx: undefined } }) + return res.tx } export async function getDropInfo(address: string) { - const res = await client.IconlakeDrop.query.queryInfo(address) - return await new Promise((resolve: (v: DropQueryGetInfoResponse) => void, reject) => { - handleResponse(res as any, resolve, reject); + const res = await client.IconlakeDrop.query.queryInfo(address).catch((e) => { + console.error(e) + return undefined }) + return res?.data.info } export async function initDrop(creator: string, address: string, isBackendService: boolean) { @@ -168,16 +218,19 @@ export async function initDrop(creator: string, address: string, isBackendServic }) } await detectKeplr() - if (!isKeplrDetected) return - const account = await getAccount() - if (!account || account.address !== creator) { - return Promise.reject(new Error(t('activeKeplrAccountAs', { addr: creator }))) + const account = await getAccount(creator) + if (!account) { + return undefined } return await client.IconlakeDrop.tx.sendMsgInit({ value: { creator, address, } + }).catch((err) => { + console.error(err) + toast.error(err.message ?? t('fail')) + return undefined }) } @@ -186,28 +239,33 @@ export async function getNFTs(q: { }) { const res = await client.IconlakeIcon.query.queryNFTs({ owner: q.owner + }).catch((e) => { + console.error(e) + return undefined }) - return await new Promise((resolve: (v: IconlakeiconQueryNFTsResponse) => void, reject) => { - handleResponse(res as any, resolve, reject); - }) + return res?.data } export async function getNftClass(id: string) { - const res = await client.IconlakeIcon.query.queryClass({ id }) - return await new Promise((resolve: (v: IconlakeiconQueryClassResponse) => void, reject) => { - handleResponse(res as any, resolve, reject); + const res = await client.IconlakeIcon.query.queryClass({ id }).catch((e) => { + console.error(e) + return undefined }) + return res?.data } export async function updateClass(value: MsgUpdateClass) { await detectKeplr() - if (!isKeplrDetected) return - const account = await getAccount() - if (!account || account.address !== value.creator) { - return Promise.reject(new Error(t('activeKeplrAccountAs', { addr: value.creator }))) + const account = await getAccount(value.creator) + if (!account) { + return undefined } const res = await client.IconlakeIcon.tx.sendMsgUpdateClass({ value + }).catch((err) => { + console.error(err) + toast.error(err.message ?? t('updateFailed')) + return undefined }) return res } @@ -223,18 +281,23 @@ export async function verifyUriHash(uri: string | undefined, hash: string | unde checked: false } } - const blob = await fetch(uri, { + const res = await fetch(uri, { headers: { "Cache-Control": "no-cache" } - }).then(e => e.blob()) - const file = await blob.arrayBuffer() + }).then(e => e.blob()).catch(() => undefined) + if (!res) { + return { + checked: false + } + } + const file = await res.arrayBuffer() const words = lib.WordArray.create() ;(words as any).init(file) const fileHash = SHA256(words) return { checked: hash === fileHash.toString(), - url: URL.createObjectURL(blob) + url: URL.createObjectURL(res) } } diff --git a/www/src/i18n/messages/en-us.json b/www/src/i18n/messages/en-us.json index 36f8eec..7859e91 100644 --- a/www/src/i18n/messages/en-us.json +++ b/www/src/i18n/messages/en-us.json @@ -176,5 +176,7 @@ "clearCacheDone&Reload": "Cache has been cleared, the page will be reloaded soon", "loggingOut": "Cleaning up data and logging out, please wait a moment", "userAuthError": "Your login information is incorrect, please log in again", - "permissionDenied": "You don't have permission to perform this operation" + "permissionDenied": "You don't have permission to perform this operation", + "cannotGetKeplrAccount": "Failed to get Keplr account, please authorize and try again", + "txNotFound": "Transaction not found" } diff --git a/www/src/i18n/messages/zh-cn.json b/www/src/i18n/messages/zh-cn.json index 08791b1..287edc9 100644 --- a/www/src/i18n/messages/zh-cn.json +++ b/www/src/i18n/messages/zh-cn.json @@ -176,5 +176,7 @@ "clearCacheDone&Reload": "清除缓存成功,页面即将刷新", "loggingOut": "正在清理数据并退出登录,请稍等片刻", "userAuthError": "你的登录信息有误,请重新登录!", - "permissionDenied": "你没有权限执行这个操作" + "permissionDenied": "你没有权限执行这个操作", + "cannotGetKeplrAccount": "无法通过Keplr获取iconLake账户,请授权后重试", + "txNotFound": "交易未找到" } diff --git a/www/src/views/icons/Protect.vue b/www/src/views/icons/Protect.vue index b8fcce3..be99205 100644 --- a/www/src/views/icons/Protect.vue +++ b/www/src/views/icons/Protect.vue @@ -1,6 +1,6 @@