Skip to content

Commit

Permalink
Merge pull request #7950 from Agoric/dc-vstorage-js-proto
Browse files Browse the repository at this point in the history
feat(cosmic-proto): stubs for vstorage/query.proto
  • Loading branch information
dckc authored Jun 20, 2023
2 parents 26028d4 + 97b1678 commit 657b621
Show file tree
Hide file tree
Showing 8 changed files with 1,325 additions and 3 deletions.
90 changes: 89 additions & 1 deletion packages/cosmic-proto/dist/agoric/swingset/msgs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ export interface MsgProvisionResponse {}
export interface MsgInstallBundle {
bundle: string;
submitter: Uint8Array;
/**
* Either bundle or compressed_bundle will be set.
* Default compression algorithm is gzip.
*/
compressedBundle: Uint8Array;
/** Size in bytes of uncompression of compressed_bundle. */
uncompressedSize: Long;
}
/**
* MsgInstallBundleResponse is an empty acknowledgement that an install bundle
Expand Down Expand Up @@ -355,10 +362,91 @@ export declare const MsgInstallBundle: {
I extends {
bundle?: string | undefined;
submitter?: Uint8Array | undefined;
compressedBundle?: Uint8Array | undefined;
uncompressedSize?: string | number | Long | undefined;
} & {
bundle?: string | undefined;
submitter?: Uint8Array | undefined;
} & { [K in Exclude<keyof I, keyof MsgInstallBundle>]: never },
compressedBundle?: Uint8Array | undefined;
uncompressedSize?:
| string
| number
| (Long & {
high: number;
low: number;
unsigned: boolean;
add: (addend: string | number | Long) => Long;
and: (other: string | number | Long) => Long;
compare: (other: string | number | Long) => number;
comp: (other: string | number | Long) => number;
divide: (divisor: string | number | Long) => Long;
div: (divisor: string | number | Long) => Long;
equals: (other: string | number | Long) => boolean;
eq: (other: string | number | Long) => boolean;
getHighBits: () => number;
getHighBitsUnsigned: () => number;
getLowBits: () => number;
getLowBitsUnsigned: () => number;
getNumBitsAbs: () => number;
greaterThan: (other: string | number | Long) => boolean;
gt: (other: string | number | Long) => boolean;
greaterThanOrEqual: (other: string | number | Long) => boolean;
gte: (other: string | number | Long) => boolean;
ge: (other: string | number | Long) => boolean;
isEven: () => boolean;
isNegative: () => boolean;
isOdd: () => boolean;
isPositive: () => boolean;
isZero: () => boolean;
eqz: () => boolean;
lessThan: (other: string | number | Long) => boolean;
lt: (other: string | number | Long) => boolean;
lessThanOrEqual: (other: string | number | Long) => boolean;
lte: (other: string | number | Long) => boolean;
le: (other: string | number | Long) => boolean;
modulo: (other: string | number | Long) => Long;
mod: (other: string | number | Long) => Long;
rem: (other: string | number | Long) => Long;
multiply: (multiplier: string | number | Long) => Long;
mul: (multiplier: string | number | Long) => Long;
negate: () => Long;
neg: () => Long;
not: () => Long;
countLeadingZeros: () => number;
clz: () => number;
countTrailingZeros: () => number;
ctz: () => number;
notEquals: (other: string | number | Long) => boolean;
neq: (other: string | number | Long) => boolean;
ne: (other: string | number | Long) => boolean;
or: (other: string | number | Long) => Long;
shiftLeft: (numBits: number | Long) => Long;
shl: (numBits: number | Long) => Long;
shiftRight: (numBits: number | Long) => Long;
shr: (numBits: number | Long) => Long;
shiftRightUnsigned: (numBits: number | Long) => Long;
shru: (numBits: number | Long) => Long;
shr_u: (numBits: number | Long) => Long;
rotateLeft: (numBits: number | Long) => Long;
rotl: (numBits: number | Long) => Long;
rotateRight: (numBits: number | Long) => Long;
rotr: (numBits: number | Long) => Long;
subtract: (subtrahend: string | number | Long) => Long;
sub: (subtrahend: string | number | Long) => Long;
toInt: () => number;
toNumber: () => number;
toBytes: (le?: boolean | undefined) => number[];
toBytesLE: () => number[];
toBytesBE: () => number[];
toSigned: () => Long;
toString: (radix?: number | undefined) => string;
toUnsigned: () => Long;
xor: (other: string | number | Long) => Long;
} & {
[K in Exclude<keyof I['uncompressedSize'], keyof Long>]: never;
})
| undefined;
} & { [K_1 in Exclude<keyof I, keyof MsgInstallBundle>]: never },
>(
object: I,
): MsgInstallBundle;
Expand Down
40 changes: 39 additions & 1 deletion packages/cosmic-proto/dist/agoric/swingset/msgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,12 @@ export const MsgProvisionResponse = {
},
};
function createBaseMsgInstallBundle() {
return { bundle: '', submitter: new Uint8Array() };
return {
bundle: '',
submitter: new Uint8Array(),
compressedBundle: new Uint8Array(),
uncompressedSize: Long.ZERO,
};
}
export const MsgInstallBundle = {
encode(message, writer = _m0.Writer.create()) {
Expand All @@ -456,6 +461,12 @@ export const MsgInstallBundle = {
if (message.submitter.length !== 0) {
writer.uint32(18).bytes(message.submitter);
}
if (message.compressedBundle.length !== 0) {
writer.uint32(26).bytes(message.compressedBundle);
}
if (!message.uncompressedSize.isZero()) {
writer.uint32(32).int64(message.uncompressedSize);
}
return writer;
},
decode(input, length) {
Expand All @@ -471,6 +482,12 @@ export const MsgInstallBundle = {
case 2:
message.submitter = reader.bytes();
break;
case 3:
message.compressedBundle = reader.bytes();
break;
case 4:
message.uncompressedSize = reader.int64();
break;
default:
reader.skipType(tag & 7);
break;
Expand All @@ -484,6 +501,12 @@ export const MsgInstallBundle = {
submitter: isSet(object.submitter)
? bytesFromBase64(object.submitter)
: new Uint8Array(),
compressedBundle: isSet(object.compressedBundle)
? bytesFromBase64(object.compressedBundle)
: new Uint8Array(),
uncompressedSize: isSet(object.uncompressedSize)
? Long.fromValue(object.uncompressedSize)
: Long.ZERO,
};
},
toJSON(message) {
Expand All @@ -493,12 +516,27 @@ export const MsgInstallBundle = {
(obj.submitter = base64FromBytes(
message.submitter !== undefined ? message.submitter : new Uint8Array(),
));
message.compressedBundle !== undefined &&
(obj.compressedBundle = base64FromBytes(
message.compressedBundle !== undefined
? message.compressedBundle
: new Uint8Array(),
));
message.uncompressedSize !== undefined &&
(obj.uncompressedSize = (
message.uncompressedSize || Long.ZERO
).toString());
return obj;
},
fromPartial(object) {
const message = createBaseMsgInstallBundle();
message.bundle = object.bundle ?? '';
message.submitter = object.submitter ?? new Uint8Array();
message.compressedBundle = object.compressedBundle ?? new Uint8Array();
message.uncompressedSize =
object.uncompressedSize !== undefined && object.uncompressedSize !== null
? Long.fromValue(object.uncompressedSize)
: Long.ZERO;
return message;
},
};
Expand Down
Loading

0 comments on commit 657b621

Please sign in to comment.