diff --git a/packages/proto-signing/package.json b/packages/proto-signing/package.json index 8a6c5001..194731d9 100644 --- a/packages/proto-signing/package.json +++ b/packages/proto-signing/package.json @@ -42,7 +42,7 @@ "coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet", "pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js", "preget-proto": "shx rm -rf proto", - "get-proto": "REF=v0.40.0-rc3 ./scripts/get-proto.sh", + "get-proto": "REF=v0.40.0 ./scripts/get-proto.sh", "predefine-proto": "./scripts/predefine-proto.sh", "define-proto": "./scripts/define-proto.sh", "postdefine-proto": "prettier --write \"src/codec/generated/codecimpl.*\"" diff --git a/packages/stargate/README.md b/packages/stargate/README.md index 24f24ce0..2458063f 100644 --- a/packages/stargate/README.md +++ b/packages/stargate/README.md @@ -8,6 +8,7 @@ A client library for the Cosmos SDK 0.40. | CosmJS version | Supported Cosmos SDK version(s) | | ------------------------------- | ------------------------------- | +| ^0.24.0-alpha.14 | 0.40.0 | | ^0.24.0-alpha.8 | 0.40.0-rc3 | | 0.24.0-alpha.2 – 0.24.0-alpha.7 | 0.40.0-rc2 | | 0.24.0-alpha.1 | 0.40.0-rc1 | diff --git a/packages/stargate/package.json b/packages/stargate/package.json index 8f7b981f..fc751ad2 100644 --- a/packages/stargate/package.json +++ b/packages/stargate/package.json @@ -41,7 +41,7 @@ "coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet", "pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js", "preget-proto": "shx rm -rf proto", - "get-proto": "REF=v0.40.0-rc3 ./scripts/get-proto.sh", + "get-proto": "REF=v0.40.0 ./scripts/get-proto.sh", "predefine-proto": "./scripts/predefine-proto.sh", "define-proto": "./scripts/define-proto.sh", "postdefine-proto": "prettier --write \"src/codec/generated/codecimpl.*\"" diff --git a/packages/stargate/scripts/predefine-proto.sh b/packages/stargate/scripts/predefine-proto.sh index 84d66503..6556bbdd 100755 --- a/packages/stargate/scripts/predefine-proto.sh +++ b/packages/stargate/scripts/predefine-proto.sh @@ -6,6 +6,7 @@ GENERATED_DIR="./tmp" ROOT_PROTO_DIR="./proto/cosmos/cosmos-sdk" COSMOS_PROTO_DIR="$ROOT_PROTO_DIR/proto/cosmos" IBC_PROTO_DIR="$ROOT_PROTO_DIR/proto/ibc" +CONFIO_PROTO_DIR="$ROOT_PROTO_DIR/third_party/proto/confio" TENDERMINT_PROTO_DIR="$ROOT_PROTO_DIR/third_party/proto/tendermint" mkdir -p "$GENERATED_DIR" @@ -40,6 +41,7 @@ yarn pbjs \ "$IBC_PROTO_DIR/core/commitment/v1/commitment.proto" \ "$IBC_PROTO_DIR/core/connection/v1/connection.proto" \ "$IBC_PROTO_DIR/core/connection/v1/query.proto" \ + "$CONFIO_PROTO_DIR/proofs.proto" \ "$TENDERMINT_PROTO_DIR/abci/types.proto" \ "$TENDERMINT_PROTO_DIR/crypto/keys.proto" \ "$TENDERMINT_PROTO_DIR/crypto/proof.proto" \ diff --git a/packages/stargate/src/codec/generated/codecimpl.d.ts b/packages/stargate/src/codec/generated/codecimpl.d.ts index a77fe446..32dd36f8 100644 --- a/packages/stargate/src/codec/generated/codecimpl.d.ts +++ b/packages/stargate/src/codec/generated/codecimpl.d.ts @@ -9228,11 +9228,11 @@ export namespace ibc { /** QueryChannelConsensusStateRequest channelId */ channelId?: string | null; - /** QueryChannelConsensusStateRequest versionNumber */ - versionNumber?: Long | null; + /** QueryChannelConsensusStateRequest revisionNumber */ + revisionNumber?: Long | null; - /** QueryChannelConsensusStateRequest versionHeight */ - versionHeight?: Long | null; + /** QueryChannelConsensusStateRequest revisionHeight */ + revisionHeight?: Long | null; } /** Represents a QueryChannelConsensusStateRequest. */ @@ -9249,11 +9249,11 @@ export namespace ibc { /** QueryChannelConsensusStateRequest channelId. */ public channelId: string; - /** QueryChannelConsensusStateRequest versionNumber. */ - public versionNumber: Long; + /** QueryChannelConsensusStateRequest revisionNumber. */ + public revisionNumber: Long; - /** QueryChannelConsensusStateRequest versionHeight. */ - public versionHeight: Long; + /** QueryChannelConsensusStateRequest revisionHeight. */ + public revisionHeight: Long; /** * Creates a new QueryChannelConsensusStateRequest instance using the specified properties. @@ -10354,598 +10354,6 @@ export namespace ibc { namespace client { /** Namespace v1. */ namespace v1 { - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - /** - * Constructs a new Msg service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Msg service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create( - rpcImpl: $protobuf.RPCImpl, - requestDelimited?: boolean, - responseDelimited?: boolean, - ): Msg; - - /** - * Calls CreateClient. - * @param request MsgCreateClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgCreateClientResponse - */ - public createClient( - request: ibc.core.client.v1.IMsgCreateClient, - callback: ibc.core.client.v1.Msg.CreateClientCallback, - ): void; - - /** - * Calls CreateClient. - * @param request MsgCreateClient message or plain object - * @returns Promise - */ - public createClient( - request: ibc.core.client.v1.IMsgCreateClient, - ): Promise; - - /** - * Calls UpdateClient. - * @param request MsgUpdateClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateClientResponse - */ - public updateClient( - request: ibc.core.client.v1.IMsgUpdateClient, - callback: ibc.core.client.v1.Msg.UpdateClientCallback, - ): void; - - /** - * Calls UpdateClient. - * @param request MsgUpdateClient message or plain object - * @returns Promise - */ - public updateClient( - request: ibc.core.client.v1.IMsgUpdateClient, - ): Promise; - - /** - * Calls UpgradeClient. - * @param request MsgUpgradeClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpgradeClientResponse - */ - public upgradeClient( - request: ibc.core.client.v1.IMsgUpgradeClient, - callback: ibc.core.client.v1.Msg.UpgradeClientCallback, - ): void; - - /** - * Calls UpgradeClient. - * @param request MsgUpgradeClient message or plain object - * @returns Promise - */ - public upgradeClient( - request: ibc.core.client.v1.IMsgUpgradeClient, - ): Promise; - - /** - * Calls SubmitMisbehaviour. - * @param request MsgSubmitMisbehaviour message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSubmitMisbehaviourResponse - */ - public submitMisbehaviour( - request: ibc.core.client.v1.IMsgSubmitMisbehaviour, - callback: ibc.core.client.v1.Msg.SubmitMisbehaviourCallback, - ): void; - - /** - * Calls SubmitMisbehaviour. - * @param request MsgSubmitMisbehaviour message or plain object - * @returns Promise - */ - public submitMisbehaviour( - request: ibc.core.client.v1.IMsgSubmitMisbehaviour, - ): Promise; - } - - namespace Msg { - /** - * Callback as used by {@link ibc.core.client.v1.Msg#createClient}. - * @param error Error, if any - * @param [response] MsgCreateClientResponse - */ - type CreateClientCallback = ( - error: Error | null, - response?: ibc.core.client.v1.MsgCreateClientResponse, - ) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#updateClient}. - * @param error Error, if any - * @param [response] MsgUpdateClientResponse - */ - type UpdateClientCallback = ( - error: Error | null, - response?: ibc.core.client.v1.MsgUpdateClientResponse, - ) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#upgradeClient}. - * @param error Error, if any - * @param [response] MsgUpgradeClientResponse - */ - type UpgradeClientCallback = ( - error: Error | null, - response?: ibc.core.client.v1.MsgUpgradeClientResponse, - ) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#submitMisbehaviour}. - * @param error Error, if any - * @param [response] MsgSubmitMisbehaviourResponse - */ - type SubmitMisbehaviourCallback = ( - error: Error | null, - response?: ibc.core.client.v1.MsgSubmitMisbehaviourResponse, - ) => void; - } - - /** Properties of a MsgCreateClient. */ - interface IMsgCreateClient { - /** MsgCreateClient clientId */ - clientId?: string | null; - - /** MsgCreateClient clientState */ - clientState?: google.protobuf.IAny | null; - - /** MsgCreateClient consensusState */ - consensusState?: google.protobuf.IAny | null; - - /** MsgCreateClient signer */ - signer?: string | null; - } - - /** Represents a MsgCreateClient. */ - class MsgCreateClient implements IMsgCreateClient { - /** - * Constructs a new MsgCreateClient. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgCreateClient); - - /** MsgCreateClient clientId. */ - public clientId: string; - - /** MsgCreateClient clientState. */ - public clientState?: google.protobuf.IAny | null; - - /** MsgCreateClient consensusState. */ - public consensusState?: google.protobuf.IAny | null; - - /** MsgCreateClient signer. */ - public signer: string; - - /** - * Creates a new MsgCreateClient instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgCreateClient instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgCreateClient, - ): ibc.core.client.v1.MsgCreateClient; - - /** - * Encodes the specified MsgCreateClient message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. - * @param m MsgCreateClient message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgCreateClient, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgCreateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgCreateClient; - } - - /** Properties of a MsgCreateClientResponse. */ - interface IMsgCreateClientResponse {} - - /** Represents a MsgCreateClientResponse. */ - class MsgCreateClientResponse implements IMsgCreateClientResponse { - /** - * Constructs a new MsgCreateClientResponse. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgCreateClientResponse); - - /** - * Creates a new MsgCreateClientResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgCreateClientResponse instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgCreateClientResponse, - ): ibc.core.client.v1.MsgCreateClientResponse; - - /** - * Encodes the specified MsgCreateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. - * @param m MsgCreateClientResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgCreateClientResponse, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgCreateClientResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgCreateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgCreateClientResponse; - } - - /** Properties of a MsgUpdateClient. */ - interface IMsgUpdateClient { - /** MsgUpdateClient clientId */ - clientId?: string | null; - - /** MsgUpdateClient header */ - header?: google.protobuf.IAny | null; - - /** MsgUpdateClient signer */ - signer?: string | null; - } - - /** Represents a MsgUpdateClient. */ - class MsgUpdateClient implements IMsgUpdateClient { - /** - * Constructs a new MsgUpdateClient. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgUpdateClient); - - /** MsgUpdateClient clientId. */ - public clientId: string; - - /** MsgUpdateClient header. */ - public header?: google.protobuf.IAny | null; - - /** MsgUpdateClient signer. */ - public signer: string; - - /** - * Creates a new MsgUpdateClient instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUpdateClient instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgUpdateClient, - ): ibc.core.client.v1.MsgUpdateClient; - - /** - * Encodes the specified MsgUpdateClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. - * @param m MsgUpdateClient message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgUpdateClient, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUpdateClient message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUpdateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgUpdateClient; - } - - /** Properties of a MsgUpdateClientResponse. */ - interface IMsgUpdateClientResponse {} - - /** Represents a MsgUpdateClientResponse. */ - class MsgUpdateClientResponse implements IMsgUpdateClientResponse { - /** - * Constructs a new MsgUpdateClientResponse. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgUpdateClientResponse); - - /** - * Creates a new MsgUpdateClientResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUpdateClientResponse instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgUpdateClientResponse, - ): ibc.core.client.v1.MsgUpdateClientResponse; - - /** - * Encodes the specified MsgUpdateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. - * @param m MsgUpdateClientResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgUpdateClientResponse, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUpdateClientResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUpdateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgUpdateClientResponse; - } - - /** Properties of a MsgUpgradeClient. */ - interface IMsgUpgradeClient { - /** MsgUpgradeClient clientId */ - clientId?: string | null; - - /** MsgUpgradeClient clientState */ - clientState?: google.protobuf.IAny | null; - - /** MsgUpgradeClient upgradeHeight */ - upgradeHeight?: ibc.core.client.v1.IHeight | null; - - /** MsgUpgradeClient proofUpgrade */ - proofUpgrade?: Uint8Array | null; - - /** MsgUpgradeClient signer */ - signer?: string | null; - } - - /** Represents a MsgUpgradeClient. */ - class MsgUpgradeClient implements IMsgUpgradeClient { - /** - * Constructs a new MsgUpgradeClient. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgUpgradeClient); - - /** MsgUpgradeClient clientId. */ - public clientId: string; - - /** MsgUpgradeClient clientState. */ - public clientState?: google.protobuf.IAny | null; - - /** MsgUpgradeClient upgradeHeight. */ - public upgradeHeight?: ibc.core.client.v1.IHeight | null; - - /** MsgUpgradeClient proofUpgrade. */ - public proofUpgrade: Uint8Array; - - /** MsgUpgradeClient signer. */ - public signer: string; - - /** - * Creates a new MsgUpgradeClient instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUpgradeClient instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgUpgradeClient, - ): ibc.core.client.v1.MsgUpgradeClient; - - /** - * Encodes the specified MsgUpgradeClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. - * @param m MsgUpgradeClient message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgUpgradeClient, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUpgradeClient message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUpgradeClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgUpgradeClient; - } - - /** Properties of a MsgUpgradeClientResponse. */ - interface IMsgUpgradeClientResponse {} - - /** Represents a MsgUpgradeClientResponse. */ - class MsgUpgradeClientResponse implements IMsgUpgradeClientResponse { - /** - * Constructs a new MsgUpgradeClientResponse. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgUpgradeClientResponse); - - /** - * Creates a new MsgUpgradeClientResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUpgradeClientResponse instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgUpgradeClientResponse, - ): ibc.core.client.v1.MsgUpgradeClientResponse; - - /** - * Encodes the specified MsgUpgradeClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. - * @param m MsgUpgradeClientResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgUpgradeClientResponse, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUpgradeClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgUpgradeClientResponse; - } - - /** Properties of a MsgSubmitMisbehaviour. */ - interface IMsgSubmitMisbehaviour { - /** MsgSubmitMisbehaviour clientId */ - clientId?: string | null; - - /** MsgSubmitMisbehaviour misbehaviour */ - misbehaviour?: google.protobuf.IAny | null; - - /** MsgSubmitMisbehaviour signer */ - signer?: string | null; - } - - /** Represents a MsgSubmitMisbehaviour. */ - class MsgSubmitMisbehaviour implements IMsgSubmitMisbehaviour { - /** - * Constructs a new MsgSubmitMisbehaviour. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgSubmitMisbehaviour); - - /** MsgSubmitMisbehaviour clientId. */ - public clientId: string; - - /** MsgSubmitMisbehaviour misbehaviour. */ - public misbehaviour?: google.protobuf.IAny | null; - - /** MsgSubmitMisbehaviour signer. */ - public signer: string; - - /** - * Creates a new MsgSubmitMisbehaviour instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSubmitMisbehaviour instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgSubmitMisbehaviour, - ): ibc.core.client.v1.MsgSubmitMisbehaviour; - - /** - * Encodes the specified MsgSubmitMisbehaviour message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. - * @param m MsgSubmitMisbehaviour message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgSubmitMisbehaviour, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSubmitMisbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgSubmitMisbehaviour; - } - - /** Properties of a MsgSubmitMisbehaviourResponse. */ - interface IMsgSubmitMisbehaviourResponse {} - - /** Represents a MsgSubmitMisbehaviourResponse. */ - class MsgSubmitMisbehaviourResponse implements IMsgSubmitMisbehaviourResponse { - /** - * Constructs a new MsgSubmitMisbehaviourResponse. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse); - - /** - * Creates a new MsgSubmitMisbehaviourResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSubmitMisbehaviourResponse instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse, - ): ibc.core.client.v1.MsgSubmitMisbehaviourResponse; - - /** - * Encodes the specified MsgSubmitMisbehaviourResponse message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. - * @param m MsgSubmitMisbehaviourResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSubmitMisbehaviourResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgSubmitMisbehaviourResponse; - } - /** Properties of an IdentifiedClientState. */ interface IIdentifiedClientState { /** IdentifiedClientState clientId */ @@ -11188,11 +10596,11 @@ export namespace ibc { /** Properties of an Height. */ interface IHeight { - /** Height versionNumber */ - versionNumber?: Long | null; + /** Height revisionNumber */ + revisionNumber?: Long | null; - /** Height versionHeight */ - versionHeight?: Long | null; + /** Height revisionHeight */ + revisionHeight?: Long | null; } /** Represents an Height. */ @@ -11203,11 +10611,11 @@ export namespace ibc { */ constructor(p?: ibc.core.client.v1.IHeight); - /** Height versionNumber. */ - public versionNumber: Long; + /** Height revisionNumber. */ + public revisionNumber: Long; - /** Height versionHeight. */ - public versionHeight: Long; + /** Height revisionHeight. */ + public revisionHeight: Long; /** * Creates a new Height instance using the specified properties. @@ -11234,6 +10642,49 @@ export namespace ibc { */ public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ibc.core.client.v1.Height; } + + /** Properties of a Params. */ + interface IParams { + /** Params allowedClients */ + allowedClients?: string[] | null; + } + + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [p] Properties to set + */ + constructor(p?: ibc.core.client.v1.IParams); + + /** Params allowedClients. */ + public allowedClients: string[]; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: ibc.core.client.v1.IParams): ibc.core.client.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. + * @param m Params message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ibc.core.client.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ibc.core.client.v1.Params; + } } } @@ -11343,7 +10794,7 @@ export namespace ibc { /** Properties of a MerklePath. */ interface IMerklePath { /** MerklePath keyPath */ - keyPath?: ibc.core.commitment.v1.IKeyPath | null; + keyPath?: string[] | null; } /** Represents a MerklePath. */ @@ -11355,7 +10806,7 @@ export namespace ibc { constructor(p?: ibc.core.commitment.v1.IMerklePath); /** MerklePath keyPath. */ - public keyPath?: ibc.core.commitment.v1.IKeyPath | null; + public keyPath: string[]; /** * Creates a new MerklePath instance using the specified properties. @@ -11390,8 +10841,8 @@ export namespace ibc { /** Properties of a MerkleProof. */ interface IMerkleProof { - /** MerkleProof proof */ - proof?: tendermint.crypto.IProofOps | null; + /** MerkleProof proofs */ + proofs?: ics23.ICommitmentProof[] | null; } /** Represents a MerkleProof. */ @@ -11402,8 +10853,8 @@ export namespace ibc { */ constructor(p?: ibc.core.commitment.v1.IMerkleProof); - /** MerkleProof proof. */ - public proof?: tendermint.crypto.IProofOps | null; + /** MerkleProof proofs. */ + public proofs: ics23.ICommitmentProof[]; /** * Creates a new MerkleProof instance using the specified properties. @@ -11438,104 +10889,6 @@ export namespace ibc { l?: number, ): ibc.core.commitment.v1.MerkleProof; } - - /** Properties of a KeyPath. */ - interface IKeyPath { - /** KeyPath keys */ - keys?: ibc.core.commitment.v1.IKey[] | null; - } - - /** Represents a KeyPath. */ - class KeyPath implements IKeyPath { - /** - * Constructs a new KeyPath. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.commitment.v1.IKeyPath); - - /** KeyPath keys. */ - public keys: ibc.core.commitment.v1.IKey[]; - - /** - * Creates a new KeyPath instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyPath instance - */ - public static create(properties?: ibc.core.commitment.v1.IKeyPath): ibc.core.commitment.v1.KeyPath; - - /** - * Encodes the specified KeyPath message. Does not implicitly {@link ibc.core.commitment.v1.KeyPath.verify|verify} messages. - * @param m KeyPath message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: ibc.core.commitment.v1.IKeyPath, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyPath message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns KeyPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ibc.core.commitment.v1.KeyPath; - } - - /** Properties of a Key. */ - interface IKey { - /** Key name */ - name?: Uint8Array | null; - - /** Key enc */ - enc?: ibc.core.commitment.v1.KeyEncoding | null; - } - - /** Represents a Key. */ - class Key implements IKey { - /** - * Constructs a new Key. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.commitment.v1.IKey); - - /** Key name. */ - public name: Uint8Array; - - /** Key enc. */ - public enc: ibc.core.commitment.v1.KeyEncoding; - - /** - * Creates a new Key instance using the specified properties. - * @param [properties] Properties to set - * @returns Key instance - */ - public static create(properties?: ibc.core.commitment.v1.IKey): ibc.core.commitment.v1.Key; - - /** - * Encodes the specified Key message. Does not implicitly {@link ibc.core.commitment.v1.Key.verify|verify} messages. - * @param m Key message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: ibc.core.commitment.v1.IKey, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Key message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Key - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ibc.core.commitment.v1.Key; - } - - /** KeyEncoding enum. */ - enum KeyEncoding { - KEY_ENCODING_URL_UNSPECIFIED = 0, - KEY_ENCODING_HEX = 1, - } } } @@ -11556,6 +10909,9 @@ export namespace ibc { /** ConnectionEnd counterparty */ counterparty?: ibc.core.connection.v1.ICounterparty | null; + + /** ConnectionEnd delayPeriod */ + delayPeriod?: Long | null; } /** Represents a ConnectionEnd. */ @@ -11578,6 +10934,9 @@ export namespace ibc { /** ConnectionEnd counterparty. */ public counterparty?: ibc.core.connection.v1.ICounterparty | null; + /** ConnectionEnd delayPeriod. */ + public delayPeriod: Long; + /** * Creates a new ConnectionEnd instance using the specified properties. * @param [properties] Properties to set @@ -11628,6 +10987,9 @@ export namespace ibc { /** IdentifiedConnection counterparty */ counterparty?: ibc.core.connection.v1.ICounterparty | null; + + /** IdentifiedConnection delayPeriod */ + delayPeriod?: Long | null; } /** Represents an IdentifiedConnection. */ @@ -11653,6 +11015,9 @@ export namespace ibc { /** IdentifiedConnection counterparty. */ public counterparty?: ibc.core.connection.v1.ICounterparty | null; + /** IdentifiedConnection delayPeriod. */ + public delayPeriod: Long; + /** * Creates a new IdentifiedConnection instance using the specified properties. * @param [properties] Properties to set @@ -12547,11 +11912,11 @@ export namespace ibc { /** QueryConnectionConsensusStateRequest connectionId */ connectionId?: string | null; - /** QueryConnectionConsensusStateRequest versionNumber */ - versionNumber?: Long | null; + /** QueryConnectionConsensusStateRequest revisionNumber */ + revisionNumber?: Long | null; - /** QueryConnectionConsensusStateRequest versionHeight */ - versionHeight?: Long | null; + /** QueryConnectionConsensusStateRequest revisionHeight */ + revisionHeight?: Long | null; } /** Represents a QueryConnectionConsensusStateRequest. */ @@ -12565,11 +11930,11 @@ export namespace ibc { /** QueryConnectionConsensusStateRequest connectionId. */ public connectionId: string; - /** QueryConnectionConsensusStateRequest versionNumber. */ - public versionNumber: Long; + /** QueryConnectionConsensusStateRequest revisionNumber. */ + public revisionNumber: Long; - /** QueryConnectionConsensusStateRequest versionHeight. */ - public versionHeight: Long; + /** QueryConnectionConsensusStateRequest revisionHeight. */ + public revisionHeight: Long; /** * Creates a new QueryConnectionConsensusStateRequest instance using the specified properties. @@ -12678,6 +12043,847 @@ export namespace ibc { } } +/** Namespace ics23. */ +export namespace ics23 { + /** HashOp enum. */ + enum HashOp { + NO_HASH = 0, + SHA256 = 1, + SHA512 = 2, + KECCAK = 3, + RIPEMD160 = 4, + BITCOIN = 5, + } + + /** + * LengthOp defines how to process the key and value of the LeafOp + * to include length information. After encoding the length with the given + * algorithm, the length will be prepended to the key and value bytes. + * (Each one with it's own encoded length) + */ + enum LengthOp { + NO_PREFIX = 0, + VAR_PROTO = 1, + VAR_RLP = 2, + FIXED32_BIG = 3, + FIXED32_LITTLE = 4, + FIXED64_BIG = 5, + FIXED64_LITTLE = 6, + REQUIRE_32_BYTES = 7, + REQUIRE_64_BYTES = 8, + } + + /** Properties of an ExistenceProof. */ + interface IExistenceProof { + /** ExistenceProof key */ + key?: Uint8Array | null; + + /** ExistenceProof value */ + value?: Uint8Array | null; + + /** ExistenceProof leaf */ + leaf?: ics23.ILeafOp | null; + + /** ExistenceProof path */ + path?: ics23.IInnerOp[] | null; + } + + /** + * ExistenceProof takes a key and a value and a set of steps to perform on it. + * The result of peforming all these steps will provide a "root hash", which can + * be compared to the value in a header. + * + * Since it is computationally infeasible to produce a hash collission for any of the used + * cryptographic hash functions, if someone can provide a series of operations to transform + * a given key and value into a root hash that matches some trusted root, these key and values + * must be in the referenced merkle tree. + * + * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, + * which should be controlled by a spec. Eg. with lengthOp as NONE, + * prefix = FOO, key = BAR, value = CHOICE + * and + * prefix = F, key = OOBAR, value = CHOICE + * would produce the same value. + * + * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field + * in the ProofSpec is valuable to prevent this mutability. And why all trees should + * length-prefix the data before hashing it. + */ + class ExistenceProof implements IExistenceProof { + /** + * Constructs a new ExistenceProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.IExistenceProof); + + /** ExistenceProof key. */ + public key: Uint8Array; + + /** ExistenceProof value. */ + public value: Uint8Array; + + /** ExistenceProof leaf. */ + public leaf?: ics23.ILeafOp | null; + + /** ExistenceProof path. */ + public path: ics23.IInnerOp[]; + + /** + * Creates a new ExistenceProof instance using the specified properties. + * @param [properties] Properties to set + * @returns ExistenceProof instance + */ + public static create(properties?: ics23.IExistenceProof): ics23.ExistenceProof; + + /** + * Encodes the specified ExistenceProof message. Does not implicitly {@link ics23.ExistenceProof.verify|verify} messages. + * @param m ExistenceProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IExistenceProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExistenceProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.ExistenceProof; + } + + /** Properties of a NonExistenceProof. */ + interface INonExistenceProof { + /** NonExistenceProof key */ + key?: Uint8Array | null; + + /** NonExistenceProof left */ + left?: ics23.IExistenceProof | null; + + /** NonExistenceProof right */ + right?: ics23.IExistenceProof | null; + } + + /** Represents a NonExistenceProof. */ + class NonExistenceProof implements INonExistenceProof { + /** + * Constructs a new NonExistenceProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.INonExistenceProof); + + /** NonExistenceProof key. */ + public key: Uint8Array; + + /** NonExistenceProof left. */ + public left?: ics23.IExistenceProof | null; + + /** NonExistenceProof right. */ + public right?: ics23.IExistenceProof | null; + + /** + * Creates a new NonExistenceProof instance using the specified properties. + * @param [properties] Properties to set + * @returns NonExistenceProof instance + */ + public static create(properties?: ics23.INonExistenceProof): ics23.NonExistenceProof; + + /** + * Encodes the specified NonExistenceProof message. Does not implicitly {@link ics23.NonExistenceProof.verify|verify} messages. + * @param m NonExistenceProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.INonExistenceProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NonExistenceProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns NonExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.NonExistenceProof; + } + + /** Properties of a CommitmentProof. */ + interface ICommitmentProof { + /** CommitmentProof exist */ + exist?: ics23.IExistenceProof | null; + + /** CommitmentProof nonexist */ + nonexist?: ics23.INonExistenceProof | null; + + /** CommitmentProof batch */ + batch?: ics23.IBatchProof | null; + + /** CommitmentProof compressed */ + compressed?: ics23.ICompressedBatchProof | null; + } + + /** Represents a CommitmentProof. */ + class CommitmentProof implements ICommitmentProof { + /** + * Constructs a new CommitmentProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICommitmentProof); + + /** CommitmentProof exist. */ + public exist?: ics23.IExistenceProof | null; + + /** CommitmentProof nonexist. */ + public nonexist?: ics23.INonExistenceProof | null; + + /** CommitmentProof batch. */ + public batch?: ics23.IBatchProof | null; + + /** CommitmentProof compressed. */ + public compressed?: ics23.ICompressedBatchProof | null; + + /** CommitmentProof proof. */ + public proof?: "exist" | "nonexist" | "batch" | "compressed"; + + /** + * Creates a new CommitmentProof instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitmentProof instance + */ + public static create(properties?: ics23.ICommitmentProof): ics23.CommitmentProof; + + /** + * Encodes the specified CommitmentProof message. Does not implicitly {@link ics23.CommitmentProof.verify|verify} messages. + * @param m CommitmentProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICommitmentProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitmentProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CommitmentProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CommitmentProof; + } + + /** Properties of a LeafOp. */ + interface ILeafOp { + /** LeafOp hash */ + hash?: ics23.HashOp | null; + + /** LeafOp prehashKey */ + prehashKey?: ics23.HashOp | null; + + /** LeafOp prehashValue */ + prehashValue?: ics23.HashOp | null; + + /** LeafOp length */ + length?: ics23.LengthOp | null; + + /** LeafOp prefix */ + prefix?: Uint8Array | null; + } + + /** + * LeafOp represents the raw key-value data we wish to prove, and + * must be flexible to represent the internal transformation from + * the original key-value pairs into the basis hash, for many existing + * merkle trees. + * + * key and value are passed in. So that the signature of this operation is: + * leafOp(key, value) -> output + * + * To process this, first prehash the keys and values if needed (ANY means no hash in this case): + * hkey = prehashKey(key) + * hvalue = prehashValue(value) + * + * Then combine the bytes, and hash it + * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) + */ + class LeafOp implements ILeafOp { + /** + * Constructs a new LeafOp. + * @param [p] Properties to set + */ + constructor(p?: ics23.ILeafOp); + + /** LeafOp hash. */ + public hash: ics23.HashOp; + + /** LeafOp prehashKey. */ + public prehashKey: ics23.HashOp; + + /** LeafOp prehashValue. */ + public prehashValue: ics23.HashOp; + + /** LeafOp length. */ + public length: ics23.LengthOp; + + /** LeafOp prefix. */ + public prefix: Uint8Array; + + /** + * Creates a new LeafOp instance using the specified properties. + * @param [properties] Properties to set + * @returns LeafOp instance + */ + public static create(properties?: ics23.ILeafOp): ics23.LeafOp; + + /** + * Encodes the specified LeafOp message. Does not implicitly {@link ics23.LeafOp.verify|verify} messages. + * @param m LeafOp message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ILeafOp, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LeafOp message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns LeafOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.LeafOp; + } + + /** Properties of an InnerOp. */ + interface IInnerOp { + /** InnerOp hash */ + hash?: ics23.HashOp | null; + + /** InnerOp prefix */ + prefix?: Uint8Array | null; + + /** InnerOp suffix */ + suffix?: Uint8Array | null; + } + + /** + * InnerOp represents a merkle-proof step that is not a leaf. + * It represents concatenating two children and hashing them to provide the next result. + * + * The result of the previous step is passed in, so the signature of this op is: + * innerOp(child) -> output + * + * The result of applying InnerOp should be: + * output = op.hash(op.prefix || child || op.suffix) + * + * where the || operator is concatenation of binary data, + * and child is the result of hashing all the tree below this step. + * + * Any special data, like prepending child with the length, or prepending the entire operation with + * some value to differentiate from leaf nodes, should be included in prefix and suffix. + * If either of prefix or suffix is empty, we just treat it as an empty string + */ + class InnerOp implements IInnerOp { + /** + * Constructs a new InnerOp. + * @param [p] Properties to set + */ + constructor(p?: ics23.IInnerOp); + + /** InnerOp hash. */ + public hash: ics23.HashOp; + + /** InnerOp prefix. */ + public prefix: Uint8Array; + + /** InnerOp suffix. */ + public suffix: Uint8Array; + + /** + * Creates a new InnerOp instance using the specified properties. + * @param [properties] Properties to set + * @returns InnerOp instance + */ + public static create(properties?: ics23.IInnerOp): ics23.InnerOp; + + /** + * Encodes the specified InnerOp message. Does not implicitly {@link ics23.InnerOp.verify|verify} messages. + * @param m InnerOp message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IInnerOp, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InnerOp message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns InnerOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.InnerOp; + } + + /** Properties of a ProofSpec. */ + interface IProofSpec { + /** ProofSpec leafSpec */ + leafSpec?: ics23.ILeafOp | null; + + /** ProofSpec innerSpec */ + innerSpec?: ics23.IInnerSpec | null; + + /** ProofSpec maxDepth */ + maxDepth?: number | null; + + /** ProofSpec minDepth */ + minDepth?: number | null; + } + + /** + * ProofSpec defines what the expected parameters are for a given proof type. + * This can be stored in the client and used to validate any incoming proofs. + * + * verify(ProofSpec, Proof) -> Proof | Error + * + * As demonstrated in tests, if we don't fix the algorithm used to calculate the + * LeafHash for a given tree, there are many possible key-value pairs that can + * generate a given hash (by interpretting the preimage differently). + * We need this for proper security, requires client knows a priori what + * tree format server uses. But not in code, rather a configuration object. + */ + class ProofSpec implements IProofSpec { + /** + * Constructs a new ProofSpec. + * @param [p] Properties to set + */ + constructor(p?: ics23.IProofSpec); + + /** ProofSpec leafSpec. */ + public leafSpec?: ics23.ILeafOp | null; + + /** ProofSpec innerSpec. */ + public innerSpec?: ics23.IInnerSpec | null; + + /** ProofSpec maxDepth. */ + public maxDepth: number; + + /** ProofSpec minDepth. */ + public minDepth: number; + + /** + * Creates a new ProofSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ProofSpec instance + */ + public static create(properties?: ics23.IProofSpec): ics23.ProofSpec; + + /** + * Encodes the specified ProofSpec message. Does not implicitly {@link ics23.ProofSpec.verify|verify} messages. + * @param m ProofSpec message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IProofSpec, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProofSpec message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ProofSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.ProofSpec; + } + + /** Properties of an InnerSpec. */ + interface IInnerSpec { + /** InnerSpec childOrder */ + childOrder?: number[] | null; + + /** InnerSpec childSize */ + childSize?: number | null; + + /** InnerSpec minPrefixLength */ + minPrefixLength?: number | null; + + /** InnerSpec maxPrefixLength */ + maxPrefixLength?: number | null; + + /** InnerSpec emptyChild */ + emptyChild?: Uint8Array | null; + + /** InnerSpec hash */ + hash?: ics23.HashOp | null; + } + + /** Represents an InnerSpec. */ + class InnerSpec implements IInnerSpec { + /** + * Constructs a new InnerSpec. + * @param [p] Properties to set + */ + constructor(p?: ics23.IInnerSpec); + + /** InnerSpec childOrder. */ + public childOrder: number[]; + + /** InnerSpec childSize. */ + public childSize: number; + + /** InnerSpec minPrefixLength. */ + public minPrefixLength: number; + + /** InnerSpec maxPrefixLength. */ + public maxPrefixLength: number; + + /** InnerSpec emptyChild. */ + public emptyChild: Uint8Array; + + /** InnerSpec hash. */ + public hash: ics23.HashOp; + + /** + * Creates a new InnerSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns InnerSpec instance + */ + public static create(properties?: ics23.IInnerSpec): ics23.InnerSpec; + + /** + * Encodes the specified InnerSpec message. Does not implicitly {@link ics23.InnerSpec.verify|verify} messages. + * @param m InnerSpec message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IInnerSpec, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InnerSpec message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns InnerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.InnerSpec; + } + + /** Properties of a BatchProof. */ + interface IBatchProof { + /** BatchProof entries */ + entries?: ics23.IBatchEntry[] | null; + } + + /** Represents a BatchProof. */ + class BatchProof implements IBatchProof { + /** + * Constructs a new BatchProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.IBatchProof); + + /** BatchProof entries. */ + public entries: ics23.IBatchEntry[]; + + /** + * Creates a new BatchProof instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchProof instance + */ + public static create(properties?: ics23.IBatchProof): ics23.BatchProof; + + /** + * Encodes the specified BatchProof message. Does not implicitly {@link ics23.BatchProof.verify|verify} messages. + * @param m BatchProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IBatchProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns BatchProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.BatchProof; + } + + /** Properties of a BatchEntry. */ + interface IBatchEntry { + /** BatchEntry exist */ + exist?: ics23.IExistenceProof | null; + + /** BatchEntry nonexist */ + nonexist?: ics23.INonExistenceProof | null; + } + + /** Represents a BatchEntry. */ + class BatchEntry implements IBatchEntry { + /** + * Constructs a new BatchEntry. + * @param [p] Properties to set + */ + constructor(p?: ics23.IBatchEntry); + + /** BatchEntry exist. */ + public exist?: ics23.IExistenceProof | null; + + /** BatchEntry nonexist. */ + public nonexist?: ics23.INonExistenceProof | null; + + /** BatchEntry proof. */ + public proof?: "exist" | "nonexist"; + + /** + * Creates a new BatchEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchEntry instance + */ + public static create(properties?: ics23.IBatchEntry): ics23.BatchEntry; + + /** + * Encodes the specified BatchEntry message. Does not implicitly {@link ics23.BatchEntry.verify|verify} messages. + * @param m BatchEntry message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IBatchEntry, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchEntry message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns BatchEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.BatchEntry; + } + + /** Properties of a CompressedBatchProof. */ + interface ICompressedBatchProof { + /** CompressedBatchProof entries */ + entries?: ics23.ICompressedBatchEntry[] | null; + + /** CompressedBatchProof lookupInners */ + lookupInners?: ics23.IInnerOp[] | null; + } + + /** Represents a CompressedBatchProof. */ + class CompressedBatchProof implements ICompressedBatchProof { + /** + * Constructs a new CompressedBatchProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICompressedBatchProof); + + /** CompressedBatchProof entries. */ + public entries: ics23.ICompressedBatchEntry[]; + + /** CompressedBatchProof lookupInners. */ + public lookupInners: ics23.IInnerOp[]; + + /** + * Creates a new CompressedBatchProof instance using the specified properties. + * @param [properties] Properties to set + * @returns CompressedBatchProof instance + */ + public static create(properties?: ics23.ICompressedBatchProof): ics23.CompressedBatchProof; + + /** + * Encodes the specified CompressedBatchProof message. Does not implicitly {@link ics23.CompressedBatchProof.verify|verify} messages. + * @param m CompressedBatchProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICompressedBatchProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompressedBatchProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompressedBatchProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CompressedBatchProof; + } + + /** Properties of a CompressedBatchEntry. */ + interface ICompressedBatchEntry { + /** CompressedBatchEntry exist */ + exist?: ics23.ICompressedExistenceProof | null; + + /** CompressedBatchEntry nonexist */ + nonexist?: ics23.ICompressedNonExistenceProof | null; + } + + /** Represents a CompressedBatchEntry. */ + class CompressedBatchEntry implements ICompressedBatchEntry { + /** + * Constructs a new CompressedBatchEntry. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICompressedBatchEntry); + + /** CompressedBatchEntry exist. */ + public exist?: ics23.ICompressedExistenceProof | null; + + /** CompressedBatchEntry nonexist. */ + public nonexist?: ics23.ICompressedNonExistenceProof | null; + + /** CompressedBatchEntry proof. */ + public proof?: "exist" | "nonexist"; + + /** + * Creates a new CompressedBatchEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns CompressedBatchEntry instance + */ + public static create(properties?: ics23.ICompressedBatchEntry): ics23.CompressedBatchEntry; + + /** + * Encodes the specified CompressedBatchEntry message. Does not implicitly {@link ics23.CompressedBatchEntry.verify|verify} messages. + * @param m CompressedBatchEntry message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICompressedBatchEntry, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompressedBatchEntry message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompressedBatchEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CompressedBatchEntry; + } + + /** Properties of a CompressedExistenceProof. */ + interface ICompressedExistenceProof { + /** CompressedExistenceProof key */ + key?: Uint8Array | null; + + /** CompressedExistenceProof value */ + value?: Uint8Array | null; + + /** CompressedExistenceProof leaf */ + leaf?: ics23.ILeafOp | null; + + /** CompressedExistenceProof path */ + path?: number[] | null; + } + + /** Represents a CompressedExistenceProof. */ + class CompressedExistenceProof implements ICompressedExistenceProof { + /** + * Constructs a new CompressedExistenceProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICompressedExistenceProof); + + /** CompressedExistenceProof key. */ + public key: Uint8Array; + + /** CompressedExistenceProof value. */ + public value: Uint8Array; + + /** CompressedExistenceProof leaf. */ + public leaf?: ics23.ILeafOp | null; + + /** CompressedExistenceProof path. */ + public path: number[]; + + /** + * Creates a new CompressedExistenceProof instance using the specified properties. + * @param [properties] Properties to set + * @returns CompressedExistenceProof instance + */ + public static create(properties?: ics23.ICompressedExistenceProof): ics23.CompressedExistenceProof; + + /** + * Encodes the specified CompressedExistenceProof message. Does not implicitly {@link ics23.CompressedExistenceProof.verify|verify} messages. + * @param m CompressedExistenceProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICompressedExistenceProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompressedExistenceProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompressedExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CompressedExistenceProof; + } + + /** Properties of a CompressedNonExistenceProof. */ + interface ICompressedNonExistenceProof { + /** CompressedNonExistenceProof key */ + key?: Uint8Array | null; + + /** CompressedNonExistenceProof left */ + left?: ics23.ICompressedExistenceProof | null; + + /** CompressedNonExistenceProof right */ + right?: ics23.ICompressedExistenceProof | null; + } + + /** Represents a CompressedNonExistenceProof. */ + class CompressedNonExistenceProof implements ICompressedNonExistenceProof { + /** + * Constructs a new CompressedNonExistenceProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICompressedNonExistenceProof); + + /** CompressedNonExistenceProof key. */ + public key: Uint8Array; + + /** CompressedNonExistenceProof left. */ + public left?: ics23.ICompressedExistenceProof | null; + + /** CompressedNonExistenceProof right. */ + public right?: ics23.ICompressedExistenceProof | null; + + /** + * Creates a new CompressedNonExistenceProof instance using the specified properties. + * @param [properties] Properties to set + * @returns CompressedNonExistenceProof instance + */ + public static create(properties?: ics23.ICompressedNonExistenceProof): ics23.CompressedNonExistenceProof; + + /** + * Encodes the specified CompressedNonExistenceProof message. Does not implicitly {@link ics23.CompressedNonExistenceProof.verify|verify} messages. + * @param m CompressedNonExistenceProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICompressedNonExistenceProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompressedNonExistenceProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompressedNonExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CompressedNonExistenceProof; + } +} + /** Namespace tendermint. */ export namespace tendermint { /** Namespace abci. */ diff --git a/packages/stargate/src/codec/generated/codecimpl.js b/packages/stargate/src/codec/generated/codecimpl.js index 4765cdf1..44242999 100644 --- a/packages/stargate/src/codec/generated/codecimpl.js +++ b/packages/stargate/src/codec/generated/codecimpl.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.tendermint = exports.ibc = exports.google = exports.cosmos = void 0; +exports.tendermint = exports.ics23 = exports.ibc = exports.google = exports.cosmos = void 0; var $protobuf = require("protobufjs/minimal"); const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, @@ -7326,10 +7326,10 @@ exports.ibc = $root.ibc = (() => { } QueryChannelConsensusStateRequest.prototype.portId = ""; QueryChannelConsensusStateRequest.prototype.channelId = ""; - QueryChannelConsensusStateRequest.prototype.versionNumber = $util.Long + QueryChannelConsensusStateRequest.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - QueryChannelConsensusStateRequest.prototype.versionHeight = $util.Long + QueryChannelConsensusStateRequest.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; QueryChannelConsensusStateRequest.create = function create(properties) { @@ -7340,10 +7340,10 @@ exports.ibc = $root.ibc = (() => { if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) w.uint32(10).string(m.portId); if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) w.uint32(18).string(m.channelId); - if (m.versionNumber != null && Object.hasOwnProperty.call(m, "versionNumber")) - w.uint32(24).uint64(m.versionNumber); - if (m.versionHeight != null && Object.hasOwnProperty.call(m, "versionHeight")) - w.uint32(32).uint64(m.versionHeight); + if (m.revisionNumber != null && Object.hasOwnProperty.call(m, "revisionNumber")) + w.uint32(24).uint64(m.revisionNumber); + if (m.revisionHeight != null && Object.hasOwnProperty.call(m, "revisionHeight")) + w.uint32(32).uint64(m.revisionHeight); return w; }; QueryChannelConsensusStateRequest.decode = function decode(r, l) { @@ -7360,10 +7360,10 @@ exports.ibc = $root.ibc = (() => { m.channelId = r.string(); break; case 3: - m.versionNumber = r.uint64(); + m.revisionNumber = r.uint64(); break; case 4: - m.versionHeight = r.uint64(); + m.revisionHeight = r.uint64(); break; default: r.skipType(t & 7); @@ -8205,386 +8205,6 @@ exports.ibc = $root.ibc = (() => { const client = {}; client.v1 = (function () { const v1 = {}; - v1.Msg = (function () { - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - Object.defineProperty( - (Msg.prototype.createClient = function createClient(request, callback) { - return this.rpcCall( - createClient, - $root.ibc.core.client.v1.MsgCreateClient, - $root.ibc.core.client.v1.MsgCreateClientResponse, - request, - callback, - ); - }), - "name", - { value: "CreateClient" }, - ); - Object.defineProperty( - (Msg.prototype.updateClient = function updateClient(request, callback) { - return this.rpcCall( - updateClient, - $root.ibc.core.client.v1.MsgUpdateClient, - $root.ibc.core.client.v1.MsgUpdateClientResponse, - request, - callback, - ); - }), - "name", - { value: "UpdateClient" }, - ); - Object.defineProperty( - (Msg.prototype.upgradeClient = function upgradeClient(request, callback) { - return this.rpcCall( - upgradeClient, - $root.ibc.core.client.v1.MsgUpgradeClient, - $root.ibc.core.client.v1.MsgUpgradeClientResponse, - request, - callback, - ); - }), - "name", - { value: "UpgradeClient" }, - ); - Object.defineProperty( - (Msg.prototype.submitMisbehaviour = function submitMisbehaviour(request, callback) { - return this.rpcCall( - submitMisbehaviour, - $root.ibc.core.client.v1.MsgSubmitMisbehaviour, - $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, - request, - callback, - ); - }), - "name", - { value: "SubmitMisbehaviour" }, - ); - return Msg; - })(); - v1.MsgCreateClient = (function () { - function MsgCreateClient(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgCreateClient.prototype.clientId = ""; - MsgCreateClient.prototype.clientState = null; - MsgCreateClient.prototype.consensusState = null; - MsgCreateClient.prototype.signer = ""; - MsgCreateClient.create = function create(properties) { - return new MsgCreateClient(properties); - }; - MsgCreateClient.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) - w.uint32(10).string(m.clientId); - if (m.clientState != null && Object.hasOwnProperty.call(m, "clientState")) - $root.google.protobuf.Any.encode(m.clientState, w.uint32(18).fork()).ldelim(); - if (m.consensusState != null && Object.hasOwnProperty.call(m, "consensusState")) - $root.google.protobuf.Any.encode(m.consensusState, w.uint32(26).fork()).ldelim(); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) w.uint32(34).string(m.signer); - return w; - }; - MsgCreateClient.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.client.v1.MsgCreateClient(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.clientId = r.string(); - break; - case 2: - m.clientState = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 3: - m.consensusState = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 4: - m.signer = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgCreateClient; - })(); - v1.MsgCreateClientResponse = (function () { - function MsgCreateClientResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgCreateClientResponse.create = function create(properties) { - return new MsgCreateClientResponse(properties); - }; - MsgCreateClientResponse.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - return w; - }; - MsgCreateClientResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.client.v1.MsgCreateClientResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgCreateClientResponse; - })(); - v1.MsgUpdateClient = (function () { - function MsgUpdateClient(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgUpdateClient.prototype.clientId = ""; - MsgUpdateClient.prototype.header = null; - MsgUpdateClient.prototype.signer = ""; - MsgUpdateClient.create = function create(properties) { - return new MsgUpdateClient(properties); - }; - MsgUpdateClient.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) - w.uint32(10).string(m.clientId); - if (m.header != null && Object.hasOwnProperty.call(m, "header")) - $root.google.protobuf.Any.encode(m.header, w.uint32(18).fork()).ldelim(); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) w.uint32(26).string(m.signer); - return w; - }; - MsgUpdateClient.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.client.v1.MsgUpdateClient(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.clientId = r.string(); - break; - case 2: - m.header = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 3: - m.signer = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgUpdateClient; - })(); - v1.MsgUpdateClientResponse = (function () { - function MsgUpdateClientResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgUpdateClientResponse.create = function create(properties) { - return new MsgUpdateClientResponse(properties); - }; - MsgUpdateClientResponse.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - return w; - }; - MsgUpdateClientResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.client.v1.MsgUpdateClientResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgUpdateClientResponse; - })(); - v1.MsgUpgradeClient = (function () { - function MsgUpgradeClient(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgUpgradeClient.prototype.clientId = ""; - MsgUpgradeClient.prototype.clientState = null; - MsgUpgradeClient.prototype.upgradeHeight = null; - MsgUpgradeClient.prototype.proofUpgrade = $util.newBuffer([]); - MsgUpgradeClient.prototype.signer = ""; - MsgUpgradeClient.create = function create(properties) { - return new MsgUpgradeClient(properties); - }; - MsgUpgradeClient.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) - w.uint32(10).string(m.clientId); - if (m.clientState != null && Object.hasOwnProperty.call(m, "clientState")) - $root.google.protobuf.Any.encode(m.clientState, w.uint32(18).fork()).ldelim(); - if (m.upgradeHeight != null && Object.hasOwnProperty.call(m, "upgradeHeight")) - $root.ibc.core.client.v1.Height.encode(m.upgradeHeight, w.uint32(26).fork()).ldelim(); - if (m.proofUpgrade != null && Object.hasOwnProperty.call(m, "proofUpgrade")) - w.uint32(34).bytes(m.proofUpgrade); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) w.uint32(42).string(m.signer); - return w; - }; - MsgUpgradeClient.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.client.v1.MsgUpgradeClient(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.clientId = r.string(); - break; - case 2: - m.clientState = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 3: - m.upgradeHeight = $root.ibc.core.client.v1.Height.decode(r, r.uint32()); - break; - case 4: - m.proofUpgrade = r.bytes(); - break; - case 5: - m.signer = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgUpgradeClient; - })(); - v1.MsgUpgradeClientResponse = (function () { - function MsgUpgradeClientResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgUpgradeClientResponse.create = function create(properties) { - return new MsgUpgradeClientResponse(properties); - }; - MsgUpgradeClientResponse.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - return w; - }; - MsgUpgradeClientResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgUpgradeClientResponse; - })(); - v1.MsgSubmitMisbehaviour = (function () { - function MsgSubmitMisbehaviour(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgSubmitMisbehaviour.prototype.clientId = ""; - MsgSubmitMisbehaviour.prototype.misbehaviour = null; - MsgSubmitMisbehaviour.prototype.signer = ""; - MsgSubmitMisbehaviour.create = function create(properties) { - return new MsgSubmitMisbehaviour(properties); - }; - MsgSubmitMisbehaviour.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) - w.uint32(10).string(m.clientId); - if (m.misbehaviour != null && Object.hasOwnProperty.call(m, "misbehaviour")) - $root.google.protobuf.Any.encode(m.misbehaviour, w.uint32(18).fork()).ldelim(); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) w.uint32(26).string(m.signer); - return w; - }; - MsgSubmitMisbehaviour.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.clientId = r.string(); - break; - case 2: - m.misbehaviour = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 3: - m.signer = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgSubmitMisbehaviour; - })(); - v1.MsgSubmitMisbehaviourResponse = (function () { - function MsgSubmitMisbehaviourResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgSubmitMisbehaviourResponse.create = function create(properties) { - return new MsgSubmitMisbehaviourResponse(properties); - }; - MsgSubmitMisbehaviourResponse.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - return w; - }; - MsgSubmitMisbehaviourResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgSubmitMisbehaviourResponse; - })(); v1.IdentifiedClientState = (function () { function IdentifiedClientState(p) { if (p) @@ -8775,17 +8395,17 @@ exports.ibc = $root.ibc = (() => { for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - Height.prototype.versionNumber = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - Height.prototype.versionHeight = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Height.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Height.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; Height.create = function create(properties) { return new Height(properties); }; Height.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.versionNumber != null && Object.hasOwnProperty.call(m, "versionNumber")) - w.uint32(8).uint64(m.versionNumber); - if (m.versionHeight != null && Object.hasOwnProperty.call(m, "versionHeight")) - w.uint32(16).uint64(m.versionHeight); + if (m.revisionNumber != null && Object.hasOwnProperty.call(m, "revisionNumber")) + w.uint32(8).uint64(m.revisionNumber); + if (m.revisionHeight != null && Object.hasOwnProperty.call(m, "revisionHeight")) + w.uint32(16).uint64(m.revisionHeight); return w; }; Height.decode = function decode(r, l) { @@ -8796,10 +8416,10 @@ exports.ibc = $root.ibc = (() => { var t = r.uint32(); switch (t >>> 3) { case 1: - m.versionNumber = r.uint64(); + m.revisionNumber = r.uint64(); break; case 2: - m.versionHeight = r.uint64(); + m.revisionHeight = r.uint64(); break; default: r.skipType(t & 7); @@ -8810,6 +8430,44 @@ exports.ibc = $root.ibc = (() => { }; return Height; })(); + v1.Params = (function () { + function Params(p) { + this.allowedClients = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Params.prototype.allowedClients = $util.emptyArray; + Params.create = function create(properties) { + return new Params(properties); + }; + Params.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.allowedClients != null && m.allowedClients.length) { + for (var i = 0; i < m.allowedClients.length; ++i) w.uint32(10).string(m.allowedClients[i]); + } + return w; + }; + Params.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ibc.core.client.v1.Params(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.allowedClients && m.allowedClients.length)) m.allowedClients = []; + m.allowedClients.push(r.string()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Params; + })(); return v1; })(); return client; @@ -8889,18 +8547,20 @@ exports.ibc = $root.ibc = (() => { })(); v1.MerklePath = (function () { function MerklePath(p) { + this.keyPath = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - MerklePath.prototype.keyPath = null; + MerklePath.prototype.keyPath = $util.emptyArray; MerklePath.create = function create(properties) { return new MerklePath(properties); }; MerklePath.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.keyPath != null && Object.hasOwnProperty.call(m, "keyPath")) - $root.ibc.core.commitment.v1.KeyPath.encode(m.keyPath, w.uint32(10).fork()).ldelim(); + if (m.keyPath != null && m.keyPath.length) { + for (var i = 0; i < m.keyPath.length; ++i) w.uint32(10).string(m.keyPath[i]); + } return w; }; MerklePath.decode = function decode(r, l) { @@ -8911,7 +8571,8 @@ exports.ibc = $root.ibc = (() => { var t = r.uint32(); switch (t >>> 3) { case 1: - m.keyPath = $root.ibc.core.commitment.v1.KeyPath.decode(r, r.uint32()); + if (!(m.keyPath && m.keyPath.length)) m.keyPath = []; + m.keyPath.push(r.string()); break; default: r.skipType(t & 7); @@ -8924,18 +8585,21 @@ exports.ibc = $root.ibc = (() => { })(); v1.MerkleProof = (function () { function MerkleProof(p) { + this.proofs = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - MerkleProof.prototype.proof = null; + MerkleProof.prototype.proofs = $util.emptyArray; MerkleProof.create = function create(properties) { return new MerkleProof(properties); }; MerkleProof.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) - $root.tendermint.crypto.ProofOps.encode(m.proof, w.uint32(10).fork()).ldelim(); + if (m.proofs != null && m.proofs.length) { + for (var i = 0; i < m.proofs.length; ++i) + $root.ics23.CommitmentProof.encode(m.proofs[i], w.uint32(10).fork()).ldelim(); + } return w; }; MerkleProof.decode = function decode(r, l) { @@ -8946,7 +8610,8 @@ exports.ibc = $root.ibc = (() => { var t = r.uint32(); switch (t >>> 3) { case 1: - m.proof = $root.tendermint.crypto.ProofOps.decode(r, r.uint32()); + if (!(m.proofs && m.proofs.length)) m.proofs = []; + m.proofs.push($root.ics23.CommitmentProof.decode(r, r.uint32())); break; default: r.skipType(t & 7); @@ -8957,91 +8622,6 @@ exports.ibc = $root.ibc = (() => { }; return MerkleProof; })(); - v1.KeyPath = (function () { - function KeyPath(p) { - this.keys = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - KeyPath.prototype.keys = $util.emptyArray; - KeyPath.create = function create(properties) { - return new KeyPath(properties); - }; - KeyPath.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.keys != null && m.keys.length) { - for (var i = 0; i < m.keys.length; ++i) - $root.ibc.core.commitment.v1.Key.encode(m.keys[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - KeyPath.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.commitment.v1.KeyPath(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.keys && m.keys.length)) m.keys = []; - m.keys.push($root.ibc.core.commitment.v1.Key.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return KeyPath; - })(); - v1.Key = (function () { - function Key(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - Key.prototype.name = $util.newBuffer([]); - Key.prototype.enc = 0; - Key.create = function create(properties) { - return new Key(properties); - }; - Key.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.name != null && Object.hasOwnProperty.call(m, "name")) w.uint32(10).bytes(m.name); - if (m.enc != null && Object.hasOwnProperty.call(m, "enc")) w.uint32(16).int32(m.enc); - return w; - }; - Key.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.ibc.core.commitment.v1.Key(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.name = r.bytes(); - break; - case 2: - m.enc = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return Key; - })(); - v1.KeyEncoding = (function () { - const valuesById = {}, - values = Object.create(valuesById); - values[(valuesById[0] = "KEY_ENCODING_URL_UNSPECIFIED")] = 0; - values[(valuesById[1] = "KEY_ENCODING_HEX")] = 1; - return values; - })(); return v1; })(); return commitment; @@ -9061,6 +8641,7 @@ exports.ibc = $root.ibc = (() => { ConnectionEnd.prototype.versions = $util.emptyArray; ConnectionEnd.prototype.state = 0; ConnectionEnd.prototype.counterparty = null; + ConnectionEnd.prototype.delayPeriod = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; ConnectionEnd.create = function create(properties) { return new ConnectionEnd(properties); }; @@ -9075,6 +8656,8 @@ exports.ibc = $root.ibc = (() => { if (m.state != null && Object.hasOwnProperty.call(m, "state")) w.uint32(24).int32(m.state); if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) $root.ibc.core.connection.v1.Counterparty.encode(m.counterparty, w.uint32(34).fork()).ldelim(); + if (m.delayPeriod != null && Object.hasOwnProperty.call(m, "delayPeriod")) + w.uint32(40).uint64(m.delayPeriod); return w; }; ConnectionEnd.decode = function decode(r, l) { @@ -9097,6 +8680,9 @@ exports.ibc = $root.ibc = (() => { case 4: m.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(r, r.uint32()); break; + case 5: + m.delayPeriod = r.uint64(); + break; default: r.skipType(t & 7); break; @@ -9118,6 +8704,7 @@ exports.ibc = $root.ibc = (() => { IdentifiedConnection.prototype.versions = $util.emptyArray; IdentifiedConnection.prototype.state = 0; IdentifiedConnection.prototype.counterparty = null; + IdentifiedConnection.prototype.delayPeriod = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; IdentifiedConnection.create = function create(properties) { return new IdentifiedConnection(properties); }; @@ -9133,6 +8720,8 @@ exports.ibc = $root.ibc = (() => { if (m.state != null && Object.hasOwnProperty.call(m, "state")) w.uint32(32).int32(m.state); if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) $root.ibc.core.connection.v1.Counterparty.encode(m.counterparty, w.uint32(42).fork()).ldelim(); + if (m.delayPeriod != null && Object.hasOwnProperty.call(m, "delayPeriod")) + w.uint32(48).uint64(m.delayPeriod); return w; }; IdentifiedConnection.decode = function decode(r, l) { @@ -9158,6 +8747,9 @@ exports.ibc = $root.ibc = (() => { case 5: m.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(r, r.uint32()); break; + case 6: + m.delayPeriod = r.uint64(); + break; default: r.skipType(t & 7); break; @@ -9772,10 +9364,10 @@ exports.ibc = $root.ibc = (() => { if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } QueryConnectionConsensusStateRequest.prototype.connectionId = ""; - QueryConnectionConsensusStateRequest.prototype.versionNumber = $util.Long + QueryConnectionConsensusStateRequest.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - QueryConnectionConsensusStateRequest.prototype.versionHeight = $util.Long + QueryConnectionConsensusStateRequest.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; QueryConnectionConsensusStateRequest.create = function create(properties) { @@ -9785,10 +9377,10 @@ exports.ibc = $root.ibc = (() => { if (!w) w = $Writer.create(); if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) w.uint32(10).string(m.connectionId); - if (m.versionNumber != null && Object.hasOwnProperty.call(m, "versionNumber")) - w.uint32(16).uint64(m.versionNumber); - if (m.versionHeight != null && Object.hasOwnProperty.call(m, "versionHeight")) - w.uint32(24).uint64(m.versionHeight); + if (m.revisionNumber != null && Object.hasOwnProperty.call(m, "revisionNumber")) + w.uint32(16).uint64(m.revisionNumber); + if (m.revisionHeight != null && Object.hasOwnProperty.call(m, "revisionHeight")) + w.uint32(24).uint64(m.revisionHeight); return w; }; QueryConnectionConsensusStateRequest.decode = function decode(r, l) { @@ -9802,10 +9394,10 @@ exports.ibc = $root.ibc = (() => { m.connectionId = r.string(); break; case 2: - m.versionNumber = r.uint64(); + m.revisionNumber = r.uint64(); break; case 3: - m.versionHeight = r.uint64(); + m.revisionHeight = r.uint64(); break; default: r.skipType(t & 7); @@ -9876,6 +9468,688 @@ exports.ibc = $root.ibc = (() => { })(); return ibc; })(); +exports.ics23 = $root.ics23 = (() => { + const ics23 = {}; + ics23.HashOp = (function () { + const valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "NO_HASH")] = 0; + values[(valuesById[1] = "SHA256")] = 1; + values[(valuesById[2] = "SHA512")] = 2; + values[(valuesById[3] = "KECCAK")] = 3; + values[(valuesById[4] = "RIPEMD160")] = 4; + values[(valuesById[5] = "BITCOIN")] = 5; + return values; + })(); + ics23.LengthOp = (function () { + const valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "NO_PREFIX")] = 0; + values[(valuesById[1] = "VAR_PROTO")] = 1; + values[(valuesById[2] = "VAR_RLP")] = 2; + values[(valuesById[3] = "FIXED32_BIG")] = 3; + values[(valuesById[4] = "FIXED32_LITTLE")] = 4; + values[(valuesById[5] = "FIXED64_BIG")] = 5; + values[(valuesById[6] = "FIXED64_LITTLE")] = 6; + values[(valuesById[7] = "REQUIRE_32_BYTES")] = 7; + values[(valuesById[8] = "REQUIRE_64_BYTES")] = 8; + return values; + })(); + ics23.ExistenceProof = (function () { + function ExistenceProof(p) { + this.path = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ExistenceProof.prototype.key = $util.newBuffer([]); + ExistenceProof.prototype.value = $util.newBuffer([]); + ExistenceProof.prototype.leaf = null; + ExistenceProof.prototype.path = $util.emptyArray; + ExistenceProof.create = function create(properties) { + return new ExistenceProof(properties); + }; + ExistenceProof.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(10).bytes(m.key); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) w.uint32(18).bytes(m.value); + if (m.leaf != null && Object.hasOwnProperty.call(m, "leaf")) + $root.ics23.LeafOp.encode(m.leaf, w.uint32(26).fork()).ldelim(); + if (m.path != null && m.path.length) { + for (var i = 0; i < m.path.length; ++i) + $root.ics23.InnerOp.encode(m.path[i], w.uint32(34).fork()).ldelim(); + } + return w; + }; + ExistenceProof.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.ExistenceProof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.key = r.bytes(); + break; + case 2: + m.value = r.bytes(); + break; + case 3: + m.leaf = $root.ics23.LeafOp.decode(r, r.uint32()); + break; + case 4: + if (!(m.path && m.path.length)) m.path = []; + m.path.push($root.ics23.InnerOp.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ExistenceProof; + })(); + ics23.NonExistenceProof = (function () { + function NonExistenceProof(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + NonExistenceProof.prototype.key = $util.newBuffer([]); + NonExistenceProof.prototype.left = null; + NonExistenceProof.prototype.right = null; + NonExistenceProof.create = function create(properties) { + return new NonExistenceProof(properties); + }; + NonExistenceProof.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(10).bytes(m.key); + if (m.left != null && Object.hasOwnProperty.call(m, "left")) + $root.ics23.ExistenceProof.encode(m.left, w.uint32(18).fork()).ldelim(); + if (m.right != null && Object.hasOwnProperty.call(m, "right")) + $root.ics23.ExistenceProof.encode(m.right, w.uint32(26).fork()).ldelim(); + return w; + }; + NonExistenceProof.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.NonExistenceProof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.key = r.bytes(); + break; + case 2: + m.left = $root.ics23.ExistenceProof.decode(r, r.uint32()); + break; + case 3: + m.right = $root.ics23.ExistenceProof.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return NonExistenceProof; + })(); + ics23.CommitmentProof = (function () { + function CommitmentProof(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + CommitmentProof.prototype.exist = null; + CommitmentProof.prototype.nonexist = null; + CommitmentProof.prototype.batch = null; + CommitmentProof.prototype.compressed = null; + let $oneOfFields; + Object.defineProperty(CommitmentProof.prototype, "proof", { + get: $util.oneOfGetter(($oneOfFields = ["exist", "nonexist", "batch", "compressed"])), + set: $util.oneOfSetter($oneOfFields), + }); + CommitmentProof.create = function create(properties) { + return new CommitmentProof(properties); + }; + CommitmentProof.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.exist != null && Object.hasOwnProperty.call(m, "exist")) + $root.ics23.ExistenceProof.encode(m.exist, w.uint32(10).fork()).ldelim(); + if (m.nonexist != null && Object.hasOwnProperty.call(m, "nonexist")) + $root.ics23.NonExistenceProof.encode(m.nonexist, w.uint32(18).fork()).ldelim(); + if (m.batch != null && Object.hasOwnProperty.call(m, "batch")) + $root.ics23.BatchProof.encode(m.batch, w.uint32(26).fork()).ldelim(); + if (m.compressed != null && Object.hasOwnProperty.call(m, "compressed")) + $root.ics23.CompressedBatchProof.encode(m.compressed, w.uint32(34).fork()).ldelim(); + return w; + }; + CommitmentProof.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.CommitmentProof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.exist = $root.ics23.ExistenceProof.decode(r, r.uint32()); + break; + case 2: + m.nonexist = $root.ics23.NonExistenceProof.decode(r, r.uint32()); + break; + case 3: + m.batch = $root.ics23.BatchProof.decode(r, r.uint32()); + break; + case 4: + m.compressed = $root.ics23.CompressedBatchProof.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return CommitmentProof; + })(); + ics23.LeafOp = (function () { + function LeafOp(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + LeafOp.prototype.hash = 0; + LeafOp.prototype.prehashKey = 0; + LeafOp.prototype.prehashValue = 0; + LeafOp.prototype.length = 0; + LeafOp.prototype.prefix = $util.newBuffer([]); + LeafOp.create = function create(properties) { + return new LeafOp(properties); + }; + LeafOp.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.hash != null && Object.hasOwnProperty.call(m, "hash")) w.uint32(8).int32(m.hash); + if (m.prehashKey != null && Object.hasOwnProperty.call(m, "prehashKey")) + w.uint32(16).int32(m.prehashKey); + if (m.prehashValue != null && Object.hasOwnProperty.call(m, "prehashValue")) + w.uint32(24).int32(m.prehashValue); + if (m.length != null && Object.hasOwnProperty.call(m, "length")) w.uint32(32).int32(m.length); + if (m.prefix != null && Object.hasOwnProperty.call(m, "prefix")) w.uint32(42).bytes(m.prefix); + return w; + }; + LeafOp.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.LeafOp(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.hash = r.int32(); + break; + case 2: + m.prehashKey = r.int32(); + break; + case 3: + m.prehashValue = r.int32(); + break; + case 4: + m.length = r.int32(); + break; + case 5: + m.prefix = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return LeafOp; + })(); + ics23.InnerOp = (function () { + function InnerOp(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + InnerOp.prototype.hash = 0; + InnerOp.prototype.prefix = $util.newBuffer([]); + InnerOp.prototype.suffix = $util.newBuffer([]); + InnerOp.create = function create(properties) { + return new InnerOp(properties); + }; + InnerOp.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.hash != null && Object.hasOwnProperty.call(m, "hash")) w.uint32(8).int32(m.hash); + if (m.prefix != null && Object.hasOwnProperty.call(m, "prefix")) w.uint32(18).bytes(m.prefix); + if (m.suffix != null && Object.hasOwnProperty.call(m, "suffix")) w.uint32(26).bytes(m.suffix); + return w; + }; + InnerOp.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.InnerOp(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.hash = r.int32(); + break; + case 2: + m.prefix = r.bytes(); + break; + case 3: + m.suffix = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return InnerOp; + })(); + ics23.ProofSpec = (function () { + function ProofSpec(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ProofSpec.prototype.leafSpec = null; + ProofSpec.prototype.innerSpec = null; + ProofSpec.prototype.maxDepth = 0; + ProofSpec.prototype.minDepth = 0; + ProofSpec.create = function create(properties) { + return new ProofSpec(properties); + }; + ProofSpec.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.leafSpec != null && Object.hasOwnProperty.call(m, "leafSpec")) + $root.ics23.LeafOp.encode(m.leafSpec, w.uint32(10).fork()).ldelim(); + if (m.innerSpec != null && Object.hasOwnProperty.call(m, "innerSpec")) + $root.ics23.InnerSpec.encode(m.innerSpec, w.uint32(18).fork()).ldelim(); + if (m.maxDepth != null && Object.hasOwnProperty.call(m, "maxDepth")) w.uint32(24).int32(m.maxDepth); + if (m.minDepth != null && Object.hasOwnProperty.call(m, "minDepth")) w.uint32(32).int32(m.minDepth); + return w; + }; + ProofSpec.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.ProofSpec(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.leafSpec = $root.ics23.LeafOp.decode(r, r.uint32()); + break; + case 2: + m.innerSpec = $root.ics23.InnerSpec.decode(r, r.uint32()); + break; + case 3: + m.maxDepth = r.int32(); + break; + case 4: + m.minDepth = r.int32(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ProofSpec; + })(); + ics23.InnerSpec = (function () { + function InnerSpec(p) { + this.childOrder = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + InnerSpec.prototype.childOrder = $util.emptyArray; + InnerSpec.prototype.childSize = 0; + InnerSpec.prototype.minPrefixLength = 0; + InnerSpec.prototype.maxPrefixLength = 0; + InnerSpec.prototype.emptyChild = $util.newBuffer([]); + InnerSpec.prototype.hash = 0; + InnerSpec.create = function create(properties) { + return new InnerSpec(properties); + }; + InnerSpec.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.childOrder != null && m.childOrder.length) { + w.uint32(10).fork(); + for (var i = 0; i < m.childOrder.length; ++i) w.int32(m.childOrder[i]); + w.ldelim(); + } + if (m.childSize != null && Object.hasOwnProperty.call(m, "childSize")) w.uint32(16).int32(m.childSize); + if (m.minPrefixLength != null && Object.hasOwnProperty.call(m, "minPrefixLength")) + w.uint32(24).int32(m.minPrefixLength); + if (m.maxPrefixLength != null && Object.hasOwnProperty.call(m, "maxPrefixLength")) + w.uint32(32).int32(m.maxPrefixLength); + if (m.emptyChild != null && Object.hasOwnProperty.call(m, "emptyChild")) + w.uint32(42).bytes(m.emptyChild); + if (m.hash != null && Object.hasOwnProperty.call(m, "hash")) w.uint32(48).int32(m.hash); + return w; + }; + InnerSpec.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.InnerSpec(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.childOrder && m.childOrder.length)) m.childOrder = []; + if ((t & 7) === 2) { + var c2 = r.uint32() + r.pos; + while (r.pos < c2) m.childOrder.push(r.int32()); + } else m.childOrder.push(r.int32()); + break; + case 2: + m.childSize = r.int32(); + break; + case 3: + m.minPrefixLength = r.int32(); + break; + case 4: + m.maxPrefixLength = r.int32(); + break; + case 5: + m.emptyChild = r.bytes(); + break; + case 6: + m.hash = r.int32(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return InnerSpec; + })(); + ics23.BatchProof = (function () { + function BatchProof(p) { + this.entries = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + BatchProof.prototype.entries = $util.emptyArray; + BatchProof.create = function create(properties) { + return new BatchProof(properties); + }; + BatchProof.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.entries != null && m.entries.length) { + for (var i = 0; i < m.entries.length; ++i) + $root.ics23.BatchEntry.encode(m.entries[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + BatchProof.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.BatchProof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.entries && m.entries.length)) m.entries = []; + m.entries.push($root.ics23.BatchEntry.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return BatchProof; + })(); + ics23.BatchEntry = (function () { + function BatchEntry(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + BatchEntry.prototype.exist = null; + BatchEntry.prototype.nonexist = null; + let $oneOfFields; + Object.defineProperty(BatchEntry.prototype, "proof", { + get: $util.oneOfGetter(($oneOfFields = ["exist", "nonexist"])), + set: $util.oneOfSetter($oneOfFields), + }); + BatchEntry.create = function create(properties) { + return new BatchEntry(properties); + }; + BatchEntry.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.exist != null && Object.hasOwnProperty.call(m, "exist")) + $root.ics23.ExistenceProof.encode(m.exist, w.uint32(10).fork()).ldelim(); + if (m.nonexist != null && Object.hasOwnProperty.call(m, "nonexist")) + $root.ics23.NonExistenceProof.encode(m.nonexist, w.uint32(18).fork()).ldelim(); + return w; + }; + BatchEntry.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.BatchEntry(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.exist = $root.ics23.ExistenceProof.decode(r, r.uint32()); + break; + case 2: + m.nonexist = $root.ics23.NonExistenceProof.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return BatchEntry; + })(); + ics23.CompressedBatchProof = (function () { + function CompressedBatchProof(p) { + this.entries = []; + this.lookupInners = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + CompressedBatchProof.prototype.entries = $util.emptyArray; + CompressedBatchProof.prototype.lookupInners = $util.emptyArray; + CompressedBatchProof.create = function create(properties) { + return new CompressedBatchProof(properties); + }; + CompressedBatchProof.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.entries != null && m.entries.length) { + for (var i = 0; i < m.entries.length; ++i) + $root.ics23.CompressedBatchEntry.encode(m.entries[i], w.uint32(10).fork()).ldelim(); + } + if (m.lookupInners != null && m.lookupInners.length) { + for (var i = 0; i < m.lookupInners.length; ++i) + $root.ics23.InnerOp.encode(m.lookupInners[i], w.uint32(18).fork()).ldelim(); + } + return w; + }; + CompressedBatchProof.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.CompressedBatchProof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.entries && m.entries.length)) m.entries = []; + m.entries.push($root.ics23.CompressedBatchEntry.decode(r, r.uint32())); + break; + case 2: + if (!(m.lookupInners && m.lookupInners.length)) m.lookupInners = []; + m.lookupInners.push($root.ics23.InnerOp.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return CompressedBatchProof; + })(); + ics23.CompressedBatchEntry = (function () { + function CompressedBatchEntry(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + CompressedBatchEntry.prototype.exist = null; + CompressedBatchEntry.prototype.nonexist = null; + let $oneOfFields; + Object.defineProperty(CompressedBatchEntry.prototype, "proof", { + get: $util.oneOfGetter(($oneOfFields = ["exist", "nonexist"])), + set: $util.oneOfSetter($oneOfFields), + }); + CompressedBatchEntry.create = function create(properties) { + return new CompressedBatchEntry(properties); + }; + CompressedBatchEntry.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.exist != null && Object.hasOwnProperty.call(m, "exist")) + $root.ics23.CompressedExistenceProof.encode(m.exist, w.uint32(10).fork()).ldelim(); + if (m.nonexist != null && Object.hasOwnProperty.call(m, "nonexist")) + $root.ics23.CompressedNonExistenceProof.encode(m.nonexist, w.uint32(18).fork()).ldelim(); + return w; + }; + CompressedBatchEntry.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.CompressedBatchEntry(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.exist = $root.ics23.CompressedExistenceProof.decode(r, r.uint32()); + break; + case 2: + m.nonexist = $root.ics23.CompressedNonExistenceProof.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return CompressedBatchEntry; + })(); + ics23.CompressedExistenceProof = (function () { + function CompressedExistenceProof(p) { + this.path = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + CompressedExistenceProof.prototype.key = $util.newBuffer([]); + CompressedExistenceProof.prototype.value = $util.newBuffer([]); + CompressedExistenceProof.prototype.leaf = null; + CompressedExistenceProof.prototype.path = $util.emptyArray; + CompressedExistenceProof.create = function create(properties) { + return new CompressedExistenceProof(properties); + }; + CompressedExistenceProof.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(10).bytes(m.key); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) w.uint32(18).bytes(m.value); + if (m.leaf != null && Object.hasOwnProperty.call(m, "leaf")) + $root.ics23.LeafOp.encode(m.leaf, w.uint32(26).fork()).ldelim(); + if (m.path != null && m.path.length) { + w.uint32(34).fork(); + for (var i = 0; i < m.path.length; ++i) w.int32(m.path[i]); + w.ldelim(); + } + return w; + }; + CompressedExistenceProof.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.CompressedExistenceProof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.key = r.bytes(); + break; + case 2: + m.value = r.bytes(); + break; + case 3: + m.leaf = $root.ics23.LeafOp.decode(r, r.uint32()); + break; + case 4: + if (!(m.path && m.path.length)) m.path = []; + if ((t & 7) === 2) { + var c2 = r.uint32() + r.pos; + while (r.pos < c2) m.path.push(r.int32()); + } else m.path.push(r.int32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return CompressedExistenceProof; + })(); + ics23.CompressedNonExistenceProof = (function () { + function CompressedNonExistenceProof(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + CompressedNonExistenceProof.prototype.key = $util.newBuffer([]); + CompressedNonExistenceProof.prototype.left = null; + CompressedNonExistenceProof.prototype.right = null; + CompressedNonExistenceProof.create = function create(properties) { + return new CompressedNonExistenceProof(properties); + }; + CompressedNonExistenceProof.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(10).bytes(m.key); + if (m.left != null && Object.hasOwnProperty.call(m, "left")) + $root.ics23.CompressedExistenceProof.encode(m.left, w.uint32(18).fork()).ldelim(); + if (m.right != null && Object.hasOwnProperty.call(m, "right")) + $root.ics23.CompressedExistenceProof.encode(m.right, w.uint32(26).fork()).ldelim(); + return w; + }; + CompressedNonExistenceProof.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.ics23.CompressedNonExistenceProof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.key = r.bytes(); + break; + case 2: + m.left = $root.ics23.CompressedExistenceProof.decode(r, r.uint32()); + break; + case 3: + m.right = $root.ics23.CompressedExistenceProof.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return CompressedNonExistenceProof; + })(); + return ics23; +})(); exports.tendermint = $root.tendermint = (() => { const tendermint = {}; tendermint.abci = (function () { diff --git a/packages/stargate/src/queries/ibc.spec.ts b/packages/stargate/src/queries/ibc.spec.ts index 75bdba1f..16c46057 100644 --- a/packages/stargate/src/queries/ibc.spec.ts +++ b/packages/stargate/src/queries/ibc.spec.ts @@ -60,8 +60,12 @@ describe("IbcExtension", () => { pendingWithoutSimapp(); const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl); - const response = await client.ibc.unverified.packetCommitment(ibcTest.portId, ibcTest.channelId, 4); - expect(response.commitment).toEqual(ibcTest.commitmentData); + const response = await client.ibc.unverified.packetCommitment( + ibcTest.portId, + ibcTest.channelId, + ibcTest.commitment.sequence, + ); + expect(response.commitment).toEqual(ibcTest.commitment.data); expect(response.proofHeight).toBeInstanceOf(ibc.core.client.v1.Height); tmClient.disconnect(); @@ -84,13 +88,14 @@ describe("IbcExtension", () => { describe("packetAcknowledgement", () => { it("works", async () => { + pending("We don't have an acknowledgement for testing at the moment"); pendingWithoutSimapp(); const [client, tmClient] = await makeClientWithIbc(simapp.tendermintUrl); const response = await client.ibc.unverified.packetAcknowledgement( ibcTest.portId, ibcTest.channelId, - 1, + ibcTest.commitment.sequence, ); expect(response.acknowledgement).toEqual(ibcTest.packetAcknowledgements[0].data); expect(response.proofHeight).toBeInstanceOf(ibc.core.client.v1.Height); @@ -125,12 +130,8 @@ describe("IbcExtension", () => { 1, 2, 3, - 4, - 5, - 6, - 7, ]); - expect(response.sequences).toEqual([4, 5, 6, 7].map((n) => Long.fromInt(n, true))); + expect(response.sequences).toEqual([1, 2, 3].map((n) => Long.fromInt(n, true))); expect(response.height).toBeInstanceOf(ibc.core.client.v1.Height); tmClient.disconnect(); @@ -151,7 +152,7 @@ describe("IbcExtension", () => { 6, 7, ]); - expect(response.sequences).toEqual([Long.fromInt(4, true)]); + expect(response.sequences).toEqual([Long.fromInt(ibcTest.commitment.sequence, true)]); expect(response.height).toBeInstanceOf(ibc.core.client.v1.Height); tmClient.disconnect(); diff --git a/packages/stargate/src/queries/ibctestdata.spec.ts b/packages/stargate/src/queries/ibctestdata.spec.ts index d6fe2fac..1e3c48eb 100644 --- a/packages/stargate/src/queries/ibctestdata.spec.ts +++ b/packages/stargate/src/queries/ibctestdata.spec.ts @@ -5,64 +5,60 @@ import { ibc } from "../codec"; // From scripts/simapp/genesis-ibc.json -export const portId = "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5"; -export const channelId = "testchain0-conn00"; -export const connectionId = "testchain0-conn0"; -export const clientId = "client0Fortestchain1"; +export const portId = "transfer"; +export const channelId = "channel-0"; +export const connectionId = "connection-0"; +export const clientId = "07-tendermint-0"; export const channel = ibc.core.channel.v1.Channel.create({ state: ibc.core.channel.v1.State.STATE_OPEN, ordering: ibc.core.channel.v1.Order.ORDER_UNORDERED, counterparty: ibc.core.channel.v1.Counterparty.create({ - portId: "wasm.cosmos10pyejy66429refv3g35g2t7am0was7yacjc2l4", - channelId: "testchain1-conn00", + portId: portId, + channelId: channelId, }), connectionHops: [connectionId], - version: "pong", + version: "ics20-1", }); export const identifiedChannel = ibc.core.channel.v1.IdentifiedChannel.create({ state: ibc.core.channel.v1.State.STATE_OPEN, ordering: ibc.core.channel.v1.Order.ORDER_UNORDERED, counterparty: ibc.core.channel.v1.Counterparty.create({ - portId: "wasm.cosmos10pyejy66429refv3g35g2t7am0was7yacjc2l4", - channelId: "testchain1-conn00", + portId: portId, + channelId: "channel-0", }), connectionHops: [connectionId], - version: "pong", + version: "ics20-1", portId: portId, channelId: channelId, }); -export const commitmentData = fromBase64("DIuspQzH8GooFceqNxkTsiZXBn9qoWWJMUqsAIB1G5c="); +/** + * ``` + * jq ".channel_genesis.commitments[0]" scripts/simapp/genesis-ibc.json + * ``` + */ +export const commitment = { + sequence: 1, + data: fromBase64("hYz5Dx6o09DcSEWZR6xlJYwLgYUnLithsXMGtujic4I="), +}; export const packetState = ibc.core.channel.v1.PacketState.create({ portId: portId, channelId: channelId, - sequence: Long.fromInt(4, true), - data: commitmentData, + sequence: Long.fromInt(commitment.sequence, true), + data: commitment.data, }); -export const packetAcknowledgements = [ - ibc.core.channel.v1.PacketState.create({ - portId: portId, - channelId: channelId, - sequence: Long.fromInt(1, true), - data: fromBase64("9RKC5OuTvBsFMtD79dHHvb9qCxw08IKsSJlAwmiw8tI="), - }), - ibc.core.channel.v1.PacketState.create({ - portId: portId, - channelId: channelId, - sequence: Long.fromInt(2, true), - data: fromBase64("Nj784gGVOFk2mdt+wAk/LOoPdUOo+5+0JfYs0yAubZU="), - }), - ibc.core.channel.v1.PacketState.create({ - portId: portId, - channelId: channelId, - sequence: Long.fromInt(3, true), - data: fromBase64("+lLTGP1dlSD6MBpJgBIvx98Psd3U2xo500K7JyMkya8="), - }), -]; +/** + * Unfortunatly empty right now + * + * ``` + * jq ".channel_genesis.acknowledgements" scripts/simapp/genesis-ibc.json + * ``` + */ +export const packetAcknowledgements: ibc.core.channel.v1.PacketState[] = []; export const connection = ibc.core.connection.v1.ConnectionEnd.create({ clientId: clientId, @@ -74,8 +70,8 @@ export const connection = ibc.core.connection.v1.ConnectionEnd.create({ ], state: ibc.core.connection.v1.State.STATE_OPEN, counterparty: ibc.core.connection.v1.Counterparty.create({ - clientId: "client0Fortestchain0", - connectionId: "testchain1-conn0", + clientId: "07-tendermint-0", + connectionId: "connection-0", prefix: ibc.core.commitment.v1.MerklePrefix.create({ keyPrefix: fromBase64("aWJj"), }), @@ -93,8 +89,8 @@ export const identifiedConnection = ibc.core.connection.v1.IdentifiedConnection. ], state: ibc.core.connection.v1.State.STATE_OPEN, counterparty: ibc.core.connection.v1.Counterparty.create({ - clientId: "client0Fortestchain0", - connectionId: "testchain1-conn0", + clientId: "07-tendermint-0", + connectionId: "connection-0", prefix: ibc.core.commitment.v1.MerklePrefix.create({ keyPrefix: fromBase64("aWJj"), }), diff --git a/packages/stargate/src/testutils.spec.ts b/packages/stargate/src/testutils.spec.ts index 9d2f4f14..3cc83f6c 100644 --- a/packages/stargate/src/testutils.spec.ts +++ b/packages/stargate/src/testutils.spec.ts @@ -72,15 +72,33 @@ export const unused = { }; export const validator = { - /** From first gentx's auth_info.signer_infos in scripts/simapp/template/.simapp/config/genesis.json */ + /** + * From first gentx's auth_info.signer_infos in scripts/simapp/template/.simapp/config/genesis.json + * + * ``` + * jq ".app_state.genutil.gen_txs[0].auth_info.signer_infos[0].public_key" scripts/simapp/template/.simapp/config/genesis.json + * ``` + */ pubkey: { type: "tendermint/PubKeySecp256k1", - value: "AiRHwaEnXTLekByvbz4VnCW1TW2Pelp/mb4tK8ple1Xq", + value: "Ap1EN+TjP611NX0PicqFJXknbLmxBbhgoCgGtRF7SLQk", }, - /** delegator_address from /cosmos.staking.v1beta1.MsgCreateValidator in scripts/simapp/template/.simapp/config/genesis.json */ - delegatorAddress: "cosmos10083dys7qlzn663wcusq6hkr8wp7k2mm0sk4u9", - /** validator_address from /cosmos.staking.v1beta1.MsgCreateValidator in scripts/simapp/template/.simapp/config/genesis.json */ - validatorAddress: "cosmosvaloper10083dys7qlzn663wcusq6hkr8wp7k2mm2yzqsk", + /** + * delegator_address from /cosmos.staking.v1beta1.MsgCreateValidator in scripts/simapp/template/.simapp/config/genesis.json + * + * ``` + * jq ".app_state.genutil.gen_txs[0].body.messages[0].delegator_address" scripts/simapp/template/.simapp/config/genesis.json + * ``` + */ + delegatorAddress: "cosmos1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5n86vyq", + /** + * validator_address from /cosmos.staking.v1beta1.MsgCreateValidator in scripts/simapp/template/.simapp/config/genesis.json + * + * ``` + * jq ".app_state.genutil.gen_txs[0].body.messages[0].validator_address" scripts/simapp/template/.simapp/config/genesis.json + * ``` + */ + validatorAddress: "cosmosvaloper1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5knwegn", accountNumber: 0, sequence: 1, }; diff --git a/packages/stargate/types/codec/generated/codecimpl.d.ts b/packages/stargate/types/codec/generated/codecimpl.d.ts index a77fe446..32dd36f8 100644 --- a/packages/stargate/types/codec/generated/codecimpl.d.ts +++ b/packages/stargate/types/codec/generated/codecimpl.d.ts @@ -9228,11 +9228,11 @@ export namespace ibc { /** QueryChannelConsensusStateRequest channelId */ channelId?: string | null; - /** QueryChannelConsensusStateRequest versionNumber */ - versionNumber?: Long | null; + /** QueryChannelConsensusStateRequest revisionNumber */ + revisionNumber?: Long | null; - /** QueryChannelConsensusStateRequest versionHeight */ - versionHeight?: Long | null; + /** QueryChannelConsensusStateRequest revisionHeight */ + revisionHeight?: Long | null; } /** Represents a QueryChannelConsensusStateRequest. */ @@ -9249,11 +9249,11 @@ export namespace ibc { /** QueryChannelConsensusStateRequest channelId. */ public channelId: string; - /** QueryChannelConsensusStateRequest versionNumber. */ - public versionNumber: Long; + /** QueryChannelConsensusStateRequest revisionNumber. */ + public revisionNumber: Long; - /** QueryChannelConsensusStateRequest versionHeight. */ - public versionHeight: Long; + /** QueryChannelConsensusStateRequest revisionHeight. */ + public revisionHeight: Long; /** * Creates a new QueryChannelConsensusStateRequest instance using the specified properties. @@ -10354,598 +10354,6 @@ export namespace ibc { namespace client { /** Namespace v1. */ namespace v1 { - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - /** - * Constructs a new Msg service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Msg service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create( - rpcImpl: $protobuf.RPCImpl, - requestDelimited?: boolean, - responseDelimited?: boolean, - ): Msg; - - /** - * Calls CreateClient. - * @param request MsgCreateClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgCreateClientResponse - */ - public createClient( - request: ibc.core.client.v1.IMsgCreateClient, - callback: ibc.core.client.v1.Msg.CreateClientCallback, - ): void; - - /** - * Calls CreateClient. - * @param request MsgCreateClient message or plain object - * @returns Promise - */ - public createClient( - request: ibc.core.client.v1.IMsgCreateClient, - ): Promise; - - /** - * Calls UpdateClient. - * @param request MsgUpdateClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateClientResponse - */ - public updateClient( - request: ibc.core.client.v1.IMsgUpdateClient, - callback: ibc.core.client.v1.Msg.UpdateClientCallback, - ): void; - - /** - * Calls UpdateClient. - * @param request MsgUpdateClient message or plain object - * @returns Promise - */ - public updateClient( - request: ibc.core.client.v1.IMsgUpdateClient, - ): Promise; - - /** - * Calls UpgradeClient. - * @param request MsgUpgradeClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpgradeClientResponse - */ - public upgradeClient( - request: ibc.core.client.v1.IMsgUpgradeClient, - callback: ibc.core.client.v1.Msg.UpgradeClientCallback, - ): void; - - /** - * Calls UpgradeClient. - * @param request MsgUpgradeClient message or plain object - * @returns Promise - */ - public upgradeClient( - request: ibc.core.client.v1.IMsgUpgradeClient, - ): Promise; - - /** - * Calls SubmitMisbehaviour. - * @param request MsgSubmitMisbehaviour message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSubmitMisbehaviourResponse - */ - public submitMisbehaviour( - request: ibc.core.client.v1.IMsgSubmitMisbehaviour, - callback: ibc.core.client.v1.Msg.SubmitMisbehaviourCallback, - ): void; - - /** - * Calls SubmitMisbehaviour. - * @param request MsgSubmitMisbehaviour message or plain object - * @returns Promise - */ - public submitMisbehaviour( - request: ibc.core.client.v1.IMsgSubmitMisbehaviour, - ): Promise; - } - - namespace Msg { - /** - * Callback as used by {@link ibc.core.client.v1.Msg#createClient}. - * @param error Error, if any - * @param [response] MsgCreateClientResponse - */ - type CreateClientCallback = ( - error: Error | null, - response?: ibc.core.client.v1.MsgCreateClientResponse, - ) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#updateClient}. - * @param error Error, if any - * @param [response] MsgUpdateClientResponse - */ - type UpdateClientCallback = ( - error: Error | null, - response?: ibc.core.client.v1.MsgUpdateClientResponse, - ) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#upgradeClient}. - * @param error Error, if any - * @param [response] MsgUpgradeClientResponse - */ - type UpgradeClientCallback = ( - error: Error | null, - response?: ibc.core.client.v1.MsgUpgradeClientResponse, - ) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#submitMisbehaviour}. - * @param error Error, if any - * @param [response] MsgSubmitMisbehaviourResponse - */ - type SubmitMisbehaviourCallback = ( - error: Error | null, - response?: ibc.core.client.v1.MsgSubmitMisbehaviourResponse, - ) => void; - } - - /** Properties of a MsgCreateClient. */ - interface IMsgCreateClient { - /** MsgCreateClient clientId */ - clientId?: string | null; - - /** MsgCreateClient clientState */ - clientState?: google.protobuf.IAny | null; - - /** MsgCreateClient consensusState */ - consensusState?: google.protobuf.IAny | null; - - /** MsgCreateClient signer */ - signer?: string | null; - } - - /** Represents a MsgCreateClient. */ - class MsgCreateClient implements IMsgCreateClient { - /** - * Constructs a new MsgCreateClient. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgCreateClient); - - /** MsgCreateClient clientId. */ - public clientId: string; - - /** MsgCreateClient clientState. */ - public clientState?: google.protobuf.IAny | null; - - /** MsgCreateClient consensusState. */ - public consensusState?: google.protobuf.IAny | null; - - /** MsgCreateClient signer. */ - public signer: string; - - /** - * Creates a new MsgCreateClient instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgCreateClient instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgCreateClient, - ): ibc.core.client.v1.MsgCreateClient; - - /** - * Encodes the specified MsgCreateClient message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. - * @param m MsgCreateClient message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgCreateClient, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgCreateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgCreateClient; - } - - /** Properties of a MsgCreateClientResponse. */ - interface IMsgCreateClientResponse {} - - /** Represents a MsgCreateClientResponse. */ - class MsgCreateClientResponse implements IMsgCreateClientResponse { - /** - * Constructs a new MsgCreateClientResponse. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgCreateClientResponse); - - /** - * Creates a new MsgCreateClientResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgCreateClientResponse instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgCreateClientResponse, - ): ibc.core.client.v1.MsgCreateClientResponse; - - /** - * Encodes the specified MsgCreateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. - * @param m MsgCreateClientResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgCreateClientResponse, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgCreateClientResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgCreateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgCreateClientResponse; - } - - /** Properties of a MsgUpdateClient. */ - interface IMsgUpdateClient { - /** MsgUpdateClient clientId */ - clientId?: string | null; - - /** MsgUpdateClient header */ - header?: google.protobuf.IAny | null; - - /** MsgUpdateClient signer */ - signer?: string | null; - } - - /** Represents a MsgUpdateClient. */ - class MsgUpdateClient implements IMsgUpdateClient { - /** - * Constructs a new MsgUpdateClient. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgUpdateClient); - - /** MsgUpdateClient clientId. */ - public clientId: string; - - /** MsgUpdateClient header. */ - public header?: google.protobuf.IAny | null; - - /** MsgUpdateClient signer. */ - public signer: string; - - /** - * Creates a new MsgUpdateClient instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUpdateClient instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgUpdateClient, - ): ibc.core.client.v1.MsgUpdateClient; - - /** - * Encodes the specified MsgUpdateClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. - * @param m MsgUpdateClient message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgUpdateClient, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUpdateClient message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUpdateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgUpdateClient; - } - - /** Properties of a MsgUpdateClientResponse. */ - interface IMsgUpdateClientResponse {} - - /** Represents a MsgUpdateClientResponse. */ - class MsgUpdateClientResponse implements IMsgUpdateClientResponse { - /** - * Constructs a new MsgUpdateClientResponse. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgUpdateClientResponse); - - /** - * Creates a new MsgUpdateClientResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUpdateClientResponse instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgUpdateClientResponse, - ): ibc.core.client.v1.MsgUpdateClientResponse; - - /** - * Encodes the specified MsgUpdateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. - * @param m MsgUpdateClientResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgUpdateClientResponse, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUpdateClientResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUpdateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgUpdateClientResponse; - } - - /** Properties of a MsgUpgradeClient. */ - interface IMsgUpgradeClient { - /** MsgUpgradeClient clientId */ - clientId?: string | null; - - /** MsgUpgradeClient clientState */ - clientState?: google.protobuf.IAny | null; - - /** MsgUpgradeClient upgradeHeight */ - upgradeHeight?: ibc.core.client.v1.IHeight | null; - - /** MsgUpgradeClient proofUpgrade */ - proofUpgrade?: Uint8Array | null; - - /** MsgUpgradeClient signer */ - signer?: string | null; - } - - /** Represents a MsgUpgradeClient. */ - class MsgUpgradeClient implements IMsgUpgradeClient { - /** - * Constructs a new MsgUpgradeClient. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgUpgradeClient); - - /** MsgUpgradeClient clientId. */ - public clientId: string; - - /** MsgUpgradeClient clientState. */ - public clientState?: google.protobuf.IAny | null; - - /** MsgUpgradeClient upgradeHeight. */ - public upgradeHeight?: ibc.core.client.v1.IHeight | null; - - /** MsgUpgradeClient proofUpgrade. */ - public proofUpgrade: Uint8Array; - - /** MsgUpgradeClient signer. */ - public signer: string; - - /** - * Creates a new MsgUpgradeClient instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUpgradeClient instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgUpgradeClient, - ): ibc.core.client.v1.MsgUpgradeClient; - - /** - * Encodes the specified MsgUpgradeClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. - * @param m MsgUpgradeClient message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgUpgradeClient, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUpgradeClient message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUpgradeClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgUpgradeClient; - } - - /** Properties of a MsgUpgradeClientResponse. */ - interface IMsgUpgradeClientResponse {} - - /** Represents a MsgUpgradeClientResponse. */ - class MsgUpgradeClientResponse implements IMsgUpgradeClientResponse { - /** - * Constructs a new MsgUpgradeClientResponse. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgUpgradeClientResponse); - - /** - * Creates a new MsgUpgradeClientResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUpgradeClientResponse instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgUpgradeClientResponse, - ): ibc.core.client.v1.MsgUpgradeClientResponse; - - /** - * Encodes the specified MsgUpgradeClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. - * @param m MsgUpgradeClientResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgUpgradeClientResponse, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUpgradeClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgUpgradeClientResponse; - } - - /** Properties of a MsgSubmitMisbehaviour. */ - interface IMsgSubmitMisbehaviour { - /** MsgSubmitMisbehaviour clientId */ - clientId?: string | null; - - /** MsgSubmitMisbehaviour misbehaviour */ - misbehaviour?: google.protobuf.IAny | null; - - /** MsgSubmitMisbehaviour signer */ - signer?: string | null; - } - - /** Represents a MsgSubmitMisbehaviour. */ - class MsgSubmitMisbehaviour implements IMsgSubmitMisbehaviour { - /** - * Constructs a new MsgSubmitMisbehaviour. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgSubmitMisbehaviour); - - /** MsgSubmitMisbehaviour clientId. */ - public clientId: string; - - /** MsgSubmitMisbehaviour misbehaviour. */ - public misbehaviour?: google.protobuf.IAny | null; - - /** MsgSubmitMisbehaviour signer. */ - public signer: string; - - /** - * Creates a new MsgSubmitMisbehaviour instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSubmitMisbehaviour instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgSubmitMisbehaviour, - ): ibc.core.client.v1.MsgSubmitMisbehaviour; - - /** - * Encodes the specified MsgSubmitMisbehaviour message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. - * @param m MsgSubmitMisbehaviour message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgSubmitMisbehaviour, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSubmitMisbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgSubmitMisbehaviour; - } - - /** Properties of a MsgSubmitMisbehaviourResponse. */ - interface IMsgSubmitMisbehaviourResponse {} - - /** Represents a MsgSubmitMisbehaviourResponse. */ - class MsgSubmitMisbehaviourResponse implements IMsgSubmitMisbehaviourResponse { - /** - * Constructs a new MsgSubmitMisbehaviourResponse. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse); - - /** - * Creates a new MsgSubmitMisbehaviourResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSubmitMisbehaviourResponse instance - */ - public static create( - properties?: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse, - ): ibc.core.client.v1.MsgSubmitMisbehaviourResponse; - - /** - * Encodes the specified MsgSubmitMisbehaviourResponse message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. - * @param m MsgSubmitMisbehaviourResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSubmitMisbehaviourResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): ibc.core.client.v1.MsgSubmitMisbehaviourResponse; - } - /** Properties of an IdentifiedClientState. */ interface IIdentifiedClientState { /** IdentifiedClientState clientId */ @@ -11188,11 +10596,11 @@ export namespace ibc { /** Properties of an Height. */ interface IHeight { - /** Height versionNumber */ - versionNumber?: Long | null; + /** Height revisionNumber */ + revisionNumber?: Long | null; - /** Height versionHeight */ - versionHeight?: Long | null; + /** Height revisionHeight */ + revisionHeight?: Long | null; } /** Represents an Height. */ @@ -11203,11 +10611,11 @@ export namespace ibc { */ constructor(p?: ibc.core.client.v1.IHeight); - /** Height versionNumber. */ - public versionNumber: Long; + /** Height revisionNumber. */ + public revisionNumber: Long; - /** Height versionHeight. */ - public versionHeight: Long; + /** Height revisionHeight. */ + public revisionHeight: Long; /** * Creates a new Height instance using the specified properties. @@ -11234,6 +10642,49 @@ export namespace ibc { */ public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ibc.core.client.v1.Height; } + + /** Properties of a Params. */ + interface IParams { + /** Params allowedClients */ + allowedClients?: string[] | null; + } + + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [p] Properties to set + */ + constructor(p?: ibc.core.client.v1.IParams); + + /** Params allowedClients. */ + public allowedClients: string[]; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: ibc.core.client.v1.IParams): ibc.core.client.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. + * @param m Params message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ibc.core.client.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ibc.core.client.v1.Params; + } } } @@ -11343,7 +10794,7 @@ export namespace ibc { /** Properties of a MerklePath. */ interface IMerklePath { /** MerklePath keyPath */ - keyPath?: ibc.core.commitment.v1.IKeyPath | null; + keyPath?: string[] | null; } /** Represents a MerklePath. */ @@ -11355,7 +10806,7 @@ export namespace ibc { constructor(p?: ibc.core.commitment.v1.IMerklePath); /** MerklePath keyPath. */ - public keyPath?: ibc.core.commitment.v1.IKeyPath | null; + public keyPath: string[]; /** * Creates a new MerklePath instance using the specified properties. @@ -11390,8 +10841,8 @@ export namespace ibc { /** Properties of a MerkleProof. */ interface IMerkleProof { - /** MerkleProof proof */ - proof?: tendermint.crypto.IProofOps | null; + /** MerkleProof proofs */ + proofs?: ics23.ICommitmentProof[] | null; } /** Represents a MerkleProof. */ @@ -11402,8 +10853,8 @@ export namespace ibc { */ constructor(p?: ibc.core.commitment.v1.IMerkleProof); - /** MerkleProof proof. */ - public proof?: tendermint.crypto.IProofOps | null; + /** MerkleProof proofs. */ + public proofs: ics23.ICommitmentProof[]; /** * Creates a new MerkleProof instance using the specified properties. @@ -11438,104 +10889,6 @@ export namespace ibc { l?: number, ): ibc.core.commitment.v1.MerkleProof; } - - /** Properties of a KeyPath. */ - interface IKeyPath { - /** KeyPath keys */ - keys?: ibc.core.commitment.v1.IKey[] | null; - } - - /** Represents a KeyPath. */ - class KeyPath implements IKeyPath { - /** - * Constructs a new KeyPath. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.commitment.v1.IKeyPath); - - /** KeyPath keys. */ - public keys: ibc.core.commitment.v1.IKey[]; - - /** - * Creates a new KeyPath instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyPath instance - */ - public static create(properties?: ibc.core.commitment.v1.IKeyPath): ibc.core.commitment.v1.KeyPath; - - /** - * Encodes the specified KeyPath message. Does not implicitly {@link ibc.core.commitment.v1.KeyPath.verify|verify} messages. - * @param m KeyPath message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: ibc.core.commitment.v1.IKeyPath, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyPath message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns KeyPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ibc.core.commitment.v1.KeyPath; - } - - /** Properties of a Key. */ - interface IKey { - /** Key name */ - name?: Uint8Array | null; - - /** Key enc */ - enc?: ibc.core.commitment.v1.KeyEncoding | null; - } - - /** Represents a Key. */ - class Key implements IKey { - /** - * Constructs a new Key. - * @param [p] Properties to set - */ - constructor(p?: ibc.core.commitment.v1.IKey); - - /** Key name. */ - public name: Uint8Array; - - /** Key enc. */ - public enc: ibc.core.commitment.v1.KeyEncoding; - - /** - * Creates a new Key instance using the specified properties. - * @param [properties] Properties to set - * @returns Key instance - */ - public static create(properties?: ibc.core.commitment.v1.IKey): ibc.core.commitment.v1.Key; - - /** - * Encodes the specified Key message. Does not implicitly {@link ibc.core.commitment.v1.Key.verify|verify} messages. - * @param m Key message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: ibc.core.commitment.v1.IKey, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Key message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Key - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ibc.core.commitment.v1.Key; - } - - /** KeyEncoding enum. */ - enum KeyEncoding { - KEY_ENCODING_URL_UNSPECIFIED = 0, - KEY_ENCODING_HEX = 1, - } } } @@ -11556,6 +10909,9 @@ export namespace ibc { /** ConnectionEnd counterparty */ counterparty?: ibc.core.connection.v1.ICounterparty | null; + + /** ConnectionEnd delayPeriod */ + delayPeriod?: Long | null; } /** Represents a ConnectionEnd. */ @@ -11578,6 +10934,9 @@ export namespace ibc { /** ConnectionEnd counterparty. */ public counterparty?: ibc.core.connection.v1.ICounterparty | null; + /** ConnectionEnd delayPeriod. */ + public delayPeriod: Long; + /** * Creates a new ConnectionEnd instance using the specified properties. * @param [properties] Properties to set @@ -11628,6 +10987,9 @@ export namespace ibc { /** IdentifiedConnection counterparty */ counterparty?: ibc.core.connection.v1.ICounterparty | null; + + /** IdentifiedConnection delayPeriod */ + delayPeriod?: Long | null; } /** Represents an IdentifiedConnection. */ @@ -11653,6 +11015,9 @@ export namespace ibc { /** IdentifiedConnection counterparty. */ public counterparty?: ibc.core.connection.v1.ICounterparty | null; + /** IdentifiedConnection delayPeriod. */ + public delayPeriod: Long; + /** * Creates a new IdentifiedConnection instance using the specified properties. * @param [properties] Properties to set @@ -12547,11 +11912,11 @@ export namespace ibc { /** QueryConnectionConsensusStateRequest connectionId */ connectionId?: string | null; - /** QueryConnectionConsensusStateRequest versionNumber */ - versionNumber?: Long | null; + /** QueryConnectionConsensusStateRequest revisionNumber */ + revisionNumber?: Long | null; - /** QueryConnectionConsensusStateRequest versionHeight */ - versionHeight?: Long | null; + /** QueryConnectionConsensusStateRequest revisionHeight */ + revisionHeight?: Long | null; } /** Represents a QueryConnectionConsensusStateRequest. */ @@ -12565,11 +11930,11 @@ export namespace ibc { /** QueryConnectionConsensusStateRequest connectionId. */ public connectionId: string; - /** QueryConnectionConsensusStateRequest versionNumber. */ - public versionNumber: Long; + /** QueryConnectionConsensusStateRequest revisionNumber. */ + public revisionNumber: Long; - /** QueryConnectionConsensusStateRequest versionHeight. */ - public versionHeight: Long; + /** QueryConnectionConsensusStateRequest revisionHeight. */ + public revisionHeight: Long; /** * Creates a new QueryConnectionConsensusStateRequest instance using the specified properties. @@ -12678,6 +12043,847 @@ export namespace ibc { } } +/** Namespace ics23. */ +export namespace ics23 { + /** HashOp enum. */ + enum HashOp { + NO_HASH = 0, + SHA256 = 1, + SHA512 = 2, + KECCAK = 3, + RIPEMD160 = 4, + BITCOIN = 5, + } + + /** + * LengthOp defines how to process the key and value of the LeafOp + * to include length information. After encoding the length with the given + * algorithm, the length will be prepended to the key and value bytes. + * (Each one with it's own encoded length) + */ + enum LengthOp { + NO_PREFIX = 0, + VAR_PROTO = 1, + VAR_RLP = 2, + FIXED32_BIG = 3, + FIXED32_LITTLE = 4, + FIXED64_BIG = 5, + FIXED64_LITTLE = 6, + REQUIRE_32_BYTES = 7, + REQUIRE_64_BYTES = 8, + } + + /** Properties of an ExistenceProof. */ + interface IExistenceProof { + /** ExistenceProof key */ + key?: Uint8Array | null; + + /** ExistenceProof value */ + value?: Uint8Array | null; + + /** ExistenceProof leaf */ + leaf?: ics23.ILeafOp | null; + + /** ExistenceProof path */ + path?: ics23.IInnerOp[] | null; + } + + /** + * ExistenceProof takes a key and a value and a set of steps to perform on it. + * The result of peforming all these steps will provide a "root hash", which can + * be compared to the value in a header. + * + * Since it is computationally infeasible to produce a hash collission for any of the used + * cryptographic hash functions, if someone can provide a series of operations to transform + * a given key and value into a root hash that matches some trusted root, these key and values + * must be in the referenced merkle tree. + * + * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, + * which should be controlled by a spec. Eg. with lengthOp as NONE, + * prefix = FOO, key = BAR, value = CHOICE + * and + * prefix = F, key = OOBAR, value = CHOICE + * would produce the same value. + * + * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field + * in the ProofSpec is valuable to prevent this mutability. And why all trees should + * length-prefix the data before hashing it. + */ + class ExistenceProof implements IExistenceProof { + /** + * Constructs a new ExistenceProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.IExistenceProof); + + /** ExistenceProof key. */ + public key: Uint8Array; + + /** ExistenceProof value. */ + public value: Uint8Array; + + /** ExistenceProof leaf. */ + public leaf?: ics23.ILeafOp | null; + + /** ExistenceProof path. */ + public path: ics23.IInnerOp[]; + + /** + * Creates a new ExistenceProof instance using the specified properties. + * @param [properties] Properties to set + * @returns ExistenceProof instance + */ + public static create(properties?: ics23.IExistenceProof): ics23.ExistenceProof; + + /** + * Encodes the specified ExistenceProof message. Does not implicitly {@link ics23.ExistenceProof.verify|verify} messages. + * @param m ExistenceProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IExistenceProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExistenceProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.ExistenceProof; + } + + /** Properties of a NonExistenceProof. */ + interface INonExistenceProof { + /** NonExistenceProof key */ + key?: Uint8Array | null; + + /** NonExistenceProof left */ + left?: ics23.IExistenceProof | null; + + /** NonExistenceProof right */ + right?: ics23.IExistenceProof | null; + } + + /** Represents a NonExistenceProof. */ + class NonExistenceProof implements INonExistenceProof { + /** + * Constructs a new NonExistenceProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.INonExistenceProof); + + /** NonExistenceProof key. */ + public key: Uint8Array; + + /** NonExistenceProof left. */ + public left?: ics23.IExistenceProof | null; + + /** NonExistenceProof right. */ + public right?: ics23.IExistenceProof | null; + + /** + * Creates a new NonExistenceProof instance using the specified properties. + * @param [properties] Properties to set + * @returns NonExistenceProof instance + */ + public static create(properties?: ics23.INonExistenceProof): ics23.NonExistenceProof; + + /** + * Encodes the specified NonExistenceProof message. Does not implicitly {@link ics23.NonExistenceProof.verify|verify} messages. + * @param m NonExistenceProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.INonExistenceProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NonExistenceProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns NonExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.NonExistenceProof; + } + + /** Properties of a CommitmentProof. */ + interface ICommitmentProof { + /** CommitmentProof exist */ + exist?: ics23.IExistenceProof | null; + + /** CommitmentProof nonexist */ + nonexist?: ics23.INonExistenceProof | null; + + /** CommitmentProof batch */ + batch?: ics23.IBatchProof | null; + + /** CommitmentProof compressed */ + compressed?: ics23.ICompressedBatchProof | null; + } + + /** Represents a CommitmentProof. */ + class CommitmentProof implements ICommitmentProof { + /** + * Constructs a new CommitmentProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICommitmentProof); + + /** CommitmentProof exist. */ + public exist?: ics23.IExistenceProof | null; + + /** CommitmentProof nonexist. */ + public nonexist?: ics23.INonExistenceProof | null; + + /** CommitmentProof batch. */ + public batch?: ics23.IBatchProof | null; + + /** CommitmentProof compressed. */ + public compressed?: ics23.ICompressedBatchProof | null; + + /** CommitmentProof proof. */ + public proof?: "exist" | "nonexist" | "batch" | "compressed"; + + /** + * Creates a new CommitmentProof instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitmentProof instance + */ + public static create(properties?: ics23.ICommitmentProof): ics23.CommitmentProof; + + /** + * Encodes the specified CommitmentProof message. Does not implicitly {@link ics23.CommitmentProof.verify|verify} messages. + * @param m CommitmentProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICommitmentProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommitmentProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CommitmentProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CommitmentProof; + } + + /** Properties of a LeafOp. */ + interface ILeafOp { + /** LeafOp hash */ + hash?: ics23.HashOp | null; + + /** LeafOp prehashKey */ + prehashKey?: ics23.HashOp | null; + + /** LeafOp prehashValue */ + prehashValue?: ics23.HashOp | null; + + /** LeafOp length */ + length?: ics23.LengthOp | null; + + /** LeafOp prefix */ + prefix?: Uint8Array | null; + } + + /** + * LeafOp represents the raw key-value data we wish to prove, and + * must be flexible to represent the internal transformation from + * the original key-value pairs into the basis hash, for many existing + * merkle trees. + * + * key and value are passed in. So that the signature of this operation is: + * leafOp(key, value) -> output + * + * To process this, first prehash the keys and values if needed (ANY means no hash in this case): + * hkey = prehashKey(key) + * hvalue = prehashValue(value) + * + * Then combine the bytes, and hash it + * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) + */ + class LeafOp implements ILeafOp { + /** + * Constructs a new LeafOp. + * @param [p] Properties to set + */ + constructor(p?: ics23.ILeafOp); + + /** LeafOp hash. */ + public hash: ics23.HashOp; + + /** LeafOp prehashKey. */ + public prehashKey: ics23.HashOp; + + /** LeafOp prehashValue. */ + public prehashValue: ics23.HashOp; + + /** LeafOp length. */ + public length: ics23.LengthOp; + + /** LeafOp prefix. */ + public prefix: Uint8Array; + + /** + * Creates a new LeafOp instance using the specified properties. + * @param [properties] Properties to set + * @returns LeafOp instance + */ + public static create(properties?: ics23.ILeafOp): ics23.LeafOp; + + /** + * Encodes the specified LeafOp message. Does not implicitly {@link ics23.LeafOp.verify|verify} messages. + * @param m LeafOp message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ILeafOp, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LeafOp message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns LeafOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.LeafOp; + } + + /** Properties of an InnerOp. */ + interface IInnerOp { + /** InnerOp hash */ + hash?: ics23.HashOp | null; + + /** InnerOp prefix */ + prefix?: Uint8Array | null; + + /** InnerOp suffix */ + suffix?: Uint8Array | null; + } + + /** + * InnerOp represents a merkle-proof step that is not a leaf. + * It represents concatenating two children and hashing them to provide the next result. + * + * The result of the previous step is passed in, so the signature of this op is: + * innerOp(child) -> output + * + * The result of applying InnerOp should be: + * output = op.hash(op.prefix || child || op.suffix) + * + * where the || operator is concatenation of binary data, + * and child is the result of hashing all the tree below this step. + * + * Any special data, like prepending child with the length, or prepending the entire operation with + * some value to differentiate from leaf nodes, should be included in prefix and suffix. + * If either of prefix or suffix is empty, we just treat it as an empty string + */ + class InnerOp implements IInnerOp { + /** + * Constructs a new InnerOp. + * @param [p] Properties to set + */ + constructor(p?: ics23.IInnerOp); + + /** InnerOp hash. */ + public hash: ics23.HashOp; + + /** InnerOp prefix. */ + public prefix: Uint8Array; + + /** InnerOp suffix. */ + public suffix: Uint8Array; + + /** + * Creates a new InnerOp instance using the specified properties. + * @param [properties] Properties to set + * @returns InnerOp instance + */ + public static create(properties?: ics23.IInnerOp): ics23.InnerOp; + + /** + * Encodes the specified InnerOp message. Does not implicitly {@link ics23.InnerOp.verify|verify} messages. + * @param m InnerOp message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IInnerOp, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InnerOp message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns InnerOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.InnerOp; + } + + /** Properties of a ProofSpec. */ + interface IProofSpec { + /** ProofSpec leafSpec */ + leafSpec?: ics23.ILeafOp | null; + + /** ProofSpec innerSpec */ + innerSpec?: ics23.IInnerSpec | null; + + /** ProofSpec maxDepth */ + maxDepth?: number | null; + + /** ProofSpec minDepth */ + minDepth?: number | null; + } + + /** + * ProofSpec defines what the expected parameters are for a given proof type. + * This can be stored in the client and used to validate any incoming proofs. + * + * verify(ProofSpec, Proof) -> Proof | Error + * + * As demonstrated in tests, if we don't fix the algorithm used to calculate the + * LeafHash for a given tree, there are many possible key-value pairs that can + * generate a given hash (by interpretting the preimage differently). + * We need this for proper security, requires client knows a priori what + * tree format server uses. But not in code, rather a configuration object. + */ + class ProofSpec implements IProofSpec { + /** + * Constructs a new ProofSpec. + * @param [p] Properties to set + */ + constructor(p?: ics23.IProofSpec); + + /** ProofSpec leafSpec. */ + public leafSpec?: ics23.ILeafOp | null; + + /** ProofSpec innerSpec. */ + public innerSpec?: ics23.IInnerSpec | null; + + /** ProofSpec maxDepth. */ + public maxDepth: number; + + /** ProofSpec minDepth. */ + public minDepth: number; + + /** + * Creates a new ProofSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ProofSpec instance + */ + public static create(properties?: ics23.IProofSpec): ics23.ProofSpec; + + /** + * Encodes the specified ProofSpec message. Does not implicitly {@link ics23.ProofSpec.verify|verify} messages. + * @param m ProofSpec message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IProofSpec, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProofSpec message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ProofSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.ProofSpec; + } + + /** Properties of an InnerSpec. */ + interface IInnerSpec { + /** InnerSpec childOrder */ + childOrder?: number[] | null; + + /** InnerSpec childSize */ + childSize?: number | null; + + /** InnerSpec minPrefixLength */ + minPrefixLength?: number | null; + + /** InnerSpec maxPrefixLength */ + maxPrefixLength?: number | null; + + /** InnerSpec emptyChild */ + emptyChild?: Uint8Array | null; + + /** InnerSpec hash */ + hash?: ics23.HashOp | null; + } + + /** Represents an InnerSpec. */ + class InnerSpec implements IInnerSpec { + /** + * Constructs a new InnerSpec. + * @param [p] Properties to set + */ + constructor(p?: ics23.IInnerSpec); + + /** InnerSpec childOrder. */ + public childOrder: number[]; + + /** InnerSpec childSize. */ + public childSize: number; + + /** InnerSpec minPrefixLength. */ + public minPrefixLength: number; + + /** InnerSpec maxPrefixLength. */ + public maxPrefixLength: number; + + /** InnerSpec emptyChild. */ + public emptyChild: Uint8Array; + + /** InnerSpec hash. */ + public hash: ics23.HashOp; + + /** + * Creates a new InnerSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns InnerSpec instance + */ + public static create(properties?: ics23.IInnerSpec): ics23.InnerSpec; + + /** + * Encodes the specified InnerSpec message. Does not implicitly {@link ics23.InnerSpec.verify|verify} messages. + * @param m InnerSpec message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IInnerSpec, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InnerSpec message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns InnerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.InnerSpec; + } + + /** Properties of a BatchProof. */ + interface IBatchProof { + /** BatchProof entries */ + entries?: ics23.IBatchEntry[] | null; + } + + /** Represents a BatchProof. */ + class BatchProof implements IBatchProof { + /** + * Constructs a new BatchProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.IBatchProof); + + /** BatchProof entries. */ + public entries: ics23.IBatchEntry[]; + + /** + * Creates a new BatchProof instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchProof instance + */ + public static create(properties?: ics23.IBatchProof): ics23.BatchProof; + + /** + * Encodes the specified BatchProof message. Does not implicitly {@link ics23.BatchProof.verify|verify} messages. + * @param m BatchProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IBatchProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns BatchProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.BatchProof; + } + + /** Properties of a BatchEntry. */ + interface IBatchEntry { + /** BatchEntry exist */ + exist?: ics23.IExistenceProof | null; + + /** BatchEntry nonexist */ + nonexist?: ics23.INonExistenceProof | null; + } + + /** Represents a BatchEntry. */ + class BatchEntry implements IBatchEntry { + /** + * Constructs a new BatchEntry. + * @param [p] Properties to set + */ + constructor(p?: ics23.IBatchEntry); + + /** BatchEntry exist. */ + public exist?: ics23.IExistenceProof | null; + + /** BatchEntry nonexist. */ + public nonexist?: ics23.INonExistenceProof | null; + + /** BatchEntry proof. */ + public proof?: "exist" | "nonexist"; + + /** + * Creates a new BatchEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchEntry instance + */ + public static create(properties?: ics23.IBatchEntry): ics23.BatchEntry; + + /** + * Encodes the specified BatchEntry message. Does not implicitly {@link ics23.BatchEntry.verify|verify} messages. + * @param m BatchEntry message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.IBatchEntry, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchEntry message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns BatchEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.BatchEntry; + } + + /** Properties of a CompressedBatchProof. */ + interface ICompressedBatchProof { + /** CompressedBatchProof entries */ + entries?: ics23.ICompressedBatchEntry[] | null; + + /** CompressedBatchProof lookupInners */ + lookupInners?: ics23.IInnerOp[] | null; + } + + /** Represents a CompressedBatchProof. */ + class CompressedBatchProof implements ICompressedBatchProof { + /** + * Constructs a new CompressedBatchProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICompressedBatchProof); + + /** CompressedBatchProof entries. */ + public entries: ics23.ICompressedBatchEntry[]; + + /** CompressedBatchProof lookupInners. */ + public lookupInners: ics23.IInnerOp[]; + + /** + * Creates a new CompressedBatchProof instance using the specified properties. + * @param [properties] Properties to set + * @returns CompressedBatchProof instance + */ + public static create(properties?: ics23.ICompressedBatchProof): ics23.CompressedBatchProof; + + /** + * Encodes the specified CompressedBatchProof message. Does not implicitly {@link ics23.CompressedBatchProof.verify|verify} messages. + * @param m CompressedBatchProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICompressedBatchProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompressedBatchProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompressedBatchProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CompressedBatchProof; + } + + /** Properties of a CompressedBatchEntry. */ + interface ICompressedBatchEntry { + /** CompressedBatchEntry exist */ + exist?: ics23.ICompressedExistenceProof | null; + + /** CompressedBatchEntry nonexist */ + nonexist?: ics23.ICompressedNonExistenceProof | null; + } + + /** Represents a CompressedBatchEntry. */ + class CompressedBatchEntry implements ICompressedBatchEntry { + /** + * Constructs a new CompressedBatchEntry. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICompressedBatchEntry); + + /** CompressedBatchEntry exist. */ + public exist?: ics23.ICompressedExistenceProof | null; + + /** CompressedBatchEntry nonexist. */ + public nonexist?: ics23.ICompressedNonExistenceProof | null; + + /** CompressedBatchEntry proof. */ + public proof?: "exist" | "nonexist"; + + /** + * Creates a new CompressedBatchEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns CompressedBatchEntry instance + */ + public static create(properties?: ics23.ICompressedBatchEntry): ics23.CompressedBatchEntry; + + /** + * Encodes the specified CompressedBatchEntry message. Does not implicitly {@link ics23.CompressedBatchEntry.verify|verify} messages. + * @param m CompressedBatchEntry message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICompressedBatchEntry, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompressedBatchEntry message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompressedBatchEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CompressedBatchEntry; + } + + /** Properties of a CompressedExistenceProof. */ + interface ICompressedExistenceProof { + /** CompressedExistenceProof key */ + key?: Uint8Array | null; + + /** CompressedExistenceProof value */ + value?: Uint8Array | null; + + /** CompressedExistenceProof leaf */ + leaf?: ics23.ILeafOp | null; + + /** CompressedExistenceProof path */ + path?: number[] | null; + } + + /** Represents a CompressedExistenceProof. */ + class CompressedExistenceProof implements ICompressedExistenceProof { + /** + * Constructs a new CompressedExistenceProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICompressedExistenceProof); + + /** CompressedExistenceProof key. */ + public key: Uint8Array; + + /** CompressedExistenceProof value. */ + public value: Uint8Array; + + /** CompressedExistenceProof leaf. */ + public leaf?: ics23.ILeafOp | null; + + /** CompressedExistenceProof path. */ + public path: number[]; + + /** + * Creates a new CompressedExistenceProof instance using the specified properties. + * @param [properties] Properties to set + * @returns CompressedExistenceProof instance + */ + public static create(properties?: ics23.ICompressedExistenceProof): ics23.CompressedExistenceProof; + + /** + * Encodes the specified CompressedExistenceProof message. Does not implicitly {@link ics23.CompressedExistenceProof.verify|verify} messages. + * @param m CompressedExistenceProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICompressedExistenceProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompressedExistenceProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompressedExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CompressedExistenceProof; + } + + /** Properties of a CompressedNonExistenceProof. */ + interface ICompressedNonExistenceProof { + /** CompressedNonExistenceProof key */ + key?: Uint8Array | null; + + /** CompressedNonExistenceProof left */ + left?: ics23.ICompressedExistenceProof | null; + + /** CompressedNonExistenceProof right */ + right?: ics23.ICompressedExistenceProof | null; + } + + /** Represents a CompressedNonExistenceProof. */ + class CompressedNonExistenceProof implements ICompressedNonExistenceProof { + /** + * Constructs a new CompressedNonExistenceProof. + * @param [p] Properties to set + */ + constructor(p?: ics23.ICompressedNonExistenceProof); + + /** CompressedNonExistenceProof key. */ + public key: Uint8Array; + + /** CompressedNonExistenceProof left. */ + public left?: ics23.ICompressedExistenceProof | null; + + /** CompressedNonExistenceProof right. */ + public right?: ics23.ICompressedExistenceProof | null; + + /** + * Creates a new CompressedNonExistenceProof instance using the specified properties. + * @param [properties] Properties to set + * @returns CompressedNonExistenceProof instance + */ + public static create(properties?: ics23.ICompressedNonExistenceProof): ics23.CompressedNonExistenceProof; + + /** + * Encodes the specified CompressedNonExistenceProof message. Does not implicitly {@link ics23.CompressedNonExistenceProof.verify|verify} messages. + * @param m CompressedNonExistenceProof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: ics23.ICompressedNonExistenceProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompressedNonExistenceProof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompressedNonExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): ics23.CompressedNonExistenceProof; + } +} + /** Namespace tendermint. */ export namespace tendermint { /** Namespace abci. */ diff --git a/scripts/simapp/env b/scripts/simapp/env index c2f8a43d..f7454388 100644 --- a/scripts/simapp/env +++ b/scripts/simapp/env @@ -1,4 +1,4 @@ # Choose from https://hub.docker.com/r/interchainio/simapp/tags REPOSITORY="interchainio/simapp" -VERSION="v0.40.0-rc3" +VERSION="v0.40.0" CONTAINER_NAME="simapp" diff --git a/scripts/simapp/genesis-ibc.json b/scripts/simapp/genesis-ibc.json index 17e01284..ad57d577 100644 --- a/scripts/simapp/genesis-ibc.json +++ b/scripts/simapp/genesis-ibc.json @@ -1,418 +1,277 @@ { + "channel_genesis": { + "ack_sequences": [ + { + "channel_id": "channel-0", + "port_id": "transfer", + "sequence": "1" + } + ], + "acknowledgements": [], + "channels": [ + { + "channel_id": "channel-0", + "connection_hops": [ + "connection-0" + ], + "counterparty": { + "channel_id": "channel-0", + "port_id": "transfer" + }, + "ordering": "ORDER_UNORDERED", + "port_id": "transfer", + "state": "STATE_OPEN", + "version": "ics20-1" + } + ], + "commitments": [ + { + "channel_id": "channel-0", + "data": "hYz5Dx6o09DcSEWZR6xlJYwLgYUnLithsXMGtujic4I=", + "port_id": "transfer", + "sequence": "1" + } + ], + "next_channel_sequence": "0", + "receipts": [], + "recv_sequences": [ + { + "channel_id": "channel-0", + "port_id": "transfer", + "sequence": "1" + } + ], + "send_sequences": [ + { + "channel_id": "channel-0", + "port_id": "transfer", + "sequence": "2" + } + ] + }, "client_genesis": { "clients": [ { - "client_id": "client0Fortestchain1", + "client_id": "07-tendermint-0", "client_state": { "@type": "/ibc.lightclients.tendermint.v1.ClientState", - "chain_id": "testchain1", - "trust_level": { - "numerator": "1", - "denominator": "3" - }, - "trusting_period": "1209600s", - "unbonding_period": "1814400s", - "max_clock_drift": "10s", + "allow_update_after_expiry": false, + "allow_update_after_misbehaviour": false, + "chain_id": "ibc-1", "frozen_height": { - "version_number": "0", - "version_height": "0" + "revision_height": "0", + "revision_number": "0" }, "latest_height": { - "version_number": "0", - "version_height": "59" - }, - "consensus_params": { - "block": { - "max_bytes": "200000", - "max_gas": "2000000" - }, - "evidence": { - "max_age_num_blocks": "302400", - "max_age_duration": "0.001814400s", - "max_bytes": "0" - }, - "validator": { - "pub_key_types": [ - "ed25519" - ] - }, - "version": null + "revision_height": "274", + "revision_number": "1" }, + "max_clock_drift": "600s", "proof_specs": [ { - "leaf_spec": { - "hash": "SHA256", - "prehash_key": "NO_HASH", - "prehash_value": "SHA256", - "length": "VAR_PROTO", - "prefix": "AA==" - }, "inner_spec": { "child_order": [ 0, 1 ], "child_size": 33, - "min_prefix_length": 4, - "max_prefix_length": 12, "empty_child": null, - "hash": "SHA256" + "hash": "SHA256", + "max_prefix_length": 12, + "min_prefix_length": 4 + }, + "leaf_spec": { + "hash": "SHA256", + "length": "VAR_PROTO", + "prefix": "AA==", + "prehash_key": "NO_HASH", + "prehash_value": "SHA256" }, "max_depth": 0, "min_depth": 0 }, { - "leaf_spec": { - "hash": "SHA256", - "prehash_key": "NO_HASH", - "prehash_value": "SHA256", - "length": "VAR_PROTO", - "prefix": "AA==" - }, "inner_spec": { "child_order": [ 0, 1 ], "child_size": 32, - "min_prefix_length": 1, - "max_prefix_length": 1, "empty_child": null, - "hash": "SHA256" + "hash": "SHA256", + "max_prefix_length": 1, + "min_prefix_length": 1 + }, + "leaf_spec": { + "hash": "SHA256", + "length": "VAR_PROTO", + "prefix": "AA==", + "prehash_key": "NO_HASH", + "prehash_value": "SHA256" }, "max_depth": 0, "min_depth": 0 } ], - "upgrade_path": "upgrade/upgradedClient", - "allow_update_after_expiry": false, - "allow_update_after_misbehaviour": false + "trust_level": { + "denominator": "3", + "numerator": "1" + }, + "trusting_period": "1209600s", + "unbonding_period": "1814400s", + "upgrade_path": [ + "upgrade", + "upgradedIBCState" + ] } } ], "clients_consensus": [ { - "client_id": "client0Fortestchain1", + "client_id": "07-tendermint-0", "consensus_states": [ { - "height": { - "version_number": "0", - "version_height": "14" - }, "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:00:50Z", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "rRhOd4rghwWeMAgKRVisctyxK+TolMh28cXGYcTqDT0=" + "hash": "7PmRnufr0ItJMAtq3GOJEtupU93W9fh9utvgKL+2DX0=" }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" + "timestamp": "2021-01-11T11:02:53.837998Z" + }, + "height": { + "revision_height": "258", + "revision_number": "1" } }, { - "height": { - "version_number": "0", - "version_height": "18" - }, "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:01:20Z", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "fTzFgmADVKxLeEDb7IMVHztpb0eXMDHfsPjVtEeSuoY=" + "hash": "l4c9z7RZNTXk+tNM1BClb0MLnR5sWHdoofjPNyb2u7s=" }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" + "timestamp": "2021-01-11T11:02:56.184633Z" + }, + "height": { + "revision_height": "260", + "revision_number": "1" } }, { - "height": { - "version_number": "0", - "version_height": "22" - }, "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:01:55Z", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "l2FIztRP5evK5dWdHzhyDnBNT/EamxPjPd7D5qgE1tE=" + "hash": "4Z4hxSmijgVvMR//if6aJFhYIBW6w9rYYtEqs+eIUcg=" }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" + "timestamp": "2021-01-11T11:03:02.268862Z" + }, + "height": { + "revision_height": "265", + "revision_number": "1" } }, { - "height": { - "version_number": "0", - "version_height": "26" - }, "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:02:25Z", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "PYRjmlZIjytW2Pd3eU1czkUkkId+MfgzZtJlLuLyfyk=" + "hash": "xFOoMvBw80wWTHqqrNpWb/Hv8+zKsTsbam8MFA9Gor4=" }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" + "timestamp": "2021-01-11T11:03:07.123191Z" + }, + "height": { + "revision_height": "269", + "revision_number": "1" } }, { - "height": { - "version_number": "0", - "version_height": "30" - }, "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:02:55Z", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "8WV/XeRzdVLGRa/Cokds5Gbx+hBlnrvatIFFCzpkHjI=" + "hash": "0s6RbgtxLkZ51lJJCq1iZuhvSqn/DsAQs9jEMhShv3A=" }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { - "height": { - "version_number": "0", - "version_height": "33" + "timestamp": "2021-01-11T11:03:13.075754Z" }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:03:20Z", - "root": { - "hash": "7lqe+s7vffIxIdw9zLmva9Ka62ZdLk2xoVpY/ddbfnY=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { "height": { - "version_number": "0", - "version_height": "37" - }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:03:50Z", - "root": { - "hash": "teIRT2KoCB3eyVgcOnmWs9yLKBa65jji+57S2JwQEok=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { - "height": { - "version_number": "0", - "version_height": "41" - }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:04:15Z", - "root": { - "hash": "InGy9tyIB3qUmCxMNMdaf+5IAXLKgtjRP6bT5CcNZPY=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { - "height": { - "version_number": "0", - "version_height": "44" - }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:04:40Z", - "root": { - "hash": "U5AQ7i/jWT7mVLAYY6Hd0I2LPqraocnPvm6iyqM77tQ=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { - "height": { - "version_number": "0", - "version_height": "48" - }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:05:10Z", - "root": { - "hash": "2gvlcDp2zkV8HbJ3uBUVXBYnkdvjNAnuo1ZYtzZCEpA=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { - "height": { - "version_number": "0", - "version_height": "52" - }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:05:35Z", - "root": { - "hash": "rfeFQywd4nVB13dPYr7Fxzf85oGzC2Rsi86f08+JITY=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { - "height": { - "version_number": "0", - "version_height": "55" - }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:06:00Z", - "root": { - "hash": "uxNaVw9QHn99bXzWiNd/63pXcRGM1MtIzWe/91ZU858=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { - "height": { - "version_number": "0", - "version_height": "59" - }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:06:30Z", - "root": { - "hash": "MtE/kuFCztaYojPto6f6IsqP+zjs1RRs94Iy/QVkVd8=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" - } - }, - { - "height": { - "version_number": "0", - "version_height": "8" - }, - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2020-01-02T00:00:10Z", - "root": { - "hash": "aDaI4bMoH1mBZ+ZdmdlPlN10EEa71YACm9dvMOeseM0=" - }, - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079" + "revision_height": "274", + "revision_number": "1" } } ] } ], - "create_localhost": false + "clients_metadata": [ + { + "client_id": "07-tendermint-0", + "client_metadata": [ + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjU4L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomBj7tMA=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjYwL3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomLBGmiA=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjY1L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomhjrK/g=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjY5L3Byb2Nlc3NlZFRpbWU=", + "value": "Flkomzng9Qg=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjc0L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkonJ5n5Gg=" + } + ] + } + ], + "create_localhost": false, + "next_client_sequence": "0", + "params": { + "allowed_clients": [ + "06-solomachine", + "07-tendermint" + ] + } }, "connection_genesis": { + "client_connection_paths": [ + { + "client_id": "07-tendermint-0", + "paths": [ + "connection-0" + ] + } + ], "connections": [ { - "id": "testchain0-conn0", - "client_id": "client0Fortestchain1", - "versions": [ - { - "identifier": "1", - "features": [ - "ORDER_ORDERED", - "ORDER_UNORDERED" - ] - } - ], - "state": "STATE_OPEN", + "client_id": "07-tendermint-0", "counterparty": { - "client_id": "client0Fortestchain0", - "connection_id": "testchain1-conn0", + "client_id": "07-tendermint-0", + "connection_id": "connection-0", "prefix": { "key_prefix": "aWJj" } - } - } - ], - "client_connection_paths": [ - { - "client_id": "client0Fortestchain1", - "paths": [ - "testchain0-conn0" + }, + "delay_period": "0", + "id": "connection-0", + "state": "STATE_OPEN", + "versions": [ + { + "features": [ + "ORDER_ORDERED", + "ORDER_UNORDERED" + ], + "identifier": "1" + } ] } - ] - }, - "channel_genesis": { - "channels": [ - { - "state": "STATE_OPEN", - "ordering": "ORDER_UNORDERED", - "counterparty": { - "port_id": "wasm.cosmos10pyejy66429refv3g35g2t7am0was7yacjc2l4", - "channel_id": "testchain1-conn00" - }, - "connection_hops": [ - "testchain0-conn0" - ], - "version": "pong", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00" - } ], - "acknowledgements": [ - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "1", - "data": "9RKC5OuTvBsFMtD79dHHvb9qCxw08IKsSJlAwmiw8tI=" - }, - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "2", - "data": "Nj784gGVOFk2mdt+wAk/LOoPdUOo+5+0JfYs0yAubZU=" - }, - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "3", - "data": "+lLTGP1dlSD6MBpJgBIvx98Psd3U2xo500K7JyMkya8=" - } - ], - "commitments": [ - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "4", - "data": "DIuspQzH8GooFceqNxkTsiZXBn9qoWWJMUqsAIB1G5c=" - } - ], - "receipts": [ - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "1", - "data": "" - }, - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "2", - "data": "" - }, - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "3", - "data": "" - } - ], - "send_sequences": [ - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "5" - } - ], - "recv_sequences": [ - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "1" - } - ], - "ack_sequences": [ - { - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "channel_id": "testchain0-conn00", - "sequence": "1" - } - ] + "next_connection_sequence": "0" } } diff --git a/scripts/simapp/setup.sh b/scripts/simapp/setup.sh index b4109514..1fd82742 100644 --- a/scripts/simapp/setup.sh +++ b/scripts/simapp/setup.sh @@ -41,5 +41,5 @@ SELF_DELEGATION="3000000$STAKE" # 3 STAKE (leads to a voting power of 3) echo "$PASSWORD" echo "$PASSWORD" echo "$PASSWORD" -) | simd gentx validator --offline --amount "$SELF_DELEGATION" --chain-id "$CHAIN_ID" --moniker="$MONIKER" +) | simd gentx validator "$SELF_DELEGATION" --offline --chain-id "$CHAIN_ID" --moniker="$MONIKER" simd collect-gentxs diff --git a/scripts/simapp/template/.simapp/7bcf16921e07c53d6a2ec7200d5ec33b83eb2b7b.address b/scripts/simapp/template/.simapp/7bcf16921e07c53d6a2ec7200d5ec33b83eb2b7b.address deleted file mode 100644 index 0be96128..00000000 --- a/scripts/simapp/template/.simapp/7bcf16921e07c53d6a2ec7200d5ec33b83eb2b7b.address +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMS0wMyAxNDowNToyMS45NzkyNjkyICswMDAwIFVUQyBtPSswLjI4MjM5MDIwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6InFRVnVoSDNwbjF5bDh1Q3oifQ.MvPNI0wtdgsL6YdojzuTCBuAkQBq2oVz8ZzQTEi50n7B2sIerDuYPA.z2TjPuSxZ71F1Vq4.eAs_GUSQoefc6NJOAOY0cq9XVk1AidIKEqP8F1en5MMMgMPmekDdSCchSbnAxV-xq025nu2UQaU8Onh0kxXGu0kqwUVFv1c8AbZSFTPc3Iy7D3l-2UkLM_POn5QG4J4qlRkXAuG4h7uON2eZ0TCg7YWNk4F-IGzI2rR7v9DCygSTJdlW1muleQOHiADGl4H9xtRsRVQY83ph5JwhU_GMw57oAKGYNrYbnq5ncnEK8Rawexye_ECjXcrA.kc97K2usPPbjYsuMbAtrow \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/config.toml b/scripts/simapp/template/.simapp/config/config.toml index 5bef9818..2e0434e0 100644 --- a/scripts/simapp/template/.simapp/config/config.toml +++ b/scripts/simapp/template/.simapp/config/config.toml @@ -47,7 +47,7 @@ db_backend = "goleveldb" db_dir = "data" # Output level for logging, including package level options -log_level = "main:info,state:info,statesync:info,*:error" +log_level = "info" # Output format: 'plain' (colored text) or 'json' log_format = "plain" @@ -259,13 +259,19 @@ max_txs_bytes = 1073741824 # Size of the cache (used to filter transactions we saw earlier) in transactions cache_size = 10000 +# Do not remove invalid transactions from the cache (default: false) +# Set to true if it's not possible for any invalid transaction to become valid +# again in the future. +keep-invalid-txs-in-cache = false + # Maximum size of a single transaction. # NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. max_tx_bytes = 1048576 # Maximum size of a batch of transactions to send to a peer # Including space needed by encoding (one varint per transaction). -max_batch_bytes = 10485760 +# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 +max_batch_bytes = 0 ####################################################### ### State Sync Configuration Options ### diff --git a/scripts/simapp/template/.simapp/config/genesis.json b/scripts/simapp/template/.simapp/config/genesis.json index 15282fa8..034c2f68 100644 --- a/scripts/simapp/template/.simapp/config/genesis.json +++ b/scripts/simapp/template/.simapp/config/genesis.json @@ -6,7 +6,7 @@ { "@type": "/cosmos.auth.v1beta1.BaseAccount", "account_number": "0", - "address": "cosmos10083dys7qlzn663wcusq6hkr8wp7k2mm0sk4u9", + "address": "cosmos1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5n86vyq", "pub_key": null, "sequence": "0" }, @@ -218,19 +218,6 @@ } ] }, - { - "address": "cosmos10083dys7qlzn663wcusq6hkr8wp7k2mm0sk4u9", - "coins": [ - { - "amount": "1000000000", - "denom": "ucosm" - }, - { - "amount": "10000000", - "denom": "ustake" - } - ] - }, { "address": "cosmos106jwym4s9aujcmes26myzzwqsccw09sdm0v5au", "coins": [ @@ -335,6 +322,19 @@ } ] }, + { + "address": "cosmos1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5n86vyq", + "coins": [ + { + "amount": "1000000000", + "denom": "ucosm" + }, + { + "amount": "10000000", + "denom": "ustake" + } + ] + }, { "address": "cosmos17yg9mssjenmc3jkqth6ulcwj9cxujrxxzezwta", "coins": [ @@ -433,7 +433,7 @@ }, "public_key": { "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "AiRHwaEnXTLekByvbz4VnCW1TW2Pelp/mb4tK8ple1Xq" + "key": "Ap1EN+TjP611NX0PicqFJXknbLmxBbhgoCgGtRF7SLQk" }, "sequence": "0" } @@ -441,7 +441,7 @@ }, "body": { "extension_options": [], - "memo": "17ed7dcbe6488e85b95040cde58f038740efd221@172.17.0.2:26656", + "memo": "e81f12503951dfcf1d6419b8b7e5ac90f466c250@172.17.0.2:26656", "messages": [ { "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", @@ -450,7 +450,7 @@ "max_rate": "0.200000000000000000", "rate": "0.100000000000000000" }, - "delegator_address": "cosmos10083dys7qlzn663wcusq6hkr8wp7k2mm0sk4u9", + "delegator_address": "cosmos1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5n86vyq", "description": { "details": "", "identity": "", @@ -461,9 +461,9 @@ "min_self_delegation": "1", "pubkey": { "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "6VSQo43SQdEY0FDk7kXyt1BxfTvnQnqDsDhvr9mzxb4=" + "key": "L6f41DzvG/B+jUIc+avA3d0+BOhqgKB0pfiYSaug+2I=" }, - "validator_address": "cosmosvaloper10083dys7qlzn663wcusq6hkr8wp7k2mm2yzqsk", + "validator_address": "cosmosvaloper1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5knwegn", "value": { "amount": "3000000", "denom": "ustake" @@ -474,7 +474,7 @@ "timeout_height": "0" }, "signatures": [ - "UFF0dvpYIPfKtccdgVbKUTevKAGMu0ZSJ6IoyDnSipEqWVpPFysWEuE2kyY8cO6ibepJgb4+u1dD6Qk4vSTjqg==" + "GP2C29mfQ414xKeup0qxOqLEJK7mMoIghXJEqA/8bNxrtuvpzoF78aARH/ywm40bxYj95xPkBPVYAdxII8aUtg==" ] } ] @@ -506,125 +506,71 @@ "channel_genesis": { "ack_sequences": [ { - "channel_id": "testchain0-conn00", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", + "channel_id": "channel-0", + "port_id": "transfer", "sequence": "1" } ], - "acknowledgements": [ - { - "channel_id": "testchain0-conn00", - "data": "9RKC5OuTvBsFMtD79dHHvb9qCxw08IKsSJlAwmiw8tI=", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "sequence": "1" - }, - { - "channel_id": "testchain0-conn00", - "data": "Nj784gGVOFk2mdt+wAk/LOoPdUOo+5+0JfYs0yAubZU=", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "sequence": "2" - }, - { - "channel_id": "testchain0-conn00", - "data": "+lLTGP1dlSD6MBpJgBIvx98Psd3U2xo500K7JyMkya8=", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "sequence": "3" - } - ], + "acknowledgements": [], "channels": [ { - "channel_id": "testchain0-conn00", + "channel_id": "channel-0", "connection_hops": [ - "testchain0-conn0" + "connection-0" ], "counterparty": { - "channel_id": "testchain1-conn00", - "port_id": "wasm.cosmos10pyejy66429refv3g35g2t7am0was7yacjc2l4" + "channel_id": "channel-0", + "port_id": "transfer" }, "ordering": "ORDER_UNORDERED", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", + "port_id": "transfer", "state": "STATE_OPEN", - "version": "pong" + "version": "ics20-1" } ], "commitments": [ { - "channel_id": "testchain0-conn00", - "data": "DIuspQzH8GooFceqNxkTsiZXBn9qoWWJMUqsAIB1G5c=", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "sequence": "4" - } - ], - "receipts": [ - { - "channel_id": "testchain0-conn00", - "data": "", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", + "channel_id": "channel-0", + "data": "hYz5Dx6o09DcSEWZR6xlJYwLgYUnLithsXMGtujic4I=", + "port_id": "transfer", "sequence": "1" - }, - { - "channel_id": "testchain0-conn00", - "data": "", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "sequence": "2" - }, - { - "channel_id": "testchain0-conn00", - "data": "", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "sequence": "3" } ], + "next_channel_sequence": "0", + "receipts": [], "recv_sequences": [ { - "channel_id": "testchain0-conn00", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", + "channel_id": "channel-0", + "port_id": "transfer", "sequence": "1" } ], "send_sequences": [ { - "channel_id": "testchain0-conn00", - "port_id": "wasm.cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", - "sequence": "5" + "channel_id": "channel-0", + "port_id": "transfer", + "sequence": "2" } ] }, "client_genesis": { "clients": [ { - "client_id": "client0Fortestchain1", + "client_id": "07-tendermint-0", "client_state": { "@type": "/ibc.lightclients.tendermint.v1.ClientState", "allow_update_after_expiry": false, "allow_update_after_misbehaviour": false, - "chain_id": "testchain1", - "consensus_params": { - "block": { - "max_bytes": "200000", - "max_gas": "2000000" - }, - "evidence": { - "max_age_duration": "0.001814400s", - "max_age_num_blocks": "302400", - "max_bytes": "0" - }, - "validator": { - "pub_key_types": [ - "ed25519" - ] - }, - "version": null - }, + "chain_id": "ibc-1", "frozen_height": { - "version_height": "0", - "version_number": "0" + "revision_height": "0", + "revision_number": "0" }, "latest_height": { - "version_height": "59", - "version_number": "0" + "revision_height": "274", + "revision_number": "1" }, - "max_clock_drift": "10s", + "max_clock_drift": "600s", "proof_specs": [ { "inner_spec": { @@ -677,235 +623,147 @@ }, "trusting_period": "1209600s", "unbonding_period": "1814400s", - "upgrade_path": "upgrade/upgradedClient" + "upgrade_path": [ + "upgrade", + "upgradedIBCState" + ] } } ], "clients_consensus": [ { - "client_id": "client0Fortestchain1", + "client_id": "07-tendermint-0", "consensus_states": [ { "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "rRhOd4rghwWeMAgKRVisctyxK+TolMh28cXGYcTqDT0=" + "hash": "7PmRnufr0ItJMAtq3GOJEtupU93W9fh9utvgKL+2DX0=" }, - "timestamp": "2020-01-02T00:00:50Z" + "timestamp": "2021-01-11T11:02:53.837998Z" }, "height": { - "version_height": "14", - "version_number": "0" + "revision_height": "258", + "revision_number": "1" } }, { "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "fTzFgmADVKxLeEDb7IMVHztpb0eXMDHfsPjVtEeSuoY=" + "hash": "l4c9z7RZNTXk+tNM1BClb0MLnR5sWHdoofjPNyb2u7s=" }, - "timestamp": "2020-01-02T00:01:20Z" + "timestamp": "2021-01-11T11:02:56.184633Z" }, "height": { - "version_height": "18", - "version_number": "0" + "revision_height": "260", + "revision_number": "1" } }, { "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "l2FIztRP5evK5dWdHzhyDnBNT/EamxPjPd7D5qgE1tE=" + "hash": "4Z4hxSmijgVvMR//if6aJFhYIBW6w9rYYtEqs+eIUcg=" }, - "timestamp": "2020-01-02T00:01:55Z" + "timestamp": "2021-01-11T11:03:02.268862Z" }, "height": { - "version_height": "22", - "version_number": "0" + "revision_height": "265", + "revision_number": "1" } }, { "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "PYRjmlZIjytW2Pd3eU1czkUkkId+MfgzZtJlLuLyfyk=" + "hash": "xFOoMvBw80wWTHqqrNpWb/Hv8+zKsTsbam8MFA9Gor4=" }, - "timestamp": "2020-01-02T00:02:25Z" + "timestamp": "2021-01-11T11:03:07.123191Z" }, "height": { - "version_height": "26", - "version_number": "0" + "revision_height": "269", + "revision_number": "1" } }, { "consensus_state": { "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", + "next_validators_hash": "3491D4ECEB5323868C3AB846A12E923151E12BC4CE69F84DE9E8B7AB1CD15075", "root": { - "hash": "8WV/XeRzdVLGRa/Cokds5Gbx+hBlnrvatIFFCzpkHjI=" + "hash": "0s6RbgtxLkZ51lJJCq1iZuhvSqn/DsAQs9jEMhShv3A=" }, - "timestamp": "2020-01-02T00:02:55Z" + "timestamp": "2021-01-11T11:03:13.075754Z" }, "height": { - "version_height": "30", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "7lqe+s7vffIxIdw9zLmva9Ka62ZdLk2xoVpY/ddbfnY=" - }, - "timestamp": "2020-01-02T00:03:20Z" - }, - "height": { - "version_height": "33", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "teIRT2KoCB3eyVgcOnmWs9yLKBa65jji+57S2JwQEok=" - }, - "timestamp": "2020-01-02T00:03:50Z" - }, - "height": { - "version_height": "37", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "InGy9tyIB3qUmCxMNMdaf+5IAXLKgtjRP6bT5CcNZPY=" - }, - "timestamp": "2020-01-02T00:04:15Z" - }, - "height": { - "version_height": "41", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "U5AQ7i/jWT7mVLAYY6Hd0I2LPqraocnPvm6iyqM77tQ=" - }, - "timestamp": "2020-01-02T00:04:40Z" - }, - "height": { - "version_height": "44", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "2gvlcDp2zkV8HbJ3uBUVXBYnkdvjNAnuo1ZYtzZCEpA=" - }, - "timestamp": "2020-01-02T00:05:10Z" - }, - "height": { - "version_height": "48", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "rfeFQywd4nVB13dPYr7Fxzf85oGzC2Rsi86f08+JITY=" - }, - "timestamp": "2020-01-02T00:05:35Z" - }, - "height": { - "version_height": "52", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "uxNaVw9QHn99bXzWiNd/63pXcRGM1MtIzWe/91ZU858=" - }, - "timestamp": "2020-01-02T00:06:00Z" - }, - "height": { - "version_height": "55", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "MtE/kuFCztaYojPto6f6IsqP+zjs1RRs94Iy/QVkVd8=" - }, - "timestamp": "2020-01-02T00:06:30Z" - }, - "height": { - "version_height": "59", - "version_number": "0" - } - }, - { - "consensus_state": { - "@type": "/ibc.lightclients.tendermint.v1.ConsensusState", - "next_validators_hash": "E25883964659F4CEDDD977410E903198E7FBC3EAA6B575EF717E67BE56E84079", - "root": { - "hash": "aDaI4bMoH1mBZ+ZdmdlPlN10EEa71YACm9dvMOeseM0=" - }, - "timestamp": "2020-01-02T00:00:10Z" - }, - "height": { - "version_height": "8", - "version_number": "0" + "revision_height": "274", + "revision_number": "1" } } ] } ], - "create_localhost": false + "clients_metadata": [ + { + "client_id": "07-tendermint-0", + "client_metadata": [ + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjU4L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomBj7tMA=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjYwL3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomLBGmiA=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjY1L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkomhjrK/g=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjY5L3Byb2Nlc3NlZFRpbWU=", + "value": "Flkomzng9Qg=" + }, + { + "key": "Y29uc2Vuc3VzU3RhdGVzLzEtMjc0L3Byb2Nlc3NlZFRpbWU=", + "value": "FlkonJ5n5Gg=" + } + ] + } + ], + "create_localhost": false, + "next_client_sequence": "0", + "params": { + "allowed_clients": [ + "06-solomachine", + "07-tendermint" + ] + } }, "connection_genesis": { "client_connection_paths": [ { - "client_id": "client0Fortestchain1", + "client_id": "07-tendermint-0", "paths": [ - "testchain0-conn0" + "connection-0" ] } ], "connections": [ { - "client_id": "client0Fortestchain1", + "client_id": "07-tendermint-0", "counterparty": { - "client_id": "client0Fortestchain0", - "connection_id": "testchain1-conn0", + "client_id": "07-tendermint-0", + "connection_id": "connection-0", "prefix": { "key_prefix": "aWJj" } }, - "id": "testchain0-conn0", + "delay_period": "0", + "id": "connection-0", "state": "STATE_OPEN", "versions": [ { @@ -917,7 +775,8 @@ } ] } - ] + ], + "next_connection_sequence": "0" } }, "mint": { @@ -953,7 +812,7 @@ "last_validator_powers": [], "params": { "bond_denom": "ustake", - "historical_entries": 100, + "historical_entries": 10000, "max_entries": 7, "max_validators": 100, "unbonding_time": "1814400s" @@ -992,6 +851,6 @@ }, "version": {} }, - "genesis_time": "2020-11-03T14:05:21.4571801Z", + "genesis_time": "2021-01-11T12:11:46.0887675Z", "initial_height": "1" } diff --git a/scripts/simapp/template/.simapp/config/gentx/gentx-17ed7dcbe6488e85b95040cde58f038740efd221.json b/scripts/simapp/template/.simapp/config/gentx/gentx-17ed7dcbe6488e85b95040cde58f038740efd221.json deleted file mode 100644 index f6061caa..00000000 --- a/scripts/simapp/template/.simapp/config/gentx/gentx-17ed7dcbe6488e85b95040cde58f038740efd221.json +++ /dev/null @@ -1 +0,0 @@ -{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"simd-moniker","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos10083dys7qlzn663wcusq6hkr8wp7k2mm0sk4u9","validator_address":"cosmosvaloper10083dys7qlzn663wcusq6hkr8wp7k2mm2yzqsk","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"6VSQo43SQdEY0FDk7kXyt1BxfTvnQnqDsDhvr9mzxb4="},"value":{"denom":"ustake","amount":"3000000"}}],"memo":"17ed7dcbe6488e85b95040cde58f038740efd221@172.17.0.2:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AiRHwaEnXTLekByvbz4VnCW1TW2Pelp/mb4tK8ple1Xq"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["UFF0dvpYIPfKtccdgVbKUTevKAGMu0ZSJ6IoyDnSipEqWVpPFysWEuE2kyY8cO6ibepJgb4+u1dD6Qk4vSTjqg=="]} diff --git a/scripts/simapp/template/.simapp/config/gentx/gentx-e81f12503951dfcf1d6419b8b7e5ac90f466c250.json b/scripts/simapp/template/.simapp/config/gentx/gentx-e81f12503951dfcf1d6419b8b7e5ac90f466c250.json new file mode 100644 index 00000000..da748746 --- /dev/null +++ b/scripts/simapp/template/.simapp/config/gentx/gentx-e81f12503951dfcf1d6419b8b7e5ac90f466c250.json @@ -0,0 +1 @@ +{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"simd-moniker","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"cosmos1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5n86vyq","validator_address":"cosmosvaloper1acf9m2d35rqsk2e7kcgsmkh5ekdjcjh5knwegn","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"L6f41DzvG/B+jUIc+avA3d0+BOhqgKB0pfiYSaug+2I="},"value":{"denom":"ustake","amount":"3000000"}}],"memo":"e81f12503951dfcf1d6419b8b7e5ac90f466c250@172.17.0.2:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ap1EN+TjP611NX0PicqFJXknbLmxBbhgoCgGtRF7SLQk"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["GP2C29mfQ414xKeup0qxOqLEJK7mMoIghXJEqA/8bNxrtuvpzoF78aARH/ywm40bxYj95xPkBPVYAdxII8aUtg=="]} diff --git a/scripts/simapp/template/.simapp/config/node_key.json b/scripts/simapp/template/.simapp/config/node_key.json index dd055394..70a7fed2 100644 --- a/scripts/simapp/template/.simapp/config/node_key.json +++ b/scripts/simapp/template/.simapp/config/node_key.json @@ -1 +1 @@ -{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"lVcW5v8s558BQVY2cJkZ7taIAUOlCIKM6GxxhV9qe/zvH85EhXOWtlM6cNd6R0FZt6rSfjht/9u16ERLw1Ndqw=="}} \ No newline at end of file +{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"4alYqE54aHwoOT0qMzKBav6G4Ld9/Y8/5/Cmd8G5+Qe4kxI6HzYxlwFEfxWgBwTRVcXPHCVn2LF9wVNHZQaDVw=="}} \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/config/priv_validator_key.json b/scripts/simapp/template/.simapp/config/priv_validator_key.json index 4de61564..7111321a 100644 --- a/scripts/simapp/template/.simapp/config/priv_validator_key.json +++ b/scripts/simapp/template/.simapp/config/priv_validator_key.json @@ -1,11 +1,11 @@ { - "address": "29936987E455AA65AAA1960E74D704F37D3AD6BF", + "address": "E359FA31E749FFDC571AA4E5F629F70CD53D328A", "pub_key": { "type": "tendermint/PubKeyEd25519", - "value": "6VSQo43SQdEY0FDk7kXyt1BxfTvnQnqDsDhvr9mzxb4=" + "value": "L6f41DzvG/B+jUIc+avA3d0+BOhqgKB0pfiYSaug+2I=" }, "priv_key": { "type": "tendermint/PrivKeyEd25519", - "value": "JIYlxytaHUwk1sfhsndRayAK1jrwMBKjSgJMY385TIHpVJCjjdJB0RjQUOTuRfK3UHF9O+dCeoOwOG+v2bPFvg==" + "value": "6K2L2FmV0/ncDTWffaWEVahCg6kJb9hW0rXVlVweqYwvp/jUPO8b8H6NQhz5q8Dd3T4E6GqAoHSl+JhJq6D7Yg==" } } \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/data/priv_validator_state.json b/scripts/simapp/template/.simapp/data/priv_validator_state.json index 48f3b67e..4dfbafad 100644 --- a/scripts/simapp/template/.simapp/data/priv_validator_state.json +++ b/scripts/simapp/template/.simapp/data/priv_validator_state.json @@ -2,4 +2,4 @@ "height": "0", "round": 0, "step": 0 -} \ No newline at end of file +} diff --git a/scripts/simapp/template/.simapp/ee125da9b1a0c10b2b3eb6110ddaf4cd9b2c4af4.address b/scripts/simapp/template/.simapp/ee125da9b1a0c10b2b3eb6110ddaf4cd9b2c4af4.address new file mode 100644 index 00000000..bdf74455 --- /dev/null +++ b/scripts/simapp/template/.simapp/ee125da9b1a0c10b2b3eb6110ddaf4cd9b2c4af4.address @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wMS0xMSAxMjoxMTo0Ni4zOTY0MTY2ICswMDAwIFVUQyBtPSswLjE3OTg1NTMwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6Ijl6Qlp4NEV4WnRJckQxZFIifQ.AVH39FTZzKsd1lPYjt0Wz4y_luMuWYnE9aDUL4rQKOjNAcpaONHR9g.KJorS2Z8ZHWJaBZs.31yo0v7eWu4cdy3xza_-5WwMttOegSHp3iKL9i4lcJcFU-NagIrbcyOn4tfigB6wiMUmZeFzMtE1I6JC0eXio9oDbyvW8wBKvK8eakreEzGK4-QMxDaH8yaEwFf_ZtRXd2RMWaRo-zrDYEP1psZzrnue16Iyt8y4vhDYQT-8P0gT1iiJRyVt7er9dPOgtTDjv8YNHY8-ay-fOYm6NbGJ31woh9fxgBZDZ4cjGf4gtpPoowJPMR-YNXyV.rEqg1MS1q5Uwr9ZftyVHBA \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/keyhash b/scripts/simapp/template/.simapp/keyhash index 6676a957..3b01e2c1 100755 --- a/scripts/simapp/template/.simapp/keyhash +++ b/scripts/simapp/template/.simapp/keyhash @@ -1 +1 @@ -$2a$10$6WZ.gN6sdocwXBQi2/TY0./pgliVE4gR.t1/CekxAhlxVvFFKPSXy \ No newline at end of file +$2a$10$dx8lAQW4iIe..rmPZVdx1.6ZvJGlXxPp8mzaAd2WPwTJtGfUIrWuu \ No newline at end of file diff --git a/scripts/simapp/template/.simapp/validator.info b/scripts/simapp/template/.simapp/validator.info index 4c30d2be..7433ed7a 100644 --- a/scripts/simapp/template/.simapp/validator.info +++ b/scripts/simapp/template/.simapp/validator.info @@ -1 +1 @@ -eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMC0xMS0wMyAxNDowNToyMS45NjE3NTk3ICswMDAwIFVUQyBtPSswLjI2NDg3NzQwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6ImdrNEMxY2xjejBWRlRBblEifQ.yPB3UyZXIXgRX2gpFIk7wxJAtOKaoju_fT1w5NAN48xnMlG_H0gF1Q.Vf_HB0Ferog0JSKs.B35C2bbDGJQfRH95HyKi8QRO_mkDZnt3rJenfKnyhf_HDHYF0evvGTR7bIAmfmI8MkiYKRDLEMegMWzw_knHUOsKAnWY3big449DF9jkZnn0hyfnJslApvw5k4Ajn4CQQQVN10_y63TnWOSBMDqG7_0nLi6beMEXFzZiaYkgpFQvZPAIeKxohiy85lNR78TjxlYMbAyEZWGge5Cx3z5g5KBIp6xsGeA1PqA68yk-vOuD7fFY1en23l9KjnMOohviex82mUaj3fbnHVWZBifVjKO47AiA3w0dAMs1aS-w94R4TuAbV9CDzEzKfE7ae6DSJBJ7odZrQK-ihUyoLUnMh8KyyQ2J4sesAJl8Sy916WLA799H.N-Xzsd45HTHbVhHQf9Opvw \ No newline at end of file +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyMS0wMS0xMSAxMjoxMTo0Ni4zODY3MDU0ICswMDAwIFVUQyBtPSswLjE3MDE0NDYwMSIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjgxOTIsInAycyI6IktrOUhzdlZ3aTBOaDNwZG0ifQ.bVmLNX-QD16lHCNk1wNIPlQagaPwdSqD8Ci8-WwusRlWmkpNizpawA.WespKvIzDRC1AIqU.y8pUplHhRRZNHqtTG1HPvi-RZiSHZM1ari0eFCN9ik42cEeczmNqLsUOluQcjIxS2-JUaxWvUhRLKyf3354l5Vegl8_Lq7WufRgZaV6nreGjfprXgT8b9k25y78MS1Iv-Yq067uHJUsz0vn0EHyeWW0YpVZ3AdG_c90F5QElt-foFRBn_bQlQc3i2A6Us2Gw2YqaQyosa6AX1jKInsneVKoMjrc3PWSvjQxMXeYKkytaqU83_QECZzVZP2bvcD5tApWOjWhzlWPTiS02m1GEzuXAHm3SucH_0gGwd31plQ3WQRlKxYulUTZJiuzvM9yoB5oXEolOlBcRgGMFiu1ENmqPS1LB-KDIZdVNZFO5kFM1ubGh.zDGJMk5YwODgn5v6nZ9FtQ \ No newline at end of file diff --git a/scripts/simapp/template/setup.sh b/scripts/simapp/template/setup.sh index b4109514..1fd82742 100755 --- a/scripts/simapp/template/setup.sh +++ b/scripts/simapp/template/setup.sh @@ -41,5 +41,5 @@ SELF_DELEGATION="3000000$STAKE" # 3 STAKE (leads to a voting power of 3) echo "$PASSWORD" echo "$PASSWORD" echo "$PASSWORD" -) | simd gentx validator --offline --amount "$SELF_DELEGATION" --chain-id "$CHAIN_ID" --moniker="$MONIKER" +) | simd gentx validator "$SELF_DELEGATION" --offline --chain-id "$CHAIN_ID" --moniker="$MONIKER" simd collect-gentxs