Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): rollback deprecated protobuf generated code #93

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
669 changes: 669 additions & 0 deletions src/protobuf/akash/audit/v1beta1/audit.ts

Large diffs are not rendered by default.

95 changes: 95 additions & 0 deletions src/protobuf/akash/audit/v1beta1/genesis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/* eslint-disable */
import { messageTypeRegistry } from "../../../typeRegistry";
import Long from "long";
import _m0 from "protobufjs/minimal";
import { AuditedAttributes } from "../../../akash/audit/v1beta1/audit";

export const protobufPackage = "akash.audit.v1beta1";

/** GenesisState defines the basic genesis state used by audit module */
export interface GenesisState {
$type: "akash.audit.v1beta1.GenesisState";
attributes: AuditedAttributes[];
}

function createBaseGenesisState(): GenesisState {
return { $type: "akash.audit.v1beta1.GenesisState", attributes: [] };
}

export const GenesisState = {
$type: "akash.audit.v1beta1.GenesisState" as const,

encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
for (const v of message.attributes) {
AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim();
}
return writer;
},

decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGenesisState();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.attributes.push(AuditedAttributes.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},

fromJSON(object: any): GenesisState {
return {
$type: GenesisState.$type,
attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) : []
};
},

toJSON(message: GenesisState): unknown {
const obj: any = {};
if (message.attributes) {
obj.attributes = message.attributes.map(e => (e ? AuditedAttributes.toJSON(e) : undefined));
} else {
obj.attributes = [];
}
return obj;
},

fromPartial<I extends Exact<DeepPartial<GenesisState>, I>>(object: I): GenesisState {
const message = createBaseGenesisState();
message.attributes = object.attributes?.map(e => AuditedAttributes.fromPartial(e)) || [];
return message;
}
};

messageTypeRegistry.set(GenesisState.$type, GenesisState);

type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;

export type DeepPartial<T> = T extends Builtin
? T
: T extends Long
? string | number | Long
: T extends Array<infer U>
? Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U>
? ReadonlyArray<DeepPartial<U>>
: T extends {}
? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
: Partial<T>;

type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin
? P
: P & { [K in keyof P]: Exact<P[K], I[K]> } & Record<Exclude<keyof I, KeysOfUnion<P> | "$type">, never>;

if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
}
Loading
Loading