proto-signing: Make registry types interfaces
This commit is contained in:
parent
15fdb34d91
commit
8f933e171b
@ -9,23 +9,23 @@ export interface GeneratedType {
|
||||
readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => any;
|
||||
}
|
||||
|
||||
export type EncodeObject = {
|
||||
export interface EncodeObject {
|
||||
readonly typeUrl: string;
|
||||
readonly value: any;
|
||||
};
|
||||
}
|
||||
|
||||
export type DecodeObject = {
|
||||
export interface DecodeObject {
|
||||
readonly typeUrl: string;
|
||||
readonly value: Uint8Array;
|
||||
};
|
||||
}
|
||||
|
||||
export type TxBodyValue = {
|
||||
export interface TxBodyValue {
|
||||
readonly messages: readonly EncodeObject[];
|
||||
readonly memo?: string;
|
||||
readonly timeoutHeight?: number;
|
||||
readonly extensionOptions?: google.protobuf.IAny[];
|
||||
readonly nonCriticalExtensionOptions?: google.protobuf.IAny[];
|
||||
};
|
||||
}
|
||||
|
||||
const defaultTypeUrls = {
|
||||
cosmosCoin: "/cosmos.Coin",
|
||||
|
||||
12
packages/proto-signing/types/registry.d.ts
vendored
12
packages/proto-signing/types/registry.d.ts
vendored
@ -12,21 +12,21 @@ export interface GeneratedType {
|
||||
) => protobuf.Writer;
|
||||
readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => any;
|
||||
}
|
||||
export declare type EncodeObject = {
|
||||
export interface EncodeObject {
|
||||
readonly typeUrl: string;
|
||||
readonly value: any;
|
||||
};
|
||||
export declare type DecodeObject = {
|
||||
}
|
||||
export interface DecodeObject {
|
||||
readonly typeUrl: string;
|
||||
readonly value: Uint8Array;
|
||||
};
|
||||
export declare type TxBodyValue = {
|
||||
}
|
||||
export interface TxBodyValue {
|
||||
readonly messages: readonly EncodeObject[];
|
||||
readonly memo?: string;
|
||||
readonly timeoutHeight?: number;
|
||||
readonly extensionOptions?: google.protobuf.IAny[];
|
||||
readonly nonCriticalExtensionOptions?: google.protobuf.IAny[];
|
||||
};
|
||||
}
|
||||
export declare class Registry {
|
||||
private readonly types;
|
||||
constructor(customTypes?: Iterable<[string, GeneratedType]>);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user