@xmtp/proto
Advanced tools
Comparing version 3.15.0 to 3.16.0
{ | ||
"name": "@xmtp/proto", | ||
"version": "3.15.0", | ||
"version": "3.16.0", | ||
"description": "Protobuf client and generated classes for GRPC API", | ||
@@ -5,0 +5,0 @@ "main": "./ts/dist/cjs/node.js", |
@@ -6,5 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PublicKeyBundle = exports.PublicKey_Secp256k1Uncompressed = exports.PublicKey = exports.SignedPublicKeyBundle = exports.SignedPublicKey = exports.UnsignedPublicKey_Secp256k1Uncompressed = exports.UnsignedPublicKey = exports.protobufPackage = void 0; | ||
exports.PublicKeyBundle = exports.PublicKey_Secp256k1Uncompressed = exports.PublicKey = exports.SignedPublicKeyBundle = exports.SignedPublicKey = exports.SendKeyRevocation = exports.SendKey = exports.SignedPublicKeyRevocationV1 = exports.SignedPublicKeyV2 = exports.UnsignedPublicKey_Secp256k1Uncompressed = exports.UnsignedPublicKey = exports.protobufPackage = void 0; | ||
/* eslint-disable */ | ||
const long_1 = __importDefault(require("long")); | ||
const proof_pb_1 = require("./proof.pb"); | ||
const signature_pb_1 = require("./signature.pb"); | ||
@@ -128,2 +129,241 @@ const minimal_1 = __importDefault(require("protobufjs/minimal")); | ||
}; | ||
function createBaseSignedPublicKeyV2() { | ||
return { keyBytes: new Uint8Array(), proof: undefined }; | ||
} | ||
exports.SignedPublicKeyV2 = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.keyBytes.length !== 0) { | ||
writer.uint32(10).bytes(message.keyBytes); | ||
} | ||
if (message.proof !== undefined) { | ||
proof_pb_1.AssociationProof.encode(message.proof, writer.uint32(18).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseSignedPublicKeyV2(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.keyBytes = reader.bytes(); | ||
break; | ||
case 2: | ||
message.proof = proof_pb_1.AssociationProof.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
keyBytes: isSet(object.keyBytes) | ||
? bytesFromBase64(object.keyBytes) | ||
: new Uint8Array(), | ||
proof: isSet(object.proof) | ||
? proof_pb_1.AssociationProof.fromJSON(object.proof) | ||
: undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.keyBytes !== undefined && | ||
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array())); | ||
message.proof !== undefined && | ||
(obj.proof = message.proof | ||
? proof_pb_1.AssociationProof.toJSON(message.proof) | ||
: undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a; | ||
const message = createBaseSignedPublicKeyV2(); | ||
message.keyBytes = (_a = object.keyBytes) !== null && _a !== void 0 ? _a : new Uint8Array(); | ||
message.proof = | ||
object.proof !== undefined && object.proof !== null | ||
? proof_pb_1.AssociationProof.fromPartial(object.proof) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseSignedPublicKeyRevocationV1() { | ||
return { keyBytes: new Uint8Array(), proof: undefined }; | ||
} | ||
exports.SignedPublicKeyRevocationV1 = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.keyBytes.length !== 0) { | ||
writer.uint32(10).bytes(message.keyBytes); | ||
} | ||
if (message.proof !== undefined) { | ||
proof_pb_1.RevocationProof.encode(message.proof, writer.uint32(18).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseSignedPublicKeyRevocationV1(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.keyBytes = reader.bytes(); | ||
break; | ||
case 2: | ||
message.proof = proof_pb_1.RevocationProof.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
keyBytes: isSet(object.keyBytes) | ||
? bytesFromBase64(object.keyBytes) | ||
: new Uint8Array(), | ||
proof: isSet(object.proof) | ||
? proof_pb_1.RevocationProof.fromJSON(object.proof) | ||
: undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.keyBytes !== undefined && | ||
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array())); | ||
message.proof !== undefined && | ||
(obj.proof = message.proof | ||
? proof_pb_1.RevocationProof.toJSON(message.proof) | ||
: undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a; | ||
const message = createBaseSignedPublicKeyRevocationV1(); | ||
message.keyBytes = (_a = object.keyBytes) !== null && _a !== void 0 ? _a : new Uint8Array(); | ||
message.proof = | ||
object.proof !== undefined && object.proof !== null | ||
? proof_pb_1.RevocationProof.fromPartial(object.proof) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseSendKey() { | ||
return { v1: undefined, v2: undefined }; | ||
} | ||
exports.SendKey = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.v1 !== undefined) { | ||
exports.SignedPublicKey.encode(message.v1, writer.uint32(10).fork()).ldelim(); | ||
} | ||
if (message.v2 !== undefined) { | ||
exports.SignedPublicKeyV2.encode(message.v2, writer.uint32(18).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseSendKey(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.v1 = exports.SignedPublicKey.decode(reader, reader.uint32()); | ||
break; | ||
case 2: | ||
message.v2 = exports.SignedPublicKeyV2.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
v1: isSet(object.v1) ? exports.SignedPublicKey.fromJSON(object.v1) : undefined, | ||
v2: isSet(object.v2) ? exports.SignedPublicKeyV2.fromJSON(object.v2) : undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.v1 !== undefined && | ||
(obj.v1 = message.v1 ? exports.SignedPublicKey.toJSON(message.v1) : undefined); | ||
message.v2 !== undefined && | ||
(obj.v2 = message.v2 ? exports.SignedPublicKeyV2.toJSON(message.v2) : undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
const message = createBaseSendKey(); | ||
message.v1 = | ||
object.v1 !== undefined && object.v1 !== null | ||
? exports.SignedPublicKey.fromPartial(object.v1) | ||
: undefined; | ||
message.v2 = | ||
object.v2 !== undefined && object.v2 !== null | ||
? exports.SignedPublicKeyV2.fromPartial(object.v2) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseSendKeyRevocation() { | ||
return { v1: undefined }; | ||
} | ||
exports.SendKeyRevocation = { | ||
encode(message, writer = minimal_1.default.Writer.create()) { | ||
if (message.v1 !== undefined) { | ||
exports.SignedPublicKeyRevocationV1.encode(message.v1, writer.uint32(10).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
decode(input, length) { | ||
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseSendKeyRevocation(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.v1 = exports.SignedPublicKeyRevocationV1.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
v1: isSet(object.v1) | ||
? exports.SignedPublicKeyRevocationV1.fromJSON(object.v1) | ||
: undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.v1 !== undefined && | ||
(obj.v1 = message.v1 | ||
? exports.SignedPublicKeyRevocationV1.toJSON(message.v1) | ||
: undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
const message = createBaseSendKeyRevocation(); | ||
message.v1 = | ||
object.v1 !== undefined && object.v1 !== null | ||
? exports.SignedPublicKeyRevocationV1.fromPartial(object.v1) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseSignedPublicKey() { | ||
@@ -130,0 +370,0 @@ return { keyBytes: new Uint8Array(), signature: undefined }; |
/* eslint-disable */ | ||
import Long from "long"; | ||
import { AssociationProof, RevocationProof } from "./proof.pb"; | ||
import { Signature } from "./signature.pb"; | ||
@@ -121,2 +122,241 @@ import _m0 from "protobufjs/minimal"; | ||
}; | ||
function createBaseSignedPublicKeyV2() { | ||
return { keyBytes: new Uint8Array(), proof: undefined }; | ||
} | ||
export const SignedPublicKeyV2 = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.keyBytes.length !== 0) { | ||
writer.uint32(10).bytes(message.keyBytes); | ||
} | ||
if (message.proof !== undefined) { | ||
AssociationProof.encode(message.proof, writer.uint32(18).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
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 = createBaseSignedPublicKeyV2(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.keyBytes = reader.bytes(); | ||
break; | ||
case 2: | ||
message.proof = AssociationProof.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
keyBytes: isSet(object.keyBytes) | ||
? bytesFromBase64(object.keyBytes) | ||
: new Uint8Array(), | ||
proof: isSet(object.proof) | ||
? AssociationProof.fromJSON(object.proof) | ||
: undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.keyBytes !== undefined && | ||
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array())); | ||
message.proof !== undefined && | ||
(obj.proof = message.proof | ||
? AssociationProof.toJSON(message.proof) | ||
: undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a; | ||
const message = createBaseSignedPublicKeyV2(); | ||
message.keyBytes = (_a = object.keyBytes) !== null && _a !== void 0 ? _a : new Uint8Array(); | ||
message.proof = | ||
object.proof !== undefined && object.proof !== null | ||
? AssociationProof.fromPartial(object.proof) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseSignedPublicKeyRevocationV1() { | ||
return { keyBytes: new Uint8Array(), proof: undefined }; | ||
} | ||
export const SignedPublicKeyRevocationV1 = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.keyBytes.length !== 0) { | ||
writer.uint32(10).bytes(message.keyBytes); | ||
} | ||
if (message.proof !== undefined) { | ||
RevocationProof.encode(message.proof, writer.uint32(18).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
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 = createBaseSignedPublicKeyRevocationV1(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.keyBytes = reader.bytes(); | ||
break; | ||
case 2: | ||
message.proof = RevocationProof.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
keyBytes: isSet(object.keyBytes) | ||
? bytesFromBase64(object.keyBytes) | ||
: new Uint8Array(), | ||
proof: isSet(object.proof) | ||
? RevocationProof.fromJSON(object.proof) | ||
: undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.keyBytes !== undefined && | ||
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array())); | ||
message.proof !== undefined && | ||
(obj.proof = message.proof | ||
? RevocationProof.toJSON(message.proof) | ||
: undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
var _a; | ||
const message = createBaseSignedPublicKeyRevocationV1(); | ||
message.keyBytes = (_a = object.keyBytes) !== null && _a !== void 0 ? _a : new Uint8Array(); | ||
message.proof = | ||
object.proof !== undefined && object.proof !== null | ||
? RevocationProof.fromPartial(object.proof) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseSendKey() { | ||
return { v1: undefined, v2: undefined }; | ||
} | ||
export const SendKey = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.v1 !== undefined) { | ||
SignedPublicKey.encode(message.v1, writer.uint32(10).fork()).ldelim(); | ||
} | ||
if (message.v2 !== undefined) { | ||
SignedPublicKeyV2.encode(message.v2, writer.uint32(18).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
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 = createBaseSendKey(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.v1 = SignedPublicKey.decode(reader, reader.uint32()); | ||
break; | ||
case 2: | ||
message.v2 = SignedPublicKeyV2.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
v1: isSet(object.v1) ? SignedPublicKey.fromJSON(object.v1) : undefined, | ||
v2: isSet(object.v2) ? SignedPublicKeyV2.fromJSON(object.v2) : undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.v1 !== undefined && | ||
(obj.v1 = message.v1 ? SignedPublicKey.toJSON(message.v1) : undefined); | ||
message.v2 !== undefined && | ||
(obj.v2 = message.v2 ? SignedPublicKeyV2.toJSON(message.v2) : undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
const message = createBaseSendKey(); | ||
message.v1 = | ||
object.v1 !== undefined && object.v1 !== null | ||
? SignedPublicKey.fromPartial(object.v1) | ||
: undefined; | ||
message.v2 = | ||
object.v2 !== undefined && object.v2 !== null | ||
? SignedPublicKeyV2.fromPartial(object.v2) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseSendKeyRevocation() { | ||
return { v1: undefined }; | ||
} | ||
export const SendKeyRevocation = { | ||
encode(message, writer = _m0.Writer.create()) { | ||
if (message.v1 !== undefined) { | ||
SignedPublicKeyRevocationV1.encode(message.v1, writer.uint32(10).fork()).ldelim(); | ||
} | ||
return writer; | ||
}, | ||
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 = createBaseSendKeyRevocation(); | ||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
switch (tag >>> 3) { | ||
case 1: | ||
message.v1 = SignedPublicKeyRevocationV1.decode(reader, reader.uint32()); | ||
break; | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
return message; | ||
}, | ||
fromJSON(object) { | ||
return { | ||
v1: isSet(object.v1) | ||
? SignedPublicKeyRevocationV1.fromJSON(object.v1) | ||
: undefined, | ||
}; | ||
}, | ||
toJSON(message) { | ||
const obj = {}; | ||
message.v1 !== undefined && | ||
(obj.v1 = message.v1 | ||
? SignedPublicKeyRevocationV1.toJSON(message.v1) | ||
: undefined); | ||
return obj; | ||
}, | ||
fromPartial(object) { | ||
const message = createBaseSendKeyRevocation(); | ||
message.v1 = | ||
object.v1 !== undefined && object.v1 !== null | ||
? SignedPublicKeyRevocationV1.fromPartial(object.v1) | ||
: undefined; | ||
return message; | ||
}, | ||
}; | ||
function createBaseSignedPublicKey() { | ||
@@ -123,0 +363,0 @@ return { keyBytes: new Uint8Array(), signature: undefined }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1554032
83
24876