message: stargate: Handle absent proof in query client
diff: @@ -174,9 +174,11 @@ export class QueryClient {
  throw new Error(`Response key ${toHex(response.key)} doesn't match query key ${toHex(key)}`);
  }
  - assert(response.proof);
  + if (response.proof) {
  if (response.proof.ops.length !== 2) {
  - throw new Error(`Expected 2 proof ops, got ${response.proof.ops.length}. Are you using stargate?`);
  + throw new Error(
  + `Expected 2 proof ops, got ${response.proof?.ops.length ?? 0}. Are you using stargate?`,
  + );
  }
  const subProof = checkAndParseOp(response.proof.ops[0], "ics23:iavl", key);
  @@ -202,7 +204,14 @@ export class QueryClient {
  // the storeproof must map it's declared value (root of subProof) to the appHash of the next block
  const header = await this.getNextHeader(response.height);
  - verifyExistence(storeProof.exist, tendermintSpec, header.appHash, toAscii(store), storeProof.exist.value);
  + verifyExistence(
  + storeProof.exist,
  + tendermintSpec,
  + header.appHash,
  + toAscii(store),
  + storeProof.exist.value,
  + );
  + }
  return response.value;
  }
  