-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing globalfee protobufs and catch gov prop decoding failures.
- Loading branch information
Showing
27 changed files
with
1,434 additions
and
480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as _65 from "./globalfee/v1beta1/genesis"; | ||
import * as _66 from "./globalfee/v1beta1/query"; | ||
import * as _67 from "./globalfee/v1beta1/tx"; | ||
import * as _236 from "./globalfee/v1beta1/tx.amino"; | ||
import * as _237 from "./globalfee/v1beta1/tx.registry"; | ||
import * as _238 from "./globalfee/v1beta1/query.rpc.Query"; | ||
import * as _239 from "./globalfee/v1beta1/tx.rpc.msg"; | ||
import * as _321 from "./rpc.query"; | ||
import * as _322 from "./rpc.tx"; | ||
export namespace gaia { | ||
export namespace globalfee { | ||
export const v1beta1 = { | ||
..._65, | ||
..._66, | ||
..._67, | ||
..._236, | ||
..._237, | ||
..._238, | ||
..._239 | ||
}; | ||
} | ||
export const ClientFactory = { | ||
..._321, | ||
..._322 | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { GeneratedType, Registry, OfflineSigner } from "@cosmjs/proto-signing"; | ||
import { defaultRegistryTypes, AminoTypes, SigningStargateClient } from "@cosmjs/stargate"; | ||
import { HttpEndpoint } from "@cosmjs/tendermint-rpc"; | ||
import * as gaiaGlobalfeeV1beta1TxRegistry from "./globalfee/v1beta1/tx.registry"; | ||
import * as gaiaGlobalfeeV1beta1TxAmino from "./globalfee/v1beta1/tx.amino"; | ||
export const gaiaAminoConverters = { | ||
...gaiaGlobalfeeV1beta1TxAmino.AminoConverter | ||
}; | ||
export const gaiaProtoRegistry: ReadonlyArray<[string, GeneratedType]> = [...gaiaGlobalfeeV1beta1TxRegistry.registry]; | ||
export const getSigningGaiaClientOptions = ({ | ||
defaultTypes = defaultRegistryTypes | ||
}: { | ||
defaultTypes?: ReadonlyArray<[string, GeneratedType]>; | ||
} = {}): { | ||
registry: Registry; | ||
aminoTypes: AminoTypes; | ||
} => { | ||
const registry = new Registry([...defaultTypes, ...gaiaProtoRegistry]); | ||
const aminoTypes = new AminoTypes({ | ||
...gaiaAminoConverters | ||
}); | ||
return { | ||
registry, | ||
aminoTypes | ||
}; | ||
}; | ||
export const getSigningGaiaClient = async ({ | ||
rpcEndpoint, | ||
signer, | ||
defaultTypes = defaultRegistryTypes | ||
}: { | ||
rpcEndpoint: string | HttpEndpoint; | ||
signer: OfflineSigner; | ||
defaultTypes?: ReadonlyArray<[string, GeneratedType]>; | ||
}) => { | ||
const { | ||
registry, | ||
aminoTypes | ||
} = getSigningGaiaClientOptions({ | ||
defaultTypes | ||
}); | ||
const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { | ||
registry: (registry as any), | ||
aminoTypes | ||
}); | ||
return client; | ||
}; |
Oops, something went wrong.