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

Update cosmic-proto #8956

Merged
merged 4 commits into from
Feb 20, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ bundles
bundle-*.js
compiled
dist
!packages/cosmic-proto/dist

# misc
/.vagrant
Expand Down
2 changes: 2 additions & 0 deletions packages/cosmic-proto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/gogoproto
dist/google
1 change: 1 addition & 0 deletions packages/cosmic-proto/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ mkdir -p proto
cd proto
ln -s ../../../golang/cosmos/proto/agoric .
ln -s ../../../golang/cosmos/third_party/proto/gogoproto .
ln -s ../../../golang/cosmos/third_party/proto/cosmos_proto .
ln -s ../node_modules/protobufjs/google .
```

Expand Down
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
31 changes: 14 additions & 17 deletions packages/cosmic-proto/dist/agoric/swingset/swingset.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@ export interface Egress {
/** TODO: Remove these power flags as they are deprecated and have no effect. */
powerFlags: string[];
}
/** The payload messages used by swingset state-sync */
export interface ExtensionSnapshotterArtifactPayload {
/**
* SwingStoreArtifact encodes an artifact of a swing-store export.
* Artifacts may be stored or transmitted in any order. Most handlers do
* maintain the artifact order from their original source as an effect of how
* they handle the artifacts.
*/
export interface SwingStoreArtifact {
name: string;
data: Uint8Array;
}
Expand Down Expand Up @@ -514,30 +519,22 @@ export declare const Egress: {
object: I,
): Egress;
};
export declare const ExtensionSnapshotterArtifactPayload: {
encode(
message: ExtensionSnapshotterArtifactPayload,
writer?: _m0.Writer,
): _m0.Writer;
decode(
input: _m0.Reader | Uint8Array,
length?: number,
): ExtensionSnapshotterArtifactPayload;
fromJSON(object: any): ExtensionSnapshotterArtifactPayload;
toJSON(message: ExtensionSnapshotterArtifactPayload): unknown;
export declare const SwingStoreArtifact: {
encode(message: SwingStoreArtifact, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): SwingStoreArtifact;
fromJSON(object: any): SwingStoreArtifact;
toJSON(message: SwingStoreArtifact): unknown;
fromPartial<
I extends {
name?: string | undefined;
data?: Uint8Array | undefined;
} & {
name?: string | undefined;
data?: Uint8Array | undefined;
} & {
[K in Exclude<keyof I, keyof ExtensionSnapshotterArtifactPayload>]: never;
},
} & { [K in Exclude<keyof I, keyof SwingStoreArtifact>]: never },
>(
object: I,
): ExtensionSnapshotterArtifactPayload;
): SwingStoreArtifact;
};
declare type Builtin =
| Date
Expand Down
8 changes: 4 additions & 4 deletions packages/cosmic-proto/dist/agoric/swingset/swingset.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,10 @@ export const Egress = {
return message;
},
};
function createBaseExtensionSnapshotterArtifactPayload() {
function createBaseSwingStoreArtifact() {
return { name: '', data: new Uint8Array() };
}
export const ExtensionSnapshotterArtifactPayload = {
export const SwingStoreArtifact = {
encode(message, writer = _m0.Writer.create()) {
if (message.name !== '') {
writer.uint32(10).string(message.name);
Expand All @@ -556,7 +556,7 @@ export const ExtensionSnapshotterArtifactPayload = {
decode(input, length) {
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseExtensionSnapshotterArtifactPayload();
const message = createBaseSwingStoreArtifact();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
Expand Down Expand Up @@ -591,7 +591,7 @@ export const ExtensionSnapshotterArtifactPayload = {
return obj;
},
fromPartial(object) {
const message = createBaseExtensionSnapshotterArtifactPayload();
const message = createBaseSwingStoreArtifact();
message.name = object.name ?? '';
message.data = object.data ?? new Uint8Array();
return message;
Expand Down
Loading
Loading