Skip to content

Commit 4d2479d

Browse files
committed
fix(api): rollback deprecated protobuf generated code
refs akash-network/console#184
1 parent 2ea1e63 commit 4d2479d

File tree

135 files changed

+44721
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+44721
-0
lines changed

src/protobuf/akash/audit/v1beta1/audit.ts

+669
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/* eslint-disable */
2+
import { messageTypeRegistry } from "../../../typeRegistry";
3+
import Long from "long";
4+
import _m0 from "protobufjs/minimal";
5+
import { AuditedAttributes } from "../../../akash/audit/v1beta1/audit";
6+
7+
export const protobufPackage = "akash.audit.v1beta1";
8+
9+
/** GenesisState defines the basic genesis state used by audit module */
10+
export interface GenesisState {
11+
$type: "akash.audit.v1beta1.GenesisState";
12+
attributes: AuditedAttributes[];
13+
}
14+
15+
function createBaseGenesisState(): GenesisState {
16+
return { $type: "akash.audit.v1beta1.GenesisState", attributes: [] };
17+
}
18+
19+
export const GenesisState = {
20+
$type: "akash.audit.v1beta1.GenesisState" as const,
21+
22+
encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
23+
for (const v of message.attributes) {
24+
AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim();
25+
}
26+
return writer;
27+
},
28+
29+
decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState {
30+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
31+
let end = length === undefined ? reader.len : reader.pos + length;
32+
const message = createBaseGenesisState();
33+
while (reader.pos < end) {
34+
const tag = reader.uint32();
35+
switch (tag >>> 3) {
36+
case 1:
37+
message.attributes.push(AuditedAttributes.decode(reader, reader.uint32()));
38+
break;
39+
default:
40+
reader.skipType(tag & 7);
41+
break;
42+
}
43+
}
44+
return message;
45+
},
46+
47+
fromJSON(object: any): GenesisState {
48+
return {
49+
$type: GenesisState.$type,
50+
attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) : []
51+
};
52+
},
53+
54+
toJSON(message: GenesisState): unknown {
55+
const obj: any = {};
56+
if (message.attributes) {
57+
obj.attributes = message.attributes.map(e => (e ? AuditedAttributes.toJSON(e) : undefined));
58+
} else {
59+
obj.attributes = [];
60+
}
61+
return obj;
62+
},
63+
64+
fromPartial<I extends Exact<DeepPartial<GenesisState>, I>>(object: I): GenesisState {
65+
const message = createBaseGenesisState();
66+
message.attributes = object.attributes?.map(e => AuditedAttributes.fromPartial(e)) || [];
67+
return message;
68+
}
69+
};
70+
71+
messageTypeRegistry.set(GenesisState.$type, GenesisState);
72+
73+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
74+
75+
export type DeepPartial<T> = T extends Builtin
76+
? T
77+
: T extends Long
78+
? string | number | Long
79+
: T extends Array<infer U>
80+
? Array<DeepPartial<U>>
81+
: T extends ReadonlyArray<infer U>
82+
? ReadonlyArray<DeepPartial<U>>
83+
: T extends {}
84+
? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
85+
: Partial<T>;
86+
87+
type KeysOfUnion<T> = T extends T ? keyof T : never;
88+
export type Exact<P, I extends P> = P extends Builtin
89+
? P
90+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & Record<Exclude<keyof I, KeysOfUnion<P> | "$type">, never>;
91+
92+
if (_m0.util.Long !== Long) {
93+
_m0.util.Long = Long as any;
94+
_m0.configure();
95+
}

0 commit comments

Comments
 (0)