New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@xmtp/proto

Package Overview
Dependencies
Maintainers
6
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xmtp/proto - npm Package Compare versions

Comparing version 3.20.0-beta.1 to 3.20.0

2

package.json
{
"name": "@xmtp/proto",
"version": "3.20.0-beta.1",
"version": "3.20.0",
"description": "Protobuf client and generated classes for GRPC API",

@@ -5,0 +5,0 @@ "main": "./ts/dist/cjs/node.js",

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SealedInvitationV1 = exports.SealedInvitationHeaderV1 = exports.SealedInvitation = exports.SealedInvitationV2 = exports.SealedInvitationHeaderV2_SelfInvitationHeader = exports.SealedInvitationHeaderV2_PeerInvitationHeader = exports.SealedInvitationHeaderV2 = exports.InvitationV1_Context_MetadataEntry = exports.InvitationV1_Context = exports.InvitationV1_Aes256gcmHkdfsha256 = exports.InvitationV1 = exports.protobufPackage = void 0;
exports.SealedInvitation = exports.SealedInvitationV1 = exports.SealedInvitationHeaderV1 = exports.InvitationV1_Context_MetadataEntry = exports.InvitationV1_Context = exports.InvitationV1_Aes256gcmHkdfsha256 = exports.InvitationV1 = exports.protobufPackage = void 0;
/* eslint-disable */

@@ -269,87 +269,13 @@ const long_1 = __importDefault(require("long"));

};
function createBaseSealedInvitationHeaderV2() {
return { peerHeader: undefined, selfHeader: undefined };
function createBaseSealedInvitationHeaderV1() {
return { sender: undefined, recipient: undefined, createdNs: long_1.default.UZERO };
}
exports.SealedInvitationHeaderV2 = {
exports.SealedInvitationHeaderV1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.peerHeader !== undefined) {
exports.SealedInvitationHeaderV2_PeerInvitationHeader.encode(message.peerHeader, writer.uint32(10).fork()).ldelim();
if (message.sender !== undefined) {
public_key_pb_1.SignedPublicKeyBundle.encode(message.sender, writer.uint32(10).fork()).ldelim();
}
if (message.selfHeader !== undefined) {
exports.SealedInvitationHeaderV2_SelfInvitationHeader.encode(message.selfHeader, writer.uint32(18).fork()).ldelim();
if (message.recipient !== undefined) {
public_key_pb_1.SignedPublicKeyBundle.encode(message.recipient, 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 = createBaseSealedInvitationHeaderV2();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.peerHeader =
exports.SealedInvitationHeaderV2_PeerInvitationHeader.decode(reader, reader.uint32());
break;
case 2:
message.selfHeader =
exports.SealedInvitationHeaderV2_SelfInvitationHeader.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
peerHeader: isSet(object.peerHeader)
? exports.SealedInvitationHeaderV2_PeerInvitationHeader.fromJSON(object.peerHeader)
: undefined,
selfHeader: isSet(object.selfHeader)
? exports.SealedInvitationHeaderV2_SelfInvitationHeader.fromJSON(object.selfHeader)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.peerHeader !== undefined &&
(obj.peerHeader = message.peerHeader
? exports.SealedInvitationHeaderV2_PeerInvitationHeader.toJSON(message.peerHeader)
: undefined);
message.selfHeader !== undefined &&
(obj.selfHeader = message.selfHeader
? exports.SealedInvitationHeaderV2_SelfInvitationHeader.toJSON(message.selfHeader)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseSealedInvitationHeaderV2();
message.peerHeader =
object.peerHeader !== undefined && object.peerHeader !== null
? exports.SealedInvitationHeaderV2_PeerInvitationHeader.fromPartial(object.peerHeader)
: undefined;
message.selfHeader =
object.selfHeader !== undefined && object.selfHeader !== null
? exports.SealedInvitationHeaderV2_SelfInvitationHeader.fromPartial(object.selfHeader)
: undefined;
return message;
},
};
function createBaseSealedInvitationHeaderV2_PeerInvitationHeader() {
return {
sendKeyBundle: undefined,
inboxKeyBundle: undefined,
createdNs: long_1.default.UZERO,
};
}
exports.SealedInvitationHeaderV2_PeerInvitationHeader = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.sendKeyBundle !== undefined) {
public_key_pb_1.SignedPublicKeyBundleV2.encode(message.sendKeyBundle, writer.uint32(10).fork()).ldelim();
}
if (message.inboxKeyBundle !== undefined) {
public_key_pb_1.SignedPublicKeyBundleV2.encode(message.inboxKeyBundle, writer.uint32(18).fork()).ldelim();
}
if (!message.createdNs.isZero()) {

@@ -363,3 +289,3 @@ writer.uint32(24).uint64(message.createdNs);

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSealedInvitationHeaderV2_PeerInvitationHeader();
const message = createBaseSealedInvitationHeaderV1();
while (reader.pos < end) {

@@ -369,6 +295,6 @@ const tag = reader.uint32();

case 1:
message.sendKeyBundle = public_key_pb_1.SignedPublicKeyBundleV2.decode(reader, reader.uint32());
message.sender = public_key_pb_1.SignedPublicKeyBundle.decode(reader, reader.uint32());
break;
case 2:
message.inboxKeyBundle = public_key_pb_1.SignedPublicKeyBundleV2.decode(reader, reader.uint32());
message.recipient = public_key_pb_1.SignedPublicKeyBundle.decode(reader, reader.uint32());
break;

@@ -387,7 +313,7 @@ case 3:

return {
sendKeyBundle: isSet(object.sendKeyBundle)
? public_key_pb_1.SignedPublicKeyBundleV2.fromJSON(object.sendKeyBundle)
sender: isSet(object.sender)
? public_key_pb_1.SignedPublicKeyBundle.fromJSON(object.sender)
: undefined,
inboxKeyBundle: isSet(object.inboxKeyBundle)
? public_key_pb_1.SignedPublicKeyBundleV2.fromJSON(object.inboxKeyBundle)
recipient: isSet(object.recipient)
? public_key_pb_1.SignedPublicKeyBundle.fromJSON(object.recipient)
: undefined,

@@ -401,9 +327,9 @@ createdNs: isSet(object.createdNs)

const obj = {};
message.sendKeyBundle !== undefined &&
(obj.sendKeyBundle = message.sendKeyBundle
? public_key_pb_1.SignedPublicKeyBundleV2.toJSON(message.sendKeyBundle)
message.sender !== undefined &&
(obj.sender = message.sender
? public_key_pb_1.SignedPublicKeyBundle.toJSON(message.sender)
: undefined);
message.inboxKeyBundle !== undefined &&
(obj.inboxKeyBundle = message.inboxKeyBundle
? public_key_pb_1.SignedPublicKeyBundleV2.toJSON(message.inboxKeyBundle)
message.recipient !== undefined &&
(obj.recipient = message.recipient
? public_key_pb_1.SignedPublicKeyBundle.toJSON(message.recipient)
: undefined);

@@ -415,10 +341,10 @@ message.createdNs !== undefined &&

fromPartial(object) {
const message = createBaseSealedInvitationHeaderV2_PeerInvitationHeader();
message.sendKeyBundle =
object.sendKeyBundle !== undefined && object.sendKeyBundle !== null
? public_key_pb_1.SignedPublicKeyBundleV2.fromPartial(object.sendKeyBundle)
const message = createBaseSealedInvitationHeaderV1();
message.sender =
object.sender !== undefined && object.sender !== null
? public_key_pb_1.SignedPublicKeyBundle.fromPartial(object.sender)
: undefined;
message.inboxKeyBundle =
object.inboxKeyBundle !== undefined && object.inboxKeyBundle !== null
? public_key_pb_1.SignedPublicKeyBundleV2.fromPartial(object.inboxKeyBundle)
message.recipient =
object.recipient !== undefined && object.recipient !== null
? public_key_pb_1.SignedPublicKeyBundle.fromPartial(object.recipient)
: undefined;

@@ -432,107 +358,6 @@ message.createdNs =

};
function createBaseSealedInvitationHeaderV2_SelfInvitationHeader() {
return {
sendKeyBundle: undefined,
inboxKeyBundle: undefined,
createdNs: long_1.default.UZERO,
recipientAddress: "",
};
}
exports.SealedInvitationHeaderV2_SelfInvitationHeader = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.sendKeyBundle !== undefined) {
public_key_pb_1.SignedPublicKeyBundleV2.encode(message.sendKeyBundle, writer.uint32(10).fork()).ldelim();
}
if (message.inboxKeyBundle !== undefined) {
public_key_pb_1.SignedPublicKeyBundleV2.encode(message.inboxKeyBundle, writer.uint32(18).fork()).ldelim();
}
if (!message.createdNs.isZero()) {
writer.uint32(24).uint64(message.createdNs);
}
if (message.recipientAddress !== "") {
writer.uint32(34).string(message.recipientAddress);
}
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 = createBaseSealedInvitationHeaderV2_SelfInvitationHeader();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.sendKeyBundle = public_key_pb_1.SignedPublicKeyBundleV2.decode(reader, reader.uint32());
break;
case 2:
message.inboxKeyBundle = public_key_pb_1.SignedPublicKeyBundleV2.decode(reader, reader.uint32());
break;
case 3:
message.createdNs = reader.uint64();
break;
case 4:
message.recipientAddress = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
sendKeyBundle: isSet(object.sendKeyBundle)
? public_key_pb_1.SignedPublicKeyBundleV2.fromJSON(object.sendKeyBundle)
: undefined,
inboxKeyBundle: isSet(object.inboxKeyBundle)
? public_key_pb_1.SignedPublicKeyBundleV2.fromJSON(object.inboxKeyBundle)
: undefined,
createdNs: isSet(object.createdNs)
? long_1.default.fromValue(object.createdNs)
: long_1.default.UZERO,
recipientAddress: isSet(object.recipientAddress)
? String(object.recipientAddress)
: "",
};
},
toJSON(message) {
const obj = {};
message.sendKeyBundle !== undefined &&
(obj.sendKeyBundle = message.sendKeyBundle
? public_key_pb_1.SignedPublicKeyBundleV2.toJSON(message.sendKeyBundle)
: undefined);
message.inboxKeyBundle !== undefined &&
(obj.inboxKeyBundle = message.inboxKeyBundle
? public_key_pb_1.SignedPublicKeyBundleV2.toJSON(message.inboxKeyBundle)
: undefined);
message.createdNs !== undefined &&
(obj.createdNs = (message.createdNs || long_1.default.UZERO).toString());
message.recipientAddress !== undefined &&
(obj.recipientAddress = message.recipientAddress);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseSealedInvitationHeaderV2_SelfInvitationHeader();
message.sendKeyBundle =
object.sendKeyBundle !== undefined && object.sendKeyBundle !== null
? public_key_pb_1.SignedPublicKeyBundleV2.fromPartial(object.sendKeyBundle)
: undefined;
message.inboxKeyBundle =
object.inboxKeyBundle !== undefined && object.inboxKeyBundle !== null
? public_key_pb_1.SignedPublicKeyBundleV2.fromPartial(object.inboxKeyBundle)
: undefined;
message.createdNs =
object.createdNs !== undefined && object.createdNs !== null
? long_1.default.fromValue(object.createdNs)
: long_1.default.UZERO;
message.recipientAddress = (_a = object.recipientAddress) !== null && _a !== void 0 ? _a : "";
return message;
},
};
function createBaseSealedInvitationV2() {
function createBaseSealedInvitationV1() {
return { headerBytes: new Uint8Array(), ciphertext: undefined };
}
exports.SealedInvitationV2 = {
exports.SealedInvitationV1 = {
encode(message, writer = minimal_1.default.Writer.create()) {

@@ -550,3 +375,3 @@ if (message.headerBytes.length !== 0) {

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSealedInvitationV2();
const message = createBaseSealedInvitationV1();
while (reader.pos < end) {

@@ -592,3 +417,3 @@ const tag = reader.uint32();

var _a;
const message = createBaseSealedInvitationV2();
const message = createBaseSealedInvitationV1();
message.headerBytes = (_a = object.headerBytes) !== null && _a !== void 0 ? _a : new Uint8Array();

@@ -603,3 +428,3 @@ message.ciphertext =

function createBaseSealedInvitation() {
return { v1: undefined, v2: undefined };
return { v1: undefined };
}

@@ -611,5 +436,2 @@ exports.SealedInvitation = {

}
if (message.v2 !== undefined) {
exports.SealedInvitationV2.encode(message.v2, writer.uint32(18).fork()).ldelim();
}
return writer;

@@ -627,5 +449,2 @@ },

break;
case 2:
message.v2 = exports.SealedInvitationV2.decode(reader, reader.uint32());
break;
default:

@@ -641,3 +460,2 @@ reader.skipType(tag & 7);

v1: isSet(object.v1) ? exports.SealedInvitationV1.fromJSON(object.v1) : undefined,
v2: isSet(object.v2) ? exports.SealedInvitationV2.fromJSON(object.v2) : undefined,
};

@@ -649,4 +467,2 @@ },

(obj.v1 = message.v1 ? exports.SealedInvitationV1.toJSON(message.v1) : undefined);
message.v2 !== undefined &&
(obj.v2 = message.v2 ? exports.SealedInvitationV2.toJSON(message.v2) : undefined);
return obj;

@@ -660,158 +476,5 @@ },

: undefined;
message.v2 =
object.v2 !== undefined && object.v2 !== null
? exports.SealedInvitationV2.fromPartial(object.v2)
: undefined;
return message;
},
};
function createBaseSealedInvitationHeaderV1() {
return { sender: undefined, recipient: undefined, createdNs: long_1.default.UZERO };
}
exports.SealedInvitationHeaderV1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.sender !== undefined) {
public_key_pb_1.SignedPublicKeyBundle.encode(message.sender, writer.uint32(10).fork()).ldelim();
}
if (message.recipient !== undefined) {
public_key_pb_1.SignedPublicKeyBundle.encode(message.recipient, writer.uint32(18).fork()).ldelim();
}
if (!message.createdNs.isZero()) {
writer.uint32(24).uint64(message.createdNs);
}
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 = createBaseSealedInvitationHeaderV1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.sender = public_key_pb_1.SignedPublicKeyBundle.decode(reader, reader.uint32());
break;
case 2:
message.recipient = public_key_pb_1.SignedPublicKeyBundle.decode(reader, reader.uint32());
break;
case 3:
message.createdNs = reader.uint64();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
sender: isSet(object.sender)
? public_key_pb_1.SignedPublicKeyBundle.fromJSON(object.sender)
: undefined,
recipient: isSet(object.recipient)
? public_key_pb_1.SignedPublicKeyBundle.fromJSON(object.recipient)
: undefined,
createdNs: isSet(object.createdNs)
? long_1.default.fromValue(object.createdNs)
: long_1.default.UZERO,
};
},
toJSON(message) {
const obj = {};
message.sender !== undefined &&
(obj.sender = message.sender
? public_key_pb_1.SignedPublicKeyBundle.toJSON(message.sender)
: undefined);
message.recipient !== undefined &&
(obj.recipient = message.recipient
? public_key_pb_1.SignedPublicKeyBundle.toJSON(message.recipient)
: undefined);
message.createdNs !== undefined &&
(obj.createdNs = (message.createdNs || long_1.default.UZERO).toString());
return obj;
},
fromPartial(object) {
const message = createBaseSealedInvitationHeaderV1();
message.sender =
object.sender !== undefined && object.sender !== null
? public_key_pb_1.SignedPublicKeyBundle.fromPartial(object.sender)
: undefined;
message.recipient =
object.recipient !== undefined && object.recipient !== null
? public_key_pb_1.SignedPublicKeyBundle.fromPartial(object.recipient)
: undefined;
message.createdNs =
object.createdNs !== undefined && object.createdNs !== null
? long_1.default.fromValue(object.createdNs)
: long_1.default.UZERO;
return message;
},
};
function createBaseSealedInvitationV1() {
return { headerBytes: new Uint8Array(), ciphertext: undefined };
}
exports.SealedInvitationV1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.headerBytes.length !== 0) {
writer.uint32(10).bytes(message.headerBytes);
}
if (message.ciphertext !== undefined) {
ciphertext_pb_1.Ciphertext.encode(message.ciphertext, 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 = createBaseSealedInvitationV1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.headerBytes = reader.bytes();
break;
case 2:
message.ciphertext = ciphertext_pb_1.Ciphertext.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
headerBytes: isSet(object.headerBytes)
? bytesFromBase64(object.headerBytes)
: new Uint8Array(),
ciphertext: isSet(object.ciphertext)
? ciphertext_pb_1.Ciphertext.fromJSON(object.ciphertext)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.headerBytes !== undefined &&
(obj.headerBytes = base64FromBytes(message.headerBytes !== undefined
? message.headerBytes
: new Uint8Array()));
message.ciphertext !== undefined &&
(obj.ciphertext = message.ciphertext
? ciphertext_pb_1.Ciphertext.toJSON(message.ciphertext)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseSealedInvitationV1();
message.headerBytes = (_a = object.headerBytes) !== null && _a !== void 0 ? _a : new Uint8Array();
message.ciphertext =
object.ciphertext !== undefined && object.ciphertext !== null
? ciphertext_pb_1.Ciphertext.fromPartial(object.ciphertext)
: undefined;
return message;
},
};
var globalThis = (() => {

@@ -818,0 +481,0 @@ if (typeof globalThis !== "undefined")

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Message = exports.MessageV2 = exports.MessageHeaderV2 = exports.MessageV1 = exports.MessageHeaderV1 = exports.protobufPackage = void 0;
exports.DecodedMessage = exports.Message = exports.MessageV2 = exports.MessageHeaderV2 = exports.MessageV1 = exports.MessageHeaderV1 = exports.protobufPackage = void 0;
/* eslint-disable */

@@ -12,2 +12,3 @@ const long_1 = __importDefault(require("long"));

const ciphertext_pb_1 = require("./ciphertext.pb");
const keystore_pb_1 = require("../keystore_api/v1/keystore.pb");
const minimal_1 = __importDefault(require("protobufjs/minimal"));

@@ -349,2 +350,147 @@ exports.protobufPackage = "xmtp.message_contents";

};
function createBaseDecodedMessage() {
return {
id: "",
messageVersion: "",
senderAddress: "",
recipientAddress: undefined,
sentNs: long_1.default.UZERO,
contentTopic: "",
conversation: undefined,
contentBytes: new Uint8Array(),
};
}
exports.DecodedMessage = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.id !== "") {
writer.uint32(10).string(message.id);
}
if (message.messageVersion !== "") {
writer.uint32(18).string(message.messageVersion);
}
if (message.senderAddress !== "") {
writer.uint32(26).string(message.senderAddress);
}
if (message.recipientAddress !== undefined) {
writer.uint32(34).string(message.recipientAddress);
}
if (!message.sentNs.isZero()) {
writer.uint32(40).uint64(message.sentNs);
}
if (message.contentTopic !== "") {
writer.uint32(50).string(message.contentTopic);
}
if (message.conversation !== undefined) {
keystore_pb_1.ConversationReference.encode(message.conversation, writer.uint32(58).fork()).ldelim();
}
if (message.contentBytes.length !== 0) {
writer.uint32(66).bytes(message.contentBytes);
}
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 = createBaseDecodedMessage();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.id = reader.string();
break;
case 2:
message.messageVersion = reader.string();
break;
case 3:
message.senderAddress = reader.string();
break;
case 4:
message.recipientAddress = reader.string();
break;
case 5:
message.sentNs = reader.uint64();
break;
case 6:
message.contentTopic = reader.string();
break;
case 7:
message.conversation = keystore_pb_1.ConversationReference.decode(reader, reader.uint32());
break;
case 8:
message.contentBytes = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
id: isSet(object.id) ? String(object.id) : "",
messageVersion: isSet(object.messageVersion)
? String(object.messageVersion)
: "",
senderAddress: isSet(object.senderAddress)
? String(object.senderAddress)
: "",
recipientAddress: isSet(object.recipientAddress)
? String(object.recipientAddress)
: undefined,
sentNs: isSet(object.sentNs) ? long_1.default.fromValue(object.sentNs) : long_1.default.UZERO,
contentTopic: isSet(object.contentTopic)
? String(object.contentTopic)
: "",
conversation: isSet(object.conversation)
? keystore_pb_1.ConversationReference.fromJSON(object.conversation)
: undefined,
contentBytes: isSet(object.contentBytes)
? bytesFromBase64(object.contentBytes)
: new Uint8Array(),
};
},
toJSON(message) {
const obj = {};
message.id !== undefined && (obj.id = message.id);
message.messageVersion !== undefined &&
(obj.messageVersion = message.messageVersion);
message.senderAddress !== undefined &&
(obj.senderAddress = message.senderAddress);
message.recipientAddress !== undefined &&
(obj.recipientAddress = message.recipientAddress);
message.sentNs !== undefined &&
(obj.sentNs = (message.sentNs || long_1.default.UZERO).toString());
message.contentTopic !== undefined &&
(obj.contentTopic = message.contentTopic);
message.conversation !== undefined &&
(obj.conversation = message.conversation
? keystore_pb_1.ConversationReference.toJSON(message.conversation)
: undefined);
message.contentBytes !== undefined &&
(obj.contentBytes = base64FromBytes(message.contentBytes !== undefined
? message.contentBytes
: new Uint8Array()));
return obj;
},
fromPartial(object) {
var _a, _b, _c, _d, _e, _f;
const message = createBaseDecodedMessage();
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
message.messageVersion = (_b = object.messageVersion) !== null && _b !== void 0 ? _b : "";
message.senderAddress = (_c = object.senderAddress) !== null && _c !== void 0 ? _c : "";
message.recipientAddress = (_d = object.recipientAddress) !== null && _d !== void 0 ? _d : undefined;
message.sentNs =
object.sentNs !== undefined && object.sentNs !== null
? long_1.default.fromValue(object.sentNs)
: long_1.default.UZERO;
message.contentTopic = (_e = object.contentTopic) !== null && _e !== void 0 ? _e : "";
message.conversation =
object.conversation !== undefined && object.conversation !== null
? keystore_pb_1.ConversationReference.fromPartial(object.conversation)
: undefined;
message.contentBytes = (_f = object.contentBytes) !== null && _f !== void 0 ? _f : new Uint8Array();
return message;
},
};
var globalThis = (() => {

@@ -351,0 +497,0 @@ if (typeof globalThis !== "undefined")

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.EncryptedPrivateKeyBundle = exports.EncryptedPrivateKeyBundleV1 = exports.PrivateKeyBundle = exports.PrivateKeyBundleV3 = exports.PrivateKeyBundleV2 = exports.PrivateKeyBundleV1 = exports.PrivateKey_Secp256k1 = exports.PrivateKey = exports.SignedPrivateKey_Secp256k1 = exports.SignedPrivateKey = exports.AccountLinkedPrivateKey_V1_Secp256k1 = exports.AccountLinkedPrivateKey_V1 = exports.AccountLinkedPrivateKey = exports.protobufPackage = void 0;
exports.EncryptedPrivateKeyBundle = exports.EncryptedPrivateKeyBundleV1 = exports.PrivateKeyBundle = exports.PrivateKeyBundleV1 = exports.PrivateKey_Secp256k1 = exports.PrivateKey = exports.PrivateKeyBundleV2 = exports.SignedPrivateKey_Secp256k1 = exports.SignedPrivateKey = exports.protobufPackage = void 0;
/* eslint-disable */

@@ -14,57 +14,6 @@ const long_1 = __importDefault(require("long"));

exports.protobufPackage = "xmtp.message_contents";
function createBaseAccountLinkedPrivateKey() {
return { v1: undefined };
}
exports.AccountLinkedPrivateKey = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.v1 !== undefined) {
exports.AccountLinkedPrivateKey_V1.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 = createBaseAccountLinkedPrivateKey();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = exports.AccountLinkedPrivateKey_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? exports.AccountLinkedPrivateKey_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? exports.AccountLinkedPrivateKey_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountLinkedPrivateKey();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? exports.AccountLinkedPrivateKey_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountLinkedPrivateKey_V1() {
function createBaseSignedPrivateKey() {
return { createdNs: long_1.default.UZERO, secp256k1: undefined, publicKey: undefined };
}
exports.AccountLinkedPrivateKey_V1 = {
exports.SignedPrivateKey = {
encode(message, writer = minimal_1.default.Writer.create()) {

@@ -75,6 +24,6 @@ if (!message.createdNs.isZero()) {

if (message.secp256k1 !== undefined) {
exports.AccountLinkedPrivateKey_V1_Secp256k1.encode(message.secp256k1, writer.uint32(18).fork()).ldelim();
exports.SignedPrivateKey_Secp256k1.encode(message.secp256k1, writer.uint32(18).fork()).ldelim();
}
if (message.publicKey !== undefined) {
public_key_pb_1.AccountLinkedPublicKey.encode(message.publicKey, writer.uint32(26).fork()).ldelim();
public_key_pb_1.SignedPublicKey.encode(message.publicKey, writer.uint32(26).fork()).ldelim();
}

@@ -86,3 +35,3 @@ return writer;

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAccountLinkedPrivateKey_V1();
const message = createBaseSignedPrivateKey();
while (reader.pos < end) {

@@ -95,6 +44,6 @@ const tag = reader.uint32();

case 2:
message.secp256k1 = exports.AccountLinkedPrivateKey_V1_Secp256k1.decode(reader, reader.uint32());
message.secp256k1 = exports.SignedPrivateKey_Secp256k1.decode(reader, reader.uint32());
break;
case 3:
message.publicKey = public_key_pb_1.AccountLinkedPublicKey.decode(reader, reader.uint32());
message.publicKey = public_key_pb_1.SignedPublicKey.decode(reader, reader.uint32());
break;

@@ -114,6 +63,6 @@ default:

secp256k1: isSet(object.secp256k1)
? exports.AccountLinkedPrivateKey_V1_Secp256k1.fromJSON(object.secp256k1)
? exports.SignedPrivateKey_Secp256k1.fromJSON(object.secp256k1)
: undefined,
publicKey: isSet(object.publicKey)
? public_key_pb_1.AccountLinkedPublicKey.fromJSON(object.publicKey)
? public_key_pb_1.SignedPublicKey.fromJSON(object.publicKey)
: undefined,

@@ -128,7 +77,7 @@ };

(obj.secp256k1 = message.secp256k1
? exports.AccountLinkedPrivateKey_V1_Secp256k1.toJSON(message.secp256k1)
? exports.SignedPrivateKey_Secp256k1.toJSON(message.secp256k1)
: undefined);
message.publicKey !== undefined &&
(obj.publicKey = message.publicKey
? public_key_pb_1.AccountLinkedPublicKey.toJSON(message.publicKey)
? public_key_pb_1.SignedPublicKey.toJSON(message.publicKey)
: undefined);

@@ -138,3 +87,3 @@ return obj;

fromPartial(object) {
const message = createBaseAccountLinkedPrivateKey_V1();
const message = createBaseSignedPrivateKey();
message.createdNs =

@@ -146,7 +95,7 @@ object.createdNs !== undefined && object.createdNs !== null

object.secp256k1 !== undefined && object.secp256k1 !== null
? exports.AccountLinkedPrivateKey_V1_Secp256k1.fromPartial(object.secp256k1)
? exports.SignedPrivateKey_Secp256k1.fromPartial(object.secp256k1)
: undefined;
message.publicKey =
object.publicKey !== undefined && object.publicKey !== null
? public_key_pb_1.AccountLinkedPublicKey.fromPartial(object.publicKey)
? public_key_pb_1.SignedPublicKey.fromPartial(object.publicKey)
: undefined;

@@ -156,6 +105,6 @@ return message;

};
function createBaseAccountLinkedPrivateKey_V1_Secp256k1() {
function createBaseSignedPrivateKey_Secp256k1() {
return { bytes: new Uint8Array() };
}
exports.AccountLinkedPrivateKey_V1_Secp256k1 = {
exports.SignedPrivateKey_Secp256k1 = {
encode(message, writer = minimal_1.default.Writer.create()) {

@@ -170,3 +119,3 @@ if (message.bytes.length !== 0) {

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAccountLinkedPrivateKey_V1_Secp256k1();
const message = createBaseSignedPrivateKey_Secp256k1();
while (reader.pos < end) {

@@ -200,3 +149,3 @@ const tag = reader.uint32();

var _a;
const message = createBaseAccountLinkedPrivateKey_V1_Secp256k1();
const message = createBaseSignedPrivateKey_Secp256k1();
message.bytes = (_a = object.bytes) !== null && _a !== void 0 ? _a : new Uint8Array();

@@ -206,16 +155,13 @@ return message;

};
function createBaseSignedPrivateKey() {
return { createdNs: long_1.default.UZERO, secp256k1: undefined, publicKey: undefined };
function createBasePrivateKeyBundleV2() {
return { identityKey: undefined, preKeys: [] };
}
exports.SignedPrivateKey = {
exports.PrivateKeyBundleV2 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (!message.createdNs.isZero()) {
writer.uint32(8).uint64(message.createdNs);
if (message.identityKey !== undefined) {
exports.SignedPrivateKey.encode(message.identityKey, writer.uint32(10).fork()).ldelim();
}
if (message.secp256k1 !== undefined) {
exports.SignedPrivateKey_Secp256k1.encode(message.secp256k1, writer.uint32(18).fork()).ldelim();
for (const v of message.preKeys) {
exports.SignedPrivateKey.encode(v, writer.uint32(18).fork()).ldelim();
}
if (message.publicKey !== undefined) {
public_key_pb_1.SignedPublicKey.encode(message.publicKey, writer.uint32(26).fork()).ldelim();
}
return writer;

@@ -226,3 +172,3 @@ },

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSignedPrivateKey();
const message = createBasePrivateKeyBundleV2();
while (reader.pos < end) {

@@ -232,10 +178,7 @@ const tag = reader.uint32();

case 1:
message.createdNs = reader.uint64();
message.identityKey = exports.SignedPrivateKey.decode(reader, reader.uint32());
break;
case 2:
message.secp256k1 = exports.SignedPrivateKey_Secp256k1.decode(reader, reader.uint32());
message.preKeys.push(exports.SignedPrivateKey.decode(reader, reader.uint32()));
break;
case 3:
message.publicKey = public_key_pb_1.SignedPublicKey.decode(reader, reader.uint32());
break;
default:

@@ -250,11 +193,8 @@ reader.skipType(tag & 7);

return {
createdNs: isSet(object.createdNs)
? long_1.default.fromValue(object.createdNs)
: long_1.default.UZERO,
secp256k1: isSet(object.secp256k1)
? exports.SignedPrivateKey_Secp256k1.fromJSON(object.secp256k1)
identityKey: isSet(object.identityKey)
? exports.SignedPrivateKey.fromJSON(object.identityKey)
: undefined,
publicKey: isSet(object.publicKey)
? public_key_pb_1.SignedPublicKey.fromJSON(object.publicKey)
: undefined,
preKeys: Array.isArray(object === null || object === void 0 ? void 0 : object.preKeys)
? object.preKeys.map((e) => exports.SignedPrivateKey.fromJSON(e))
: [],
};

@@ -264,69 +204,12 @@ },

const obj = {};
message.createdNs !== undefined &&
(obj.createdNs = (message.createdNs || long_1.default.UZERO).toString());
message.secp256k1 !== undefined &&
(obj.secp256k1 = message.secp256k1
? exports.SignedPrivateKey_Secp256k1.toJSON(message.secp256k1)
message.identityKey !== undefined &&
(obj.identityKey = message.identityKey
? exports.SignedPrivateKey.toJSON(message.identityKey)
: undefined);
message.publicKey !== undefined &&
(obj.publicKey = message.publicKey
? public_key_pb_1.SignedPublicKey.toJSON(message.publicKey)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseSignedPrivateKey();
message.createdNs =
object.createdNs !== undefined && object.createdNs !== null
? long_1.default.fromValue(object.createdNs)
: long_1.default.UZERO;
message.secp256k1 =
object.secp256k1 !== undefined && object.secp256k1 !== null
? exports.SignedPrivateKey_Secp256k1.fromPartial(object.secp256k1)
: undefined;
message.publicKey =
object.publicKey !== undefined && object.publicKey !== null
? public_key_pb_1.SignedPublicKey.fromPartial(object.publicKey)
: undefined;
return message;
},
};
function createBaseSignedPrivateKey_Secp256k1() {
return { bytes: new Uint8Array() };
}
exports.SignedPrivateKey_Secp256k1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.bytes.length !== 0) {
writer.uint32(10).bytes(message.bytes);
if (message.preKeys) {
obj.preKeys = message.preKeys.map((e) => e ? exports.SignedPrivateKey.toJSON(e) : undefined);
}
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 = createBaseSignedPrivateKey_Secp256k1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.bytes = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
}
else {
obj.preKeys = [];
}
return message;
},
fromJSON(object) {
return {
bytes: isSet(object.bytes)
? bytesFromBase64(object.bytes)
: new Uint8Array(),
};
},
toJSON(message) {
const obj = {};
message.bytes !== undefined &&
(obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array()));
return obj;

@@ -336,4 +219,9 @@ },

var _a;
const message = createBaseSignedPrivateKey_Secp256k1();
message.bytes = (_a = object.bytes) !== null && _a !== void 0 ? _a : new Uint8Array();
const message = createBasePrivateKeyBundleV2();
message.identityKey =
object.identityKey !== undefined && object.identityKey !== null
? exports.SignedPrivateKey.fromPartial(object.identityKey)
: undefined;
message.preKeys =
((_a = object.preKeys) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SignedPrivateKey.fromPartial(e))) || [];
return message;

@@ -541,142 +429,4 @@ },

};
function createBasePrivateKeyBundleV2() {
return { identityKey: undefined, preKeys: [] };
}
exports.PrivateKeyBundleV2 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.identityKey !== undefined) {
exports.SignedPrivateKey.encode(message.identityKey, writer.uint32(10).fork()).ldelim();
}
for (const v of message.preKeys) {
exports.SignedPrivateKey.encode(v, 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 = createBasePrivateKeyBundleV2();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.identityKey = exports.SignedPrivateKey.decode(reader, reader.uint32());
break;
case 2:
message.preKeys.push(exports.SignedPrivateKey.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
identityKey: isSet(object.identityKey)
? exports.SignedPrivateKey.fromJSON(object.identityKey)
: undefined,
preKeys: Array.isArray(object === null || object === void 0 ? void 0 : object.preKeys)
? object.preKeys.map((e) => exports.SignedPrivateKey.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
message.identityKey !== undefined &&
(obj.identityKey = message.identityKey
? exports.SignedPrivateKey.toJSON(message.identityKey)
: undefined);
if (message.preKeys) {
obj.preKeys = message.preKeys.map((e) => e ? exports.SignedPrivateKey.toJSON(e) : undefined);
}
else {
obj.preKeys = [];
}
return obj;
},
fromPartial(object) {
var _a;
const message = createBasePrivateKeyBundleV2();
message.identityKey =
object.identityKey !== undefined && object.identityKey !== null
? exports.SignedPrivateKey.fromPartial(object.identityKey)
: undefined;
message.preKeys =
((_a = object.preKeys) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SignedPrivateKey.fromPartial(e))) || [];
return message;
},
};
function createBasePrivateKeyBundleV3() {
return { accountLinkedKey: undefined, preKeys: [] };
}
exports.PrivateKeyBundleV3 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.accountLinkedKey !== undefined) {
exports.AccountLinkedPrivateKey.encode(message.accountLinkedKey, writer.uint32(10).fork()).ldelim();
}
for (const v of message.preKeys) {
exports.SignedPrivateKey.encode(v, 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 = createBasePrivateKeyBundleV3();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.accountLinkedKey = exports.AccountLinkedPrivateKey.decode(reader, reader.uint32());
break;
case 2:
message.preKeys.push(exports.SignedPrivateKey.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
accountLinkedKey: isSet(object.accountLinkedKey)
? exports.AccountLinkedPrivateKey.fromJSON(object.accountLinkedKey)
: undefined,
preKeys: Array.isArray(object === null || object === void 0 ? void 0 : object.preKeys)
? object.preKeys.map((e) => exports.SignedPrivateKey.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
message.accountLinkedKey !== undefined &&
(obj.accountLinkedKey = message.accountLinkedKey
? exports.AccountLinkedPrivateKey.toJSON(message.accountLinkedKey)
: undefined);
if (message.preKeys) {
obj.preKeys = message.preKeys.map((e) => e ? exports.SignedPrivateKey.toJSON(e) : undefined);
}
else {
obj.preKeys = [];
}
return obj;
},
fromPartial(object) {
var _a;
const message = createBasePrivateKeyBundleV3();
message.accountLinkedKey =
object.accountLinkedKey !== undefined && object.accountLinkedKey !== null
? exports.AccountLinkedPrivateKey.fromPartial(object.accountLinkedKey)
: undefined;
message.preKeys =
((_a = object.preKeys) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SignedPrivateKey.fromPartial(e))) || [];
return message;
},
};
function createBasePrivateKeyBundle() {
return { v1: undefined, v2: undefined, v3: undefined };
return { v1: undefined, v2: undefined };
}

@@ -691,5 +441,2 @@ exports.PrivateKeyBundle = {

}
if (message.v3 !== undefined) {
exports.PrivateKeyBundleV3.encode(message.v3, writer.uint32(26).fork()).ldelim();
}
return writer;

@@ -710,5 +457,2 @@ },

break;
case 3:
message.v3 = exports.PrivateKeyBundleV3.decode(reader, reader.uint32());
break;
default:

@@ -725,3 +469,2 @@ reader.skipType(tag & 7);

v2: isSet(object.v2) ? exports.PrivateKeyBundleV2.fromJSON(object.v2) : undefined,
v3: isSet(object.v3) ? exports.PrivateKeyBundleV3.fromJSON(object.v3) : undefined,
};

@@ -735,4 +478,2 @@ },

(obj.v2 = message.v2 ? exports.PrivateKeyBundleV2.toJSON(message.v2) : undefined);
message.v3 !== undefined &&
(obj.v3 = message.v3 ? exports.PrivateKeyBundleV3.toJSON(message.v3) : undefined);
return obj;

@@ -750,6 +491,2 @@ },

: undefined;
message.v3 =
object.v3 !== undefined && object.v3 !== null
? exports.PrivateKeyBundleV3.fromPartial(object.v3)
: undefined;
return message;

@@ -756,0 +493,0 @@ },

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PublicKeyBundle = exports.PublicKey_Secp256k1Uncompressed = exports.PublicKey = exports.SignedPublicKeyBundle = exports.SignedPublicKeyBundleV2 = exports.SignedPublicKey = exports.AccountRevokedPublicKey_V1 = exports.AccountRevokedPublicKey = exports.AccountLinkedPublicKey_V1 = exports.AccountLinkedPublicKey = exports.UnsignedPublicKey_Secp256k1Uncompressed = exports.UnsignedPublicKey = exports.protobufPackage = void 0;
exports.PublicKeyBundle = exports.PublicKey_Secp256k1Uncompressed = exports.PublicKey = exports.SignedPublicKeyBundle = exports.SignedPublicKey = exports.UnsignedPublicKey_Secp256k1Uncompressed = exports.UnsignedPublicKey = exports.protobufPackage = void 0;
/* eslint-disable */

@@ -128,253 +128,2 @@ const long_1 = __importDefault(require("long"));

};
function createBaseAccountLinkedPublicKey() {
return { v1: undefined };
}
exports.AccountLinkedPublicKey = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.v1 !== undefined) {
exports.AccountLinkedPublicKey_V1.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 = createBaseAccountLinkedPublicKey();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = exports.AccountLinkedPublicKey_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? exports.AccountLinkedPublicKey_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? exports.AccountLinkedPublicKey_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountLinkedPublicKey();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? exports.AccountLinkedPublicKey_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountLinkedPublicKey_V1() {
return {
keyBytes: new Uint8Array(),
staticSignature: undefined,
siweSignature: undefined,
};
}
exports.AccountLinkedPublicKey_V1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.keyBytes.length !== 0) {
writer.uint32(10).bytes(message.keyBytes);
}
if (message.staticSignature !== undefined) {
signature_pb_1.AccountLinkedStaticSignature.encode(message.staticSignature, writer.uint32(18).fork()).ldelim();
}
if (message.siweSignature !== undefined) {
signature_pb_1.AccountLinkedSIWESignature.encode(message.siweSignature, writer.uint32(26).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 = createBaseAccountLinkedPublicKey_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.keyBytes = reader.bytes();
break;
case 2:
message.staticSignature = signature_pb_1.AccountLinkedStaticSignature.decode(reader, reader.uint32());
break;
case 3:
message.siweSignature = signature_pb_1.AccountLinkedSIWESignature.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(),
staticSignature: isSet(object.staticSignature)
? signature_pb_1.AccountLinkedStaticSignature.fromJSON(object.staticSignature)
: undefined,
siweSignature: isSet(object.siweSignature)
? signature_pb_1.AccountLinkedSIWESignature.fromJSON(object.siweSignature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.keyBytes !== undefined &&
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array()));
message.staticSignature !== undefined &&
(obj.staticSignature = message.staticSignature
? signature_pb_1.AccountLinkedStaticSignature.toJSON(message.staticSignature)
: undefined);
message.siweSignature !== undefined &&
(obj.siweSignature = message.siweSignature
? signature_pb_1.AccountLinkedSIWESignature.toJSON(message.siweSignature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountLinkedPublicKey_V1();
message.keyBytes = (_a = object.keyBytes) !== null && _a !== void 0 ? _a : new Uint8Array();
message.staticSignature =
object.staticSignature !== undefined && object.staticSignature !== null
? signature_pb_1.AccountLinkedStaticSignature.fromPartial(object.staticSignature)
: undefined;
message.siweSignature =
object.siweSignature !== undefined && object.siweSignature !== null
? signature_pb_1.AccountLinkedSIWESignature.fromPartial(object.siweSignature)
: undefined;
return message;
},
};
function createBaseAccountRevokedPublicKey() {
return { v1: undefined };
}
exports.AccountRevokedPublicKey = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.v1 !== undefined) {
exports.AccountRevokedPublicKey_V1.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 = createBaseAccountRevokedPublicKey();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = exports.AccountRevokedPublicKey_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? exports.AccountRevokedPublicKey_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? exports.AccountRevokedPublicKey_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountRevokedPublicKey();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? exports.AccountRevokedPublicKey_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountRevokedPublicKey_V1() {
return { keyBytes: new Uint8Array(), staticSignature: undefined };
}
exports.AccountRevokedPublicKey_V1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.keyBytes.length !== 0) {
writer.uint32(10).bytes(message.keyBytes);
}
if (message.staticSignature !== undefined) {
signature_pb_1.AccountRevokedStaticSignature.encode(message.staticSignature, 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 = createBaseAccountRevokedPublicKey_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.keyBytes = reader.bytes();
break;
case 2:
message.staticSignature = signature_pb_1.AccountRevokedStaticSignature.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(),
staticSignature: isSet(object.staticSignature)
? signature_pb_1.AccountRevokedStaticSignature.fromJSON(object.staticSignature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.keyBytes !== undefined &&
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array()));
message.staticSignature !== undefined &&
(obj.staticSignature = message.staticSignature
? signature_pb_1.AccountRevokedStaticSignature.toJSON(message.staticSignature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountRevokedPublicKey_V1();
message.keyBytes = (_a = object.keyBytes) !== null && _a !== void 0 ? _a : new Uint8Array();
message.staticSignature =
object.staticSignature !== undefined && object.staticSignature !== null
? signature_pb_1.AccountRevokedStaticSignature.fromPartial(object.staticSignature)
: undefined;
return message;
},
};
function createBaseSignedPublicKey() {

@@ -444,70 +193,2 @@ return { keyBytes: new Uint8Array(), signature: undefined };

};
function createBaseSignedPublicKeyBundleV2() {
return { accountLinkedKey: undefined, preKey: undefined };
}
exports.SignedPublicKeyBundleV2 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.accountLinkedKey !== undefined) {
exports.AccountLinkedPublicKey.encode(message.accountLinkedKey, writer.uint32(10).fork()).ldelim();
}
if (message.preKey !== undefined) {
exports.SignedPublicKey.encode(message.preKey, 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 = createBaseSignedPublicKeyBundleV2();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.accountLinkedKey = exports.AccountLinkedPublicKey.decode(reader, reader.uint32());
break;
case 2:
message.preKey = exports.SignedPublicKey.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
accountLinkedKey: isSet(object.accountLinkedKey)
? exports.AccountLinkedPublicKey.fromJSON(object.accountLinkedKey)
: undefined,
preKey: isSet(object.preKey)
? exports.SignedPublicKey.fromJSON(object.preKey)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.accountLinkedKey !== undefined &&
(obj.accountLinkedKey = message.accountLinkedKey
? exports.AccountLinkedPublicKey.toJSON(message.accountLinkedKey)
: undefined);
message.preKey !== undefined &&
(obj.preKey = message.preKey
? exports.SignedPublicKey.toJSON(message.preKey)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseSignedPublicKeyBundleV2();
message.accountLinkedKey =
object.accountLinkedKey !== undefined && object.accountLinkedKey !== null
? exports.AccountLinkedPublicKey.fromPartial(object.accountLinkedKey)
: undefined;
message.preKey =
object.preKey !== undefined && object.preKey !== null
? exports.SignedPublicKey.fromPartial(object.preKey)
: undefined;
return message;
},
};
function createBaseSignedPublicKeyBundle() {

@@ -514,0 +195,0 @@ return { identityKey: undefined, preKey: undefined };

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountLinkedSIWESignature_V1 = exports.AccountLinkedSIWESignature = exports.AccountRevokedStaticSignature_V1 = exports.AccountRevokedStaticSignature = exports.AccountLinkedStaticSignature_V1 = exports.AccountLinkedStaticSignature = exports.Signature_WalletECDSACompact = exports.Signature_ECDSACompact = exports.Signature = exports.protobufPackage = void 0;
exports.Signature_WalletECDSACompact = exports.Signature_ECDSACompact = exports.Signature = exports.protobufPackage = void 0;
/* eslint-disable */

@@ -195,347 +195,2 @@ const long_1 = __importDefault(require("long"));

};
function createBaseAccountLinkedStaticSignature() {
return { v1: undefined };
}
exports.AccountLinkedStaticSignature = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.v1 !== undefined) {
exports.AccountLinkedStaticSignature_V1.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 = createBaseAccountLinkedStaticSignature();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = exports.AccountLinkedStaticSignature_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? exports.AccountLinkedStaticSignature_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? exports.AccountLinkedStaticSignature_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountLinkedStaticSignature();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? exports.AccountLinkedStaticSignature_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountLinkedStaticSignature_V1() {
return { text: new Uint8Array(), signature: undefined };
}
exports.AccountLinkedStaticSignature_V1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.text.length !== 0) {
writer.uint32(10).bytes(message.text);
}
if (message.signature !== undefined) {
exports.Signature.encode(message.signature, 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 = createBaseAccountLinkedStaticSignature_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.text = reader.bytes();
break;
case 2:
message.signature = exports.Signature.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
text: isSet(object.text)
? bytesFromBase64(object.text)
: new Uint8Array(),
signature: isSet(object.signature)
? exports.Signature.fromJSON(object.signature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.text !== undefined &&
(obj.text = base64FromBytes(message.text !== undefined ? message.text : new Uint8Array()));
message.signature !== undefined &&
(obj.signature = message.signature
? exports.Signature.toJSON(message.signature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountLinkedStaticSignature_V1();
message.text = (_a = object.text) !== null && _a !== void 0 ? _a : new Uint8Array();
message.signature =
object.signature !== undefined && object.signature !== null
? exports.Signature.fromPartial(object.signature)
: undefined;
return message;
},
};
function createBaseAccountRevokedStaticSignature() {
return { v1: undefined };
}
exports.AccountRevokedStaticSignature = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.v1 !== undefined) {
exports.AccountRevokedStaticSignature_V1.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 = createBaseAccountRevokedStaticSignature();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = exports.AccountRevokedStaticSignature_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? exports.AccountRevokedStaticSignature_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? exports.AccountRevokedStaticSignature_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountRevokedStaticSignature();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? exports.AccountRevokedStaticSignature_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountRevokedStaticSignature_V1() {
return { text: new Uint8Array(), signature: undefined };
}
exports.AccountRevokedStaticSignature_V1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.text.length !== 0) {
writer.uint32(10).bytes(message.text);
}
if (message.signature !== undefined) {
exports.Signature.encode(message.signature, 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 = createBaseAccountRevokedStaticSignature_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.text = reader.bytes();
break;
case 2:
message.signature = exports.Signature.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
text: isSet(object.text)
? bytesFromBase64(object.text)
: new Uint8Array(),
signature: isSet(object.signature)
? exports.Signature.fromJSON(object.signature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.text !== undefined &&
(obj.text = base64FromBytes(message.text !== undefined ? message.text : new Uint8Array()));
message.signature !== undefined &&
(obj.signature = message.signature
? exports.Signature.toJSON(message.signature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountRevokedStaticSignature_V1();
message.text = (_a = object.text) !== null && _a !== void 0 ? _a : new Uint8Array();
message.signature =
object.signature !== undefined && object.signature !== null
? exports.Signature.fromPartial(object.signature)
: undefined;
return message;
},
};
function createBaseAccountLinkedSIWESignature() {
return { v1: undefined };
}
exports.AccountLinkedSIWESignature = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.v1 !== undefined) {
exports.AccountLinkedSIWESignature_V1.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 = createBaseAccountLinkedSIWESignature();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = exports.AccountLinkedSIWESignature_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? exports.AccountLinkedSIWESignature_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? exports.AccountLinkedSIWESignature_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountLinkedSIWESignature();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? exports.AccountLinkedSIWESignature_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountLinkedSIWESignature_V1() {
return { text: new Uint8Array(), signature: undefined };
}
exports.AccountLinkedSIWESignature_V1 = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.text.length !== 0) {
writer.uint32(10).bytes(message.text);
}
if (message.signature !== undefined) {
exports.Signature.encode(message.signature, 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 = createBaseAccountLinkedSIWESignature_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.text = reader.bytes();
break;
case 2:
message.signature = exports.Signature.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
text: isSet(object.text)
? bytesFromBase64(object.text)
: new Uint8Array(),
signature: isSet(object.signature)
? exports.Signature.fromJSON(object.signature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.text !== undefined &&
(obj.text = base64FromBytes(message.text !== undefined ? message.text : new Uint8Array()));
message.signature !== undefined &&
(obj.signature = message.signature
? exports.Signature.toJSON(message.signature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountLinkedSIWESignature_V1();
message.text = (_a = object.text) !== null && _a !== void 0 ? _a : new Uint8Array();
message.signature =
object.signature !== undefined && object.signature !== null
? exports.Signature.fromPartial(object.signature)
: undefined;
return message;
},
};
var globalThis = (() => {

@@ -542,0 +197,0 @@ if (typeof globalThis !== "undefined")

/* eslint-disable */
import Long from "long";
import { SignedPublicKeyBundleV2, SignedPublicKeyBundle, } from "./public_key.pb";
import { SignedPublicKeyBundle } from "./public_key.pb";
import { Ciphertext } from "./ciphertext.pb";

@@ -262,87 +262,13 @@ import _m0 from "protobufjs/minimal";

};
function createBaseSealedInvitationHeaderV2() {
return { peerHeader: undefined, selfHeader: undefined };
function createBaseSealedInvitationHeaderV1() {
return { sender: undefined, recipient: undefined, createdNs: Long.UZERO };
}
export const SealedInvitationHeaderV2 = {
export const SealedInvitationHeaderV1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.peerHeader !== undefined) {
SealedInvitationHeaderV2_PeerInvitationHeader.encode(message.peerHeader, writer.uint32(10).fork()).ldelim();
if (message.sender !== undefined) {
SignedPublicKeyBundle.encode(message.sender, writer.uint32(10).fork()).ldelim();
}
if (message.selfHeader !== undefined) {
SealedInvitationHeaderV2_SelfInvitationHeader.encode(message.selfHeader, writer.uint32(18).fork()).ldelim();
if (message.recipient !== undefined) {
SignedPublicKeyBundle.encode(message.recipient, 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 = createBaseSealedInvitationHeaderV2();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.peerHeader =
SealedInvitationHeaderV2_PeerInvitationHeader.decode(reader, reader.uint32());
break;
case 2:
message.selfHeader =
SealedInvitationHeaderV2_SelfInvitationHeader.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
peerHeader: isSet(object.peerHeader)
? SealedInvitationHeaderV2_PeerInvitationHeader.fromJSON(object.peerHeader)
: undefined,
selfHeader: isSet(object.selfHeader)
? SealedInvitationHeaderV2_SelfInvitationHeader.fromJSON(object.selfHeader)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.peerHeader !== undefined &&
(obj.peerHeader = message.peerHeader
? SealedInvitationHeaderV2_PeerInvitationHeader.toJSON(message.peerHeader)
: undefined);
message.selfHeader !== undefined &&
(obj.selfHeader = message.selfHeader
? SealedInvitationHeaderV2_SelfInvitationHeader.toJSON(message.selfHeader)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseSealedInvitationHeaderV2();
message.peerHeader =
object.peerHeader !== undefined && object.peerHeader !== null
? SealedInvitationHeaderV2_PeerInvitationHeader.fromPartial(object.peerHeader)
: undefined;
message.selfHeader =
object.selfHeader !== undefined && object.selfHeader !== null
? SealedInvitationHeaderV2_SelfInvitationHeader.fromPartial(object.selfHeader)
: undefined;
return message;
},
};
function createBaseSealedInvitationHeaderV2_PeerInvitationHeader() {
return {
sendKeyBundle: undefined,
inboxKeyBundle: undefined,
createdNs: Long.UZERO,
};
}
export const SealedInvitationHeaderV2_PeerInvitationHeader = {
encode(message, writer = _m0.Writer.create()) {
if (message.sendKeyBundle !== undefined) {
SignedPublicKeyBundleV2.encode(message.sendKeyBundle, writer.uint32(10).fork()).ldelim();
}
if (message.inboxKeyBundle !== undefined) {
SignedPublicKeyBundleV2.encode(message.inboxKeyBundle, writer.uint32(18).fork()).ldelim();
}
if (!message.createdNs.isZero()) {

@@ -356,3 +282,3 @@ writer.uint32(24).uint64(message.createdNs);

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSealedInvitationHeaderV2_PeerInvitationHeader();
const message = createBaseSealedInvitationHeaderV1();
while (reader.pos < end) {

@@ -362,6 +288,6 @@ const tag = reader.uint32();

case 1:
message.sendKeyBundle = SignedPublicKeyBundleV2.decode(reader, reader.uint32());
message.sender = SignedPublicKeyBundle.decode(reader, reader.uint32());
break;
case 2:
message.inboxKeyBundle = SignedPublicKeyBundleV2.decode(reader, reader.uint32());
message.recipient = SignedPublicKeyBundle.decode(reader, reader.uint32());
break;

@@ -380,7 +306,7 @@ case 3:

return {
sendKeyBundle: isSet(object.sendKeyBundle)
? SignedPublicKeyBundleV2.fromJSON(object.sendKeyBundle)
sender: isSet(object.sender)
? SignedPublicKeyBundle.fromJSON(object.sender)
: undefined,
inboxKeyBundle: isSet(object.inboxKeyBundle)
? SignedPublicKeyBundleV2.fromJSON(object.inboxKeyBundle)
recipient: isSet(object.recipient)
? SignedPublicKeyBundle.fromJSON(object.recipient)
: undefined,

@@ -394,9 +320,9 @@ createdNs: isSet(object.createdNs)

const obj = {};
message.sendKeyBundle !== undefined &&
(obj.sendKeyBundle = message.sendKeyBundle
? SignedPublicKeyBundleV2.toJSON(message.sendKeyBundle)
message.sender !== undefined &&
(obj.sender = message.sender
? SignedPublicKeyBundle.toJSON(message.sender)
: undefined);
message.inboxKeyBundle !== undefined &&
(obj.inboxKeyBundle = message.inboxKeyBundle
? SignedPublicKeyBundleV2.toJSON(message.inboxKeyBundle)
message.recipient !== undefined &&
(obj.recipient = message.recipient
? SignedPublicKeyBundle.toJSON(message.recipient)
: undefined);

@@ -408,10 +334,10 @@ message.createdNs !== undefined &&

fromPartial(object) {
const message = createBaseSealedInvitationHeaderV2_PeerInvitationHeader();
message.sendKeyBundle =
object.sendKeyBundle !== undefined && object.sendKeyBundle !== null
? SignedPublicKeyBundleV2.fromPartial(object.sendKeyBundle)
const message = createBaseSealedInvitationHeaderV1();
message.sender =
object.sender !== undefined && object.sender !== null
? SignedPublicKeyBundle.fromPartial(object.sender)
: undefined;
message.inboxKeyBundle =
object.inboxKeyBundle !== undefined && object.inboxKeyBundle !== null
? SignedPublicKeyBundleV2.fromPartial(object.inboxKeyBundle)
message.recipient =
object.recipient !== undefined && object.recipient !== null
? SignedPublicKeyBundle.fromPartial(object.recipient)
: undefined;

@@ -425,107 +351,6 @@ message.createdNs =

};
function createBaseSealedInvitationHeaderV2_SelfInvitationHeader() {
return {
sendKeyBundle: undefined,
inboxKeyBundle: undefined,
createdNs: Long.UZERO,
recipientAddress: "",
};
}
export const SealedInvitationHeaderV2_SelfInvitationHeader = {
encode(message, writer = _m0.Writer.create()) {
if (message.sendKeyBundle !== undefined) {
SignedPublicKeyBundleV2.encode(message.sendKeyBundle, writer.uint32(10).fork()).ldelim();
}
if (message.inboxKeyBundle !== undefined) {
SignedPublicKeyBundleV2.encode(message.inboxKeyBundle, writer.uint32(18).fork()).ldelim();
}
if (!message.createdNs.isZero()) {
writer.uint32(24).uint64(message.createdNs);
}
if (message.recipientAddress !== "") {
writer.uint32(34).string(message.recipientAddress);
}
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 = createBaseSealedInvitationHeaderV2_SelfInvitationHeader();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.sendKeyBundle = SignedPublicKeyBundleV2.decode(reader, reader.uint32());
break;
case 2:
message.inboxKeyBundle = SignedPublicKeyBundleV2.decode(reader, reader.uint32());
break;
case 3:
message.createdNs = reader.uint64();
break;
case 4:
message.recipientAddress = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
sendKeyBundle: isSet(object.sendKeyBundle)
? SignedPublicKeyBundleV2.fromJSON(object.sendKeyBundle)
: undefined,
inboxKeyBundle: isSet(object.inboxKeyBundle)
? SignedPublicKeyBundleV2.fromJSON(object.inboxKeyBundle)
: undefined,
createdNs: isSet(object.createdNs)
? Long.fromValue(object.createdNs)
: Long.UZERO,
recipientAddress: isSet(object.recipientAddress)
? String(object.recipientAddress)
: "",
};
},
toJSON(message) {
const obj = {};
message.sendKeyBundle !== undefined &&
(obj.sendKeyBundle = message.sendKeyBundle
? SignedPublicKeyBundleV2.toJSON(message.sendKeyBundle)
: undefined);
message.inboxKeyBundle !== undefined &&
(obj.inboxKeyBundle = message.inboxKeyBundle
? SignedPublicKeyBundleV2.toJSON(message.inboxKeyBundle)
: undefined);
message.createdNs !== undefined &&
(obj.createdNs = (message.createdNs || Long.UZERO).toString());
message.recipientAddress !== undefined &&
(obj.recipientAddress = message.recipientAddress);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseSealedInvitationHeaderV2_SelfInvitationHeader();
message.sendKeyBundle =
object.sendKeyBundle !== undefined && object.sendKeyBundle !== null
? SignedPublicKeyBundleV2.fromPartial(object.sendKeyBundle)
: undefined;
message.inboxKeyBundle =
object.inboxKeyBundle !== undefined && object.inboxKeyBundle !== null
? SignedPublicKeyBundleV2.fromPartial(object.inboxKeyBundle)
: undefined;
message.createdNs =
object.createdNs !== undefined && object.createdNs !== null
? Long.fromValue(object.createdNs)
: Long.UZERO;
message.recipientAddress = (_a = object.recipientAddress) !== null && _a !== void 0 ? _a : "";
return message;
},
};
function createBaseSealedInvitationV2() {
function createBaseSealedInvitationV1() {
return { headerBytes: new Uint8Array(), ciphertext: undefined };
}
export const SealedInvitationV2 = {
export const SealedInvitationV1 = {
encode(message, writer = _m0.Writer.create()) {

@@ -543,3 +368,3 @@ if (message.headerBytes.length !== 0) {

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSealedInvitationV2();
const message = createBaseSealedInvitationV1();
while (reader.pos < end) {

@@ -585,3 +410,3 @@ const tag = reader.uint32();

var _a;
const message = createBaseSealedInvitationV2();
const message = createBaseSealedInvitationV1();
message.headerBytes = (_a = object.headerBytes) !== null && _a !== void 0 ? _a : new Uint8Array();

@@ -596,3 +421,3 @@ message.ciphertext =

function createBaseSealedInvitation() {
return { v1: undefined, v2: undefined };
return { v1: undefined };
}

@@ -604,5 +429,2 @@ export const SealedInvitation = {

}
if (message.v2 !== undefined) {
SealedInvitationV2.encode(message.v2, writer.uint32(18).fork()).ldelim();
}
return writer;

@@ -620,5 +442,2 @@ },

break;
case 2:
message.v2 = SealedInvitationV2.decode(reader, reader.uint32());
break;
default:

@@ -634,3 +453,2 @@ reader.skipType(tag & 7);

v1: isSet(object.v1) ? SealedInvitationV1.fromJSON(object.v1) : undefined,
v2: isSet(object.v2) ? SealedInvitationV2.fromJSON(object.v2) : undefined,
};

@@ -642,4 +460,2 @@ },

(obj.v1 = message.v1 ? SealedInvitationV1.toJSON(message.v1) : undefined);
message.v2 !== undefined &&
(obj.v2 = message.v2 ? SealedInvitationV2.toJSON(message.v2) : undefined);
return obj;

@@ -653,158 +469,5 @@ },

: undefined;
message.v2 =
object.v2 !== undefined && object.v2 !== null
? SealedInvitationV2.fromPartial(object.v2)
: undefined;
return message;
},
};
function createBaseSealedInvitationHeaderV1() {
return { sender: undefined, recipient: undefined, createdNs: Long.UZERO };
}
export const SealedInvitationHeaderV1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.sender !== undefined) {
SignedPublicKeyBundle.encode(message.sender, writer.uint32(10).fork()).ldelim();
}
if (message.recipient !== undefined) {
SignedPublicKeyBundle.encode(message.recipient, writer.uint32(18).fork()).ldelim();
}
if (!message.createdNs.isZero()) {
writer.uint32(24).uint64(message.createdNs);
}
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 = createBaseSealedInvitationHeaderV1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.sender = SignedPublicKeyBundle.decode(reader, reader.uint32());
break;
case 2:
message.recipient = SignedPublicKeyBundle.decode(reader, reader.uint32());
break;
case 3:
message.createdNs = reader.uint64();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
sender: isSet(object.sender)
? SignedPublicKeyBundle.fromJSON(object.sender)
: undefined,
recipient: isSet(object.recipient)
? SignedPublicKeyBundle.fromJSON(object.recipient)
: undefined,
createdNs: isSet(object.createdNs)
? Long.fromValue(object.createdNs)
: Long.UZERO,
};
},
toJSON(message) {
const obj = {};
message.sender !== undefined &&
(obj.sender = message.sender
? SignedPublicKeyBundle.toJSON(message.sender)
: undefined);
message.recipient !== undefined &&
(obj.recipient = message.recipient
? SignedPublicKeyBundle.toJSON(message.recipient)
: undefined);
message.createdNs !== undefined &&
(obj.createdNs = (message.createdNs || Long.UZERO).toString());
return obj;
},
fromPartial(object) {
const message = createBaseSealedInvitationHeaderV1();
message.sender =
object.sender !== undefined && object.sender !== null
? SignedPublicKeyBundle.fromPartial(object.sender)
: undefined;
message.recipient =
object.recipient !== undefined && object.recipient !== null
? SignedPublicKeyBundle.fromPartial(object.recipient)
: undefined;
message.createdNs =
object.createdNs !== undefined && object.createdNs !== null
? Long.fromValue(object.createdNs)
: Long.UZERO;
return message;
},
};
function createBaseSealedInvitationV1() {
return { headerBytes: new Uint8Array(), ciphertext: undefined };
}
export const SealedInvitationV1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.headerBytes.length !== 0) {
writer.uint32(10).bytes(message.headerBytes);
}
if (message.ciphertext !== undefined) {
Ciphertext.encode(message.ciphertext, 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 = createBaseSealedInvitationV1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.headerBytes = reader.bytes();
break;
case 2:
message.ciphertext = Ciphertext.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
headerBytes: isSet(object.headerBytes)
? bytesFromBase64(object.headerBytes)
: new Uint8Array(),
ciphertext: isSet(object.ciphertext)
? Ciphertext.fromJSON(object.ciphertext)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.headerBytes !== undefined &&
(obj.headerBytes = base64FromBytes(message.headerBytes !== undefined
? message.headerBytes
: new Uint8Array()));
message.ciphertext !== undefined &&
(obj.ciphertext = message.ciphertext
? Ciphertext.toJSON(message.ciphertext)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseSealedInvitationV1();
message.headerBytes = (_a = object.headerBytes) !== null && _a !== void 0 ? _a : new Uint8Array();
message.ciphertext =
object.ciphertext !== undefined && object.ciphertext !== null
? Ciphertext.fromPartial(object.ciphertext)
: undefined;
return message;
},
};
var globalThis = (() => {

@@ -811,0 +474,0 @@ if (typeof globalThis !== "undefined")

@@ -5,2 +5,3 @@ /* eslint-disable */

import { Ciphertext } from "./ciphertext.pb";
import { ConversationReference } from "../keystore_api/v1/keystore.pb";
import _m0 from "protobufjs/minimal";

@@ -342,2 +343,147 @@ export const protobufPackage = "xmtp.message_contents";

};
function createBaseDecodedMessage() {
return {
id: "",
messageVersion: "",
senderAddress: "",
recipientAddress: undefined,
sentNs: Long.UZERO,
contentTopic: "",
conversation: undefined,
contentBytes: new Uint8Array(),
};
}
export const DecodedMessage = {
encode(message, writer = _m0.Writer.create()) {
if (message.id !== "") {
writer.uint32(10).string(message.id);
}
if (message.messageVersion !== "") {
writer.uint32(18).string(message.messageVersion);
}
if (message.senderAddress !== "") {
writer.uint32(26).string(message.senderAddress);
}
if (message.recipientAddress !== undefined) {
writer.uint32(34).string(message.recipientAddress);
}
if (!message.sentNs.isZero()) {
writer.uint32(40).uint64(message.sentNs);
}
if (message.contentTopic !== "") {
writer.uint32(50).string(message.contentTopic);
}
if (message.conversation !== undefined) {
ConversationReference.encode(message.conversation, writer.uint32(58).fork()).ldelim();
}
if (message.contentBytes.length !== 0) {
writer.uint32(66).bytes(message.contentBytes);
}
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 = createBaseDecodedMessage();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.id = reader.string();
break;
case 2:
message.messageVersion = reader.string();
break;
case 3:
message.senderAddress = reader.string();
break;
case 4:
message.recipientAddress = reader.string();
break;
case 5:
message.sentNs = reader.uint64();
break;
case 6:
message.contentTopic = reader.string();
break;
case 7:
message.conversation = ConversationReference.decode(reader, reader.uint32());
break;
case 8:
message.contentBytes = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
id: isSet(object.id) ? String(object.id) : "",
messageVersion: isSet(object.messageVersion)
? String(object.messageVersion)
: "",
senderAddress: isSet(object.senderAddress)
? String(object.senderAddress)
: "",
recipientAddress: isSet(object.recipientAddress)
? String(object.recipientAddress)
: undefined,
sentNs: isSet(object.sentNs) ? Long.fromValue(object.sentNs) : Long.UZERO,
contentTopic: isSet(object.contentTopic)
? String(object.contentTopic)
: "",
conversation: isSet(object.conversation)
? ConversationReference.fromJSON(object.conversation)
: undefined,
contentBytes: isSet(object.contentBytes)
? bytesFromBase64(object.contentBytes)
: new Uint8Array(),
};
},
toJSON(message) {
const obj = {};
message.id !== undefined && (obj.id = message.id);
message.messageVersion !== undefined &&
(obj.messageVersion = message.messageVersion);
message.senderAddress !== undefined &&
(obj.senderAddress = message.senderAddress);
message.recipientAddress !== undefined &&
(obj.recipientAddress = message.recipientAddress);
message.sentNs !== undefined &&
(obj.sentNs = (message.sentNs || Long.UZERO).toString());
message.contentTopic !== undefined &&
(obj.contentTopic = message.contentTopic);
message.conversation !== undefined &&
(obj.conversation = message.conversation
? ConversationReference.toJSON(message.conversation)
: undefined);
message.contentBytes !== undefined &&
(obj.contentBytes = base64FromBytes(message.contentBytes !== undefined
? message.contentBytes
: new Uint8Array()));
return obj;
},
fromPartial(object) {
var _a, _b, _c, _d, _e, _f;
const message = createBaseDecodedMessage();
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
message.messageVersion = (_b = object.messageVersion) !== null && _b !== void 0 ? _b : "";
message.senderAddress = (_c = object.senderAddress) !== null && _c !== void 0 ? _c : "";
message.recipientAddress = (_d = object.recipientAddress) !== null && _d !== void 0 ? _d : undefined;
message.sentNs =
object.sentNs !== undefined && object.sentNs !== null
? Long.fromValue(object.sentNs)
: Long.UZERO;
message.contentTopic = (_e = object.contentTopic) !== null && _e !== void 0 ? _e : "";
message.conversation =
object.conversation !== undefined && object.conversation !== null
? ConversationReference.fromPartial(object.conversation)
: undefined;
message.contentBytes = (_f = object.contentBytes) !== null && _f !== void 0 ? _f : new Uint8Array();
return message;
},
};
var globalThis = (() => {

@@ -344,0 +490,0 @@ if (typeof globalThis !== "undefined")

/* eslint-disable */
import Long from "long";
import { AccountLinkedPublicKey, SignedPublicKey, PublicKey, } from "./public_key.pb";
import { SignedPublicKey, PublicKey } from "./public_key.pb";
import { Ciphertext } from "./ciphertext.pb";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "xmtp.message_contents";
function createBaseAccountLinkedPrivateKey() {
return { v1: undefined };
}
export const AccountLinkedPrivateKey = {
encode(message, writer = _m0.Writer.create()) {
if (message.v1 !== undefined) {
AccountLinkedPrivateKey_V1.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 = createBaseAccountLinkedPrivateKey();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = AccountLinkedPrivateKey_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? AccountLinkedPrivateKey_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? AccountLinkedPrivateKey_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountLinkedPrivateKey();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? AccountLinkedPrivateKey_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountLinkedPrivateKey_V1() {
function createBaseSignedPrivateKey() {
return { createdNs: Long.UZERO, secp256k1: undefined, publicKey: undefined };
}
export const AccountLinkedPrivateKey_V1 = {
export const SignedPrivateKey = {
encode(message, writer = _m0.Writer.create()) {

@@ -67,6 +16,6 @@ if (!message.createdNs.isZero()) {

if (message.secp256k1 !== undefined) {
AccountLinkedPrivateKey_V1_Secp256k1.encode(message.secp256k1, writer.uint32(18).fork()).ldelim();
SignedPrivateKey_Secp256k1.encode(message.secp256k1, writer.uint32(18).fork()).ldelim();
}
if (message.publicKey !== undefined) {
AccountLinkedPublicKey.encode(message.publicKey, writer.uint32(26).fork()).ldelim();
SignedPublicKey.encode(message.publicKey, writer.uint32(26).fork()).ldelim();
}

@@ -78,3 +27,3 @@ return writer;

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAccountLinkedPrivateKey_V1();
const message = createBaseSignedPrivateKey();
while (reader.pos < end) {

@@ -87,6 +36,6 @@ const tag = reader.uint32();

case 2:
message.secp256k1 = AccountLinkedPrivateKey_V1_Secp256k1.decode(reader, reader.uint32());
message.secp256k1 = SignedPrivateKey_Secp256k1.decode(reader, reader.uint32());
break;
case 3:
message.publicKey = AccountLinkedPublicKey.decode(reader, reader.uint32());
message.publicKey = SignedPublicKey.decode(reader, reader.uint32());
break;

@@ -106,6 +55,6 @@ default:

secp256k1: isSet(object.secp256k1)
? AccountLinkedPrivateKey_V1_Secp256k1.fromJSON(object.secp256k1)
? SignedPrivateKey_Secp256k1.fromJSON(object.secp256k1)
: undefined,
publicKey: isSet(object.publicKey)
? AccountLinkedPublicKey.fromJSON(object.publicKey)
? SignedPublicKey.fromJSON(object.publicKey)
: undefined,

@@ -120,7 +69,7 @@ };

(obj.secp256k1 = message.secp256k1
? AccountLinkedPrivateKey_V1_Secp256k1.toJSON(message.secp256k1)
? SignedPrivateKey_Secp256k1.toJSON(message.secp256k1)
: undefined);
message.publicKey !== undefined &&
(obj.publicKey = message.publicKey
? AccountLinkedPublicKey.toJSON(message.publicKey)
? SignedPublicKey.toJSON(message.publicKey)
: undefined);

@@ -130,3 +79,3 @@ return obj;

fromPartial(object) {
const message = createBaseAccountLinkedPrivateKey_V1();
const message = createBaseSignedPrivateKey();
message.createdNs =

@@ -138,7 +87,7 @@ object.createdNs !== undefined && object.createdNs !== null

object.secp256k1 !== undefined && object.secp256k1 !== null
? AccountLinkedPrivateKey_V1_Secp256k1.fromPartial(object.secp256k1)
? SignedPrivateKey_Secp256k1.fromPartial(object.secp256k1)
: undefined;
message.publicKey =
object.publicKey !== undefined && object.publicKey !== null
? AccountLinkedPublicKey.fromPartial(object.publicKey)
? SignedPublicKey.fromPartial(object.publicKey)
: undefined;

@@ -148,6 +97,6 @@ return message;

};
function createBaseAccountLinkedPrivateKey_V1_Secp256k1() {
function createBaseSignedPrivateKey_Secp256k1() {
return { bytes: new Uint8Array() };
}
export const AccountLinkedPrivateKey_V1_Secp256k1 = {
export const SignedPrivateKey_Secp256k1 = {
encode(message, writer = _m0.Writer.create()) {

@@ -162,3 +111,3 @@ if (message.bytes.length !== 0) {

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAccountLinkedPrivateKey_V1_Secp256k1();
const message = createBaseSignedPrivateKey_Secp256k1();
while (reader.pos < end) {

@@ -192,3 +141,3 @@ const tag = reader.uint32();

var _a;
const message = createBaseAccountLinkedPrivateKey_V1_Secp256k1();
const message = createBaseSignedPrivateKey_Secp256k1();
message.bytes = (_a = object.bytes) !== null && _a !== void 0 ? _a : new Uint8Array();

@@ -198,16 +147,13 @@ return message;

};
function createBaseSignedPrivateKey() {
return { createdNs: Long.UZERO, secp256k1: undefined, publicKey: undefined };
function createBasePrivateKeyBundleV2() {
return { identityKey: undefined, preKeys: [] };
}
export const SignedPrivateKey = {
export const PrivateKeyBundleV2 = {
encode(message, writer = _m0.Writer.create()) {
if (!message.createdNs.isZero()) {
writer.uint32(8).uint64(message.createdNs);
if (message.identityKey !== undefined) {
SignedPrivateKey.encode(message.identityKey, writer.uint32(10).fork()).ldelim();
}
if (message.secp256k1 !== undefined) {
SignedPrivateKey_Secp256k1.encode(message.secp256k1, writer.uint32(18).fork()).ldelim();
for (const v of message.preKeys) {
SignedPrivateKey.encode(v, writer.uint32(18).fork()).ldelim();
}
if (message.publicKey !== undefined) {
SignedPublicKey.encode(message.publicKey, writer.uint32(26).fork()).ldelim();
}
return writer;

@@ -218,3 +164,3 @@ },

let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSignedPrivateKey();
const message = createBasePrivateKeyBundleV2();
while (reader.pos < end) {

@@ -224,10 +170,7 @@ const tag = reader.uint32();

case 1:
message.createdNs = reader.uint64();
message.identityKey = SignedPrivateKey.decode(reader, reader.uint32());
break;
case 2:
message.secp256k1 = SignedPrivateKey_Secp256k1.decode(reader, reader.uint32());
message.preKeys.push(SignedPrivateKey.decode(reader, reader.uint32()));
break;
case 3:
message.publicKey = SignedPublicKey.decode(reader, reader.uint32());
break;
default:

@@ -242,11 +185,8 @@ reader.skipType(tag & 7);

return {
createdNs: isSet(object.createdNs)
? Long.fromValue(object.createdNs)
: Long.UZERO,
secp256k1: isSet(object.secp256k1)
? SignedPrivateKey_Secp256k1.fromJSON(object.secp256k1)
identityKey: isSet(object.identityKey)
? SignedPrivateKey.fromJSON(object.identityKey)
: undefined,
publicKey: isSet(object.publicKey)
? SignedPublicKey.fromJSON(object.publicKey)
: undefined,
preKeys: Array.isArray(object === null || object === void 0 ? void 0 : object.preKeys)
? object.preKeys.map((e) => SignedPrivateKey.fromJSON(e))
: [],
};

@@ -256,69 +196,12 @@ },

const obj = {};
message.createdNs !== undefined &&
(obj.createdNs = (message.createdNs || Long.UZERO).toString());
message.secp256k1 !== undefined &&
(obj.secp256k1 = message.secp256k1
? SignedPrivateKey_Secp256k1.toJSON(message.secp256k1)
message.identityKey !== undefined &&
(obj.identityKey = message.identityKey
? SignedPrivateKey.toJSON(message.identityKey)
: undefined);
message.publicKey !== undefined &&
(obj.publicKey = message.publicKey
? SignedPublicKey.toJSON(message.publicKey)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseSignedPrivateKey();
message.createdNs =
object.createdNs !== undefined && object.createdNs !== null
? Long.fromValue(object.createdNs)
: Long.UZERO;
message.secp256k1 =
object.secp256k1 !== undefined && object.secp256k1 !== null
? SignedPrivateKey_Secp256k1.fromPartial(object.secp256k1)
: undefined;
message.publicKey =
object.publicKey !== undefined && object.publicKey !== null
? SignedPublicKey.fromPartial(object.publicKey)
: undefined;
return message;
},
};
function createBaseSignedPrivateKey_Secp256k1() {
return { bytes: new Uint8Array() };
}
export const SignedPrivateKey_Secp256k1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.bytes.length !== 0) {
writer.uint32(10).bytes(message.bytes);
if (message.preKeys) {
obj.preKeys = message.preKeys.map((e) => e ? SignedPrivateKey.toJSON(e) : undefined);
}
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 = createBaseSignedPrivateKey_Secp256k1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.bytes = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
}
else {
obj.preKeys = [];
}
return message;
},
fromJSON(object) {
return {
bytes: isSet(object.bytes)
? bytesFromBase64(object.bytes)
: new Uint8Array(),
};
},
toJSON(message) {
const obj = {};
message.bytes !== undefined &&
(obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array()));
return obj;

@@ -328,4 +211,9 @@ },

var _a;
const message = createBaseSignedPrivateKey_Secp256k1();
message.bytes = (_a = object.bytes) !== null && _a !== void 0 ? _a : new Uint8Array();
const message = createBasePrivateKeyBundleV2();
message.identityKey =
object.identityKey !== undefined && object.identityKey !== null
? SignedPrivateKey.fromPartial(object.identityKey)
: undefined;
message.preKeys =
((_a = object.preKeys) === null || _a === void 0 ? void 0 : _a.map((e) => SignedPrivateKey.fromPartial(e))) || [];
return message;

@@ -533,142 +421,4 @@ },

};
function createBasePrivateKeyBundleV2() {
return { identityKey: undefined, preKeys: [] };
}
export const PrivateKeyBundleV2 = {
encode(message, writer = _m0.Writer.create()) {
if (message.identityKey !== undefined) {
SignedPrivateKey.encode(message.identityKey, writer.uint32(10).fork()).ldelim();
}
for (const v of message.preKeys) {
SignedPrivateKey.encode(v, 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 = createBasePrivateKeyBundleV2();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.identityKey = SignedPrivateKey.decode(reader, reader.uint32());
break;
case 2:
message.preKeys.push(SignedPrivateKey.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
identityKey: isSet(object.identityKey)
? SignedPrivateKey.fromJSON(object.identityKey)
: undefined,
preKeys: Array.isArray(object === null || object === void 0 ? void 0 : object.preKeys)
? object.preKeys.map((e) => SignedPrivateKey.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
message.identityKey !== undefined &&
(obj.identityKey = message.identityKey
? SignedPrivateKey.toJSON(message.identityKey)
: undefined);
if (message.preKeys) {
obj.preKeys = message.preKeys.map((e) => e ? SignedPrivateKey.toJSON(e) : undefined);
}
else {
obj.preKeys = [];
}
return obj;
},
fromPartial(object) {
var _a;
const message = createBasePrivateKeyBundleV2();
message.identityKey =
object.identityKey !== undefined && object.identityKey !== null
? SignedPrivateKey.fromPartial(object.identityKey)
: undefined;
message.preKeys =
((_a = object.preKeys) === null || _a === void 0 ? void 0 : _a.map((e) => SignedPrivateKey.fromPartial(e))) || [];
return message;
},
};
function createBasePrivateKeyBundleV3() {
return { accountLinkedKey: undefined, preKeys: [] };
}
export const PrivateKeyBundleV3 = {
encode(message, writer = _m0.Writer.create()) {
if (message.accountLinkedKey !== undefined) {
AccountLinkedPrivateKey.encode(message.accountLinkedKey, writer.uint32(10).fork()).ldelim();
}
for (const v of message.preKeys) {
SignedPrivateKey.encode(v, 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 = createBasePrivateKeyBundleV3();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.accountLinkedKey = AccountLinkedPrivateKey.decode(reader, reader.uint32());
break;
case 2:
message.preKeys.push(SignedPrivateKey.decode(reader, reader.uint32()));
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
accountLinkedKey: isSet(object.accountLinkedKey)
? AccountLinkedPrivateKey.fromJSON(object.accountLinkedKey)
: undefined,
preKeys: Array.isArray(object === null || object === void 0 ? void 0 : object.preKeys)
? object.preKeys.map((e) => SignedPrivateKey.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
message.accountLinkedKey !== undefined &&
(obj.accountLinkedKey = message.accountLinkedKey
? AccountLinkedPrivateKey.toJSON(message.accountLinkedKey)
: undefined);
if (message.preKeys) {
obj.preKeys = message.preKeys.map((e) => e ? SignedPrivateKey.toJSON(e) : undefined);
}
else {
obj.preKeys = [];
}
return obj;
},
fromPartial(object) {
var _a;
const message = createBasePrivateKeyBundleV3();
message.accountLinkedKey =
object.accountLinkedKey !== undefined && object.accountLinkedKey !== null
? AccountLinkedPrivateKey.fromPartial(object.accountLinkedKey)
: undefined;
message.preKeys =
((_a = object.preKeys) === null || _a === void 0 ? void 0 : _a.map((e) => SignedPrivateKey.fromPartial(e))) || [];
return message;
},
};
function createBasePrivateKeyBundle() {
return { v1: undefined, v2: undefined, v3: undefined };
return { v1: undefined, v2: undefined };
}

@@ -683,5 +433,2 @@ export const PrivateKeyBundle = {

}
if (message.v3 !== undefined) {
PrivateKeyBundleV3.encode(message.v3, writer.uint32(26).fork()).ldelim();
}
return writer;

@@ -702,5 +449,2 @@ },

break;
case 3:
message.v3 = PrivateKeyBundleV3.decode(reader, reader.uint32());
break;
default:

@@ -717,3 +461,2 @@ reader.skipType(tag & 7);

v2: isSet(object.v2) ? PrivateKeyBundleV2.fromJSON(object.v2) : undefined,
v3: isSet(object.v3) ? PrivateKeyBundleV3.fromJSON(object.v3) : undefined,
};

@@ -727,4 +470,2 @@ },

(obj.v2 = message.v2 ? PrivateKeyBundleV2.toJSON(message.v2) : undefined);
message.v3 !== undefined &&
(obj.v3 = message.v3 ? PrivateKeyBundleV3.toJSON(message.v3) : undefined);
return obj;

@@ -742,6 +483,2 @@ },

: undefined;
message.v3 =
object.v3 !== undefined && object.v3 !== null
? PrivateKeyBundleV3.fromPartial(object.v3)
: undefined;
return message;

@@ -748,0 +485,0 @@ },

/* eslint-disable */
import Long from "long";
import { AccountLinkedStaticSignature, AccountLinkedSIWESignature, AccountRevokedStaticSignature, Signature, } from "./signature.pb";
import { Signature } from "./signature.pb";
import _m0 from "protobufjs/minimal";

@@ -121,253 +121,2 @@ export const protobufPackage = "xmtp.message_contents";

};
function createBaseAccountLinkedPublicKey() {
return { v1: undefined };
}
export const AccountLinkedPublicKey = {
encode(message, writer = _m0.Writer.create()) {
if (message.v1 !== undefined) {
AccountLinkedPublicKey_V1.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 = createBaseAccountLinkedPublicKey();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = AccountLinkedPublicKey_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? AccountLinkedPublicKey_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? AccountLinkedPublicKey_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountLinkedPublicKey();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? AccountLinkedPublicKey_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountLinkedPublicKey_V1() {
return {
keyBytes: new Uint8Array(),
staticSignature: undefined,
siweSignature: undefined,
};
}
export const AccountLinkedPublicKey_V1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.keyBytes.length !== 0) {
writer.uint32(10).bytes(message.keyBytes);
}
if (message.staticSignature !== undefined) {
AccountLinkedStaticSignature.encode(message.staticSignature, writer.uint32(18).fork()).ldelim();
}
if (message.siweSignature !== undefined) {
AccountLinkedSIWESignature.encode(message.siweSignature, writer.uint32(26).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 = createBaseAccountLinkedPublicKey_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.keyBytes = reader.bytes();
break;
case 2:
message.staticSignature = AccountLinkedStaticSignature.decode(reader, reader.uint32());
break;
case 3:
message.siweSignature = AccountLinkedSIWESignature.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(),
staticSignature: isSet(object.staticSignature)
? AccountLinkedStaticSignature.fromJSON(object.staticSignature)
: undefined,
siweSignature: isSet(object.siweSignature)
? AccountLinkedSIWESignature.fromJSON(object.siweSignature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.keyBytes !== undefined &&
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array()));
message.staticSignature !== undefined &&
(obj.staticSignature = message.staticSignature
? AccountLinkedStaticSignature.toJSON(message.staticSignature)
: undefined);
message.siweSignature !== undefined &&
(obj.siweSignature = message.siweSignature
? AccountLinkedSIWESignature.toJSON(message.siweSignature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountLinkedPublicKey_V1();
message.keyBytes = (_a = object.keyBytes) !== null && _a !== void 0 ? _a : new Uint8Array();
message.staticSignature =
object.staticSignature !== undefined && object.staticSignature !== null
? AccountLinkedStaticSignature.fromPartial(object.staticSignature)
: undefined;
message.siweSignature =
object.siweSignature !== undefined && object.siweSignature !== null
? AccountLinkedSIWESignature.fromPartial(object.siweSignature)
: undefined;
return message;
},
};
function createBaseAccountRevokedPublicKey() {
return { v1: undefined };
}
export const AccountRevokedPublicKey = {
encode(message, writer = _m0.Writer.create()) {
if (message.v1 !== undefined) {
AccountRevokedPublicKey_V1.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 = createBaseAccountRevokedPublicKey();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = AccountRevokedPublicKey_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? AccountRevokedPublicKey_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? AccountRevokedPublicKey_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountRevokedPublicKey();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? AccountRevokedPublicKey_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountRevokedPublicKey_V1() {
return { keyBytes: new Uint8Array(), staticSignature: undefined };
}
export const AccountRevokedPublicKey_V1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.keyBytes.length !== 0) {
writer.uint32(10).bytes(message.keyBytes);
}
if (message.staticSignature !== undefined) {
AccountRevokedStaticSignature.encode(message.staticSignature, 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 = createBaseAccountRevokedPublicKey_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.keyBytes = reader.bytes();
break;
case 2:
message.staticSignature = AccountRevokedStaticSignature.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(),
staticSignature: isSet(object.staticSignature)
? AccountRevokedStaticSignature.fromJSON(object.staticSignature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.keyBytes !== undefined &&
(obj.keyBytes = base64FromBytes(message.keyBytes !== undefined ? message.keyBytes : new Uint8Array()));
message.staticSignature !== undefined &&
(obj.staticSignature = message.staticSignature
? AccountRevokedStaticSignature.toJSON(message.staticSignature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountRevokedPublicKey_V1();
message.keyBytes = (_a = object.keyBytes) !== null && _a !== void 0 ? _a : new Uint8Array();
message.staticSignature =
object.staticSignature !== undefined && object.staticSignature !== null
? AccountRevokedStaticSignature.fromPartial(object.staticSignature)
: undefined;
return message;
},
};
function createBaseSignedPublicKey() {

@@ -437,70 +186,2 @@ return { keyBytes: new Uint8Array(), signature: undefined };

};
function createBaseSignedPublicKeyBundleV2() {
return { accountLinkedKey: undefined, preKey: undefined };
}
export const SignedPublicKeyBundleV2 = {
encode(message, writer = _m0.Writer.create()) {
if (message.accountLinkedKey !== undefined) {
AccountLinkedPublicKey.encode(message.accountLinkedKey, writer.uint32(10).fork()).ldelim();
}
if (message.preKey !== undefined) {
SignedPublicKey.encode(message.preKey, 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 = createBaseSignedPublicKeyBundleV2();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.accountLinkedKey = AccountLinkedPublicKey.decode(reader, reader.uint32());
break;
case 2:
message.preKey = SignedPublicKey.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
accountLinkedKey: isSet(object.accountLinkedKey)
? AccountLinkedPublicKey.fromJSON(object.accountLinkedKey)
: undefined,
preKey: isSet(object.preKey)
? SignedPublicKey.fromJSON(object.preKey)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.accountLinkedKey !== undefined &&
(obj.accountLinkedKey = message.accountLinkedKey
? AccountLinkedPublicKey.toJSON(message.accountLinkedKey)
: undefined);
message.preKey !== undefined &&
(obj.preKey = message.preKey
? SignedPublicKey.toJSON(message.preKey)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseSignedPublicKeyBundleV2();
message.accountLinkedKey =
object.accountLinkedKey !== undefined && object.accountLinkedKey !== null
? AccountLinkedPublicKey.fromPartial(object.accountLinkedKey)
: undefined;
message.preKey =
object.preKey !== undefined && object.preKey !== null
? SignedPublicKey.fromPartial(object.preKey)
: undefined;
return message;
},
};
function createBaseSignedPublicKeyBundle() {

@@ -507,0 +188,0 @@ return { identityKey: undefined, preKey: undefined };

@@ -188,347 +188,2 @@ /* eslint-disable */

};
function createBaseAccountLinkedStaticSignature() {
return { v1: undefined };
}
export const AccountLinkedStaticSignature = {
encode(message, writer = _m0.Writer.create()) {
if (message.v1 !== undefined) {
AccountLinkedStaticSignature_V1.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 = createBaseAccountLinkedStaticSignature();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = AccountLinkedStaticSignature_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? AccountLinkedStaticSignature_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? AccountLinkedStaticSignature_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountLinkedStaticSignature();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? AccountLinkedStaticSignature_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountLinkedStaticSignature_V1() {
return { text: new Uint8Array(), signature: undefined };
}
export const AccountLinkedStaticSignature_V1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.text.length !== 0) {
writer.uint32(10).bytes(message.text);
}
if (message.signature !== undefined) {
Signature.encode(message.signature, 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 = createBaseAccountLinkedStaticSignature_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.text = reader.bytes();
break;
case 2:
message.signature = Signature.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
text: isSet(object.text)
? bytesFromBase64(object.text)
: new Uint8Array(),
signature: isSet(object.signature)
? Signature.fromJSON(object.signature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.text !== undefined &&
(obj.text = base64FromBytes(message.text !== undefined ? message.text : new Uint8Array()));
message.signature !== undefined &&
(obj.signature = message.signature
? Signature.toJSON(message.signature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountLinkedStaticSignature_V1();
message.text = (_a = object.text) !== null && _a !== void 0 ? _a : new Uint8Array();
message.signature =
object.signature !== undefined && object.signature !== null
? Signature.fromPartial(object.signature)
: undefined;
return message;
},
};
function createBaseAccountRevokedStaticSignature() {
return { v1: undefined };
}
export const AccountRevokedStaticSignature = {
encode(message, writer = _m0.Writer.create()) {
if (message.v1 !== undefined) {
AccountRevokedStaticSignature_V1.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 = createBaseAccountRevokedStaticSignature();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = AccountRevokedStaticSignature_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? AccountRevokedStaticSignature_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? AccountRevokedStaticSignature_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountRevokedStaticSignature();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? AccountRevokedStaticSignature_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountRevokedStaticSignature_V1() {
return { text: new Uint8Array(), signature: undefined };
}
export const AccountRevokedStaticSignature_V1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.text.length !== 0) {
writer.uint32(10).bytes(message.text);
}
if (message.signature !== undefined) {
Signature.encode(message.signature, 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 = createBaseAccountRevokedStaticSignature_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.text = reader.bytes();
break;
case 2:
message.signature = Signature.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
text: isSet(object.text)
? bytesFromBase64(object.text)
: new Uint8Array(),
signature: isSet(object.signature)
? Signature.fromJSON(object.signature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.text !== undefined &&
(obj.text = base64FromBytes(message.text !== undefined ? message.text : new Uint8Array()));
message.signature !== undefined &&
(obj.signature = message.signature
? Signature.toJSON(message.signature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountRevokedStaticSignature_V1();
message.text = (_a = object.text) !== null && _a !== void 0 ? _a : new Uint8Array();
message.signature =
object.signature !== undefined && object.signature !== null
? Signature.fromPartial(object.signature)
: undefined;
return message;
},
};
function createBaseAccountLinkedSIWESignature() {
return { v1: undefined };
}
export const AccountLinkedSIWESignature = {
encode(message, writer = _m0.Writer.create()) {
if (message.v1 !== undefined) {
AccountLinkedSIWESignature_V1.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 = createBaseAccountLinkedSIWESignature();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.v1 = AccountLinkedSIWESignature_V1.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
v1: isSet(object.v1)
? AccountLinkedSIWESignature_V1.fromJSON(object.v1)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.v1 !== undefined &&
(obj.v1 = message.v1
? AccountLinkedSIWESignature_V1.toJSON(message.v1)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseAccountLinkedSIWESignature();
message.v1 =
object.v1 !== undefined && object.v1 !== null
? AccountLinkedSIWESignature_V1.fromPartial(object.v1)
: undefined;
return message;
},
};
function createBaseAccountLinkedSIWESignature_V1() {
return { text: new Uint8Array(), signature: undefined };
}
export const AccountLinkedSIWESignature_V1 = {
encode(message, writer = _m0.Writer.create()) {
if (message.text.length !== 0) {
writer.uint32(10).bytes(message.text);
}
if (message.signature !== undefined) {
Signature.encode(message.signature, 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 = createBaseAccountLinkedSIWESignature_V1();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.text = reader.bytes();
break;
case 2:
message.signature = Signature.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
text: isSet(object.text)
? bytesFromBase64(object.text)
: new Uint8Array(),
signature: isSet(object.signature)
? Signature.fromJSON(object.signature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.text !== undefined &&
(obj.text = base64FromBytes(message.text !== undefined ? message.text : new Uint8Array()));
message.signature !== undefined &&
(obj.signature = message.signature
? Signature.toJSON(message.signature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseAccountLinkedSIWESignature_V1();
message.text = (_a = object.text) !== null && _a !== void 0 ? _a : new Uint8Array();
message.signature =
object.signature !== undefined && object.signature !== null
? Signature.fromPartial(object.signature)
: undefined;
return message;
},
};
var globalThis = (() => {

@@ -535,0 +190,0 @@ if (typeof globalThis !== "undefined")

import Long from "long";
import { PublicKeyBundle } from "./public_key.pb";
import { Ciphertext } from "./ciphertext.pb";
import { ConversationReference } from "../keystore_api/v1/keystore.pb";
import _m0 from "protobufjs/minimal";

@@ -47,2 +48,18 @@ export declare const protobufPackage = "xmtp.message_contents";

}
/**
* DecodedMessage represents the decrypted message contents.
* DecodedMessage instances are not stored on the network, but
* may be serialized and stored by clients
*/
export interface DecodedMessage {
id: string;
messageVersion: string;
senderAddress: string;
recipientAddress?: string | undefined;
sentNs: Long;
contentTopic: string;
conversation: ConversationReference | undefined;
/** encapsulates EncodedContent */
contentBytes: Uint8Array;
}
export declare const MessageHeaderV1: {

@@ -985,2 +1002,206 @@ encode(message: MessageHeaderV1, writer?: _m0.Writer): _m0.Writer;

};
export declare const DecodedMessage: {
encode(message: DecodedMessage, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): DecodedMessage;
fromJSON(object: any): DecodedMessage;
toJSON(message: DecodedMessage): unknown;
fromPartial<I extends {
id?: string | undefined;
messageVersion?: string | undefined;
senderAddress?: string | undefined;
recipientAddress?: string | undefined;
sentNs?: string | number | Long | undefined;
contentTopic?: string | undefined;
conversation?: {
topic?: string | undefined;
peerAddress?: string | undefined;
createdNs?: string | number | Long | undefined;
context?: {
conversationId?: string | undefined;
metadata?: {
[x: string]: string | undefined;
} | undefined;
} | undefined;
} | undefined;
contentBytes?: Uint8Array | undefined;
} & {
id?: string | undefined;
messageVersion?: string | undefined;
senderAddress?: string | undefined;
recipientAddress?: string | undefined;
sentNs?: 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["sentNs"], keyof Long>]: never; }) | undefined;
contentTopic?: string | undefined;
conversation?: ({
topic?: string | undefined;
peerAddress?: string | undefined;
createdNs?: string | number | Long | undefined;
context?: {
conversationId?: string | undefined;
metadata?: {
[x: string]: string | undefined;
} | undefined;
} | undefined;
} & {
topic?: string | undefined;
peerAddress?: string | undefined;
createdNs?: 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_1 in Exclude<keyof I["conversation"]["createdNs"], keyof Long>]: never; }) | undefined;
context?: ({
conversationId?: string | undefined;
metadata?: {
[x: string]: string | undefined;
} | undefined;
} & {
conversationId?: string | undefined;
metadata?: ({
[x: string]: string | undefined;
} & {
[x: string]: string | undefined;
} & { [K_2 in Exclude<keyof I["conversation"]["context"]["metadata"], string | number>]: never; }) | undefined;
} & { [K_3 in Exclude<keyof I["conversation"]["context"], keyof import("./invitation.pb").InvitationV1_Context>]: never; }) | undefined;
} & { [K_4 in Exclude<keyof I["conversation"], keyof ConversationReference>]: never; }) | undefined;
contentBytes?: Uint8Array | undefined;
} & { [K_5 in Exclude<keyof I, keyof DecodedMessage>]: never; }>(object: I): DecodedMessage;
};
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;

@@ -987,0 +1208,0 @@ export declare 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 {} ? {

@@ -21,3 +21,2 @@ import Long from "long";

/**
* DEPRECATION IN PROGRESS
* ECDSA signature bytes and the recovery bit

@@ -34,46 +33,2 @@ * produced by xmtp-js::PublicKey.signWithWallet function, i.e.

}
/**
* A signature used to link a key to an account with a
* static text format, e.g.
* 'XMTP : Grant Send Permissions ...'
* The key bytes and role of the key must be validated against the
* signature text
*/
export interface AccountLinkedStaticSignature {
v1: AccountLinkedStaticSignature_V1 | undefined;
}
/** V1 */
export interface AccountLinkedStaticSignature_V1 {
text: Uint8Array;
signature: Signature | undefined;
}
/**
* A signature used to revoke a key from an account
* with a static text format, e.g.
* 'XMTP : Revoke Send Permissions ...'
* The key bytes and revocation action must be validated
* against the signature text
*/
export interface AccountRevokedStaticSignature {
v1: AccountRevokedStaticSignature_V1 | undefined;
}
/** V1 */
export interface AccountRevokedStaticSignature_V1 {
text: Uint8Array;
signature: Signature | undefined;
}
/**
* A signature used to link a key to an account, with
* sign-in with Ethereum format (EIP-4361).
* The key bytes and role of the key must be validated
* against the signature text
*/
export interface AccountLinkedSIWESignature {
v1: AccountLinkedSIWESignature_V1 | undefined;
}
/** V1 */
export interface AccountLinkedSIWESignature_V1 {
text: Uint8Array;
signature: Signature | undefined;
}
export declare const Signature: {

@@ -136,326 +91,2 @@ encode(message: Signature, writer?: _m0.Writer): _m0.Writer;

};
export declare const AccountLinkedStaticSignature: {
encode(message: AccountLinkedStaticSignature, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccountLinkedStaticSignature;
fromJSON(object: any): AccountLinkedStaticSignature;
toJSON(message: AccountLinkedStaticSignature): unknown;
fromPartial<I extends {
v1?: {
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} | undefined;
} & {
v1?: ({
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} & {
text?: Uint8Array | undefined;
signature?: ({
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} & {
ecdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K in Exclude<keyof I["v1"]["signature"]["ecdsaCompact"], keyof Signature_ECDSACompact>]: never; }) | undefined;
walletEcdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K_1 in Exclude<keyof I["v1"]["signature"]["walletEcdsaCompact"], keyof Signature_WalletECDSACompact>]: never; }) | undefined;
} & { [K_2 in Exclude<keyof I["v1"]["signature"], keyof Signature>]: never; }) | undefined;
} & { [K_3 in Exclude<keyof I["v1"], keyof AccountLinkedStaticSignature_V1>]: never; }) | undefined;
} & { [K_4 in Exclude<keyof I, "v1">]: never; }>(object: I): AccountLinkedStaticSignature;
};
export declare const AccountLinkedStaticSignature_V1: {
encode(message: AccountLinkedStaticSignature_V1, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccountLinkedStaticSignature_V1;
fromJSON(object: any): AccountLinkedStaticSignature_V1;
toJSON(message: AccountLinkedStaticSignature_V1): unknown;
fromPartial<I extends {
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} & {
text?: Uint8Array | undefined;
signature?: ({
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} & {
ecdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K in Exclude<keyof I["signature"]["ecdsaCompact"], keyof Signature_ECDSACompact>]: never; }) | undefined;
walletEcdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K_1 in Exclude<keyof I["signature"]["walletEcdsaCompact"], keyof Signature_WalletECDSACompact>]: never; }) | undefined;
} & { [K_2 in Exclude<keyof I["signature"], keyof Signature>]: never; }) | undefined;
} & { [K_3 in Exclude<keyof I, keyof AccountLinkedStaticSignature_V1>]: never; }>(object: I): AccountLinkedStaticSignature_V1;
};
export declare const AccountRevokedStaticSignature: {
encode(message: AccountRevokedStaticSignature, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccountRevokedStaticSignature;
fromJSON(object: any): AccountRevokedStaticSignature;
toJSON(message: AccountRevokedStaticSignature): unknown;
fromPartial<I extends {
v1?: {
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} | undefined;
} & {
v1?: ({
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} & {
text?: Uint8Array | undefined;
signature?: ({
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} & {
ecdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K in Exclude<keyof I["v1"]["signature"]["ecdsaCompact"], keyof Signature_ECDSACompact>]: never; }) | undefined;
walletEcdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K_1 in Exclude<keyof I["v1"]["signature"]["walletEcdsaCompact"], keyof Signature_WalletECDSACompact>]: never; }) | undefined;
} & { [K_2 in Exclude<keyof I["v1"]["signature"], keyof Signature>]: never; }) | undefined;
} & { [K_3 in Exclude<keyof I["v1"], keyof AccountRevokedStaticSignature_V1>]: never; }) | undefined;
} & { [K_4 in Exclude<keyof I, "v1">]: never; }>(object: I): AccountRevokedStaticSignature;
};
export declare const AccountRevokedStaticSignature_V1: {
encode(message: AccountRevokedStaticSignature_V1, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccountRevokedStaticSignature_V1;
fromJSON(object: any): AccountRevokedStaticSignature_V1;
toJSON(message: AccountRevokedStaticSignature_V1): unknown;
fromPartial<I extends {
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} & {
text?: Uint8Array | undefined;
signature?: ({
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} & {
ecdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K in Exclude<keyof I["signature"]["ecdsaCompact"], keyof Signature_ECDSACompact>]: never; }) | undefined;
walletEcdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K_1 in Exclude<keyof I["signature"]["walletEcdsaCompact"], keyof Signature_WalletECDSACompact>]: never; }) | undefined;
} & { [K_2 in Exclude<keyof I["signature"], keyof Signature>]: never; }) | undefined;
} & { [K_3 in Exclude<keyof I, keyof AccountRevokedStaticSignature_V1>]: never; }>(object: I): AccountRevokedStaticSignature_V1;
};
export declare const AccountLinkedSIWESignature: {
encode(message: AccountLinkedSIWESignature, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccountLinkedSIWESignature;
fromJSON(object: any): AccountLinkedSIWESignature;
toJSON(message: AccountLinkedSIWESignature): unknown;
fromPartial<I extends {
v1?: {
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} | undefined;
} & {
v1?: ({
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} & {
text?: Uint8Array | undefined;
signature?: ({
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} & {
ecdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K in Exclude<keyof I["v1"]["signature"]["ecdsaCompact"], keyof Signature_ECDSACompact>]: never; }) | undefined;
walletEcdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K_1 in Exclude<keyof I["v1"]["signature"]["walletEcdsaCompact"], keyof Signature_WalletECDSACompact>]: never; }) | undefined;
} & { [K_2 in Exclude<keyof I["v1"]["signature"], keyof Signature>]: never; }) | undefined;
} & { [K_3 in Exclude<keyof I["v1"], keyof AccountLinkedSIWESignature_V1>]: never; }) | undefined;
} & { [K_4 in Exclude<keyof I, "v1">]: never; }>(object: I): AccountLinkedSIWESignature;
};
export declare const AccountLinkedSIWESignature_V1: {
encode(message: AccountLinkedSIWESignature_V1, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccountLinkedSIWESignature_V1;
fromJSON(object: any): AccountLinkedSIWESignature_V1;
toJSON(message: AccountLinkedSIWESignature_V1): unknown;
fromPartial<I extends {
text?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} & {
text?: Uint8Array | undefined;
signature?: ({
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} & {
ecdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K in Exclude<keyof I["signature"]["ecdsaCompact"], keyof Signature_ECDSACompact>]: never; }) | undefined;
walletEcdsaCompact?: ({
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} & { [K_1 in Exclude<keyof I["signature"]["walletEcdsaCompact"], keyof Signature_WalletECDSACompact>]: never; }) | undefined;
} & { [K_2 in Exclude<keyof I["signature"], keyof Signature>]: never; }) | undefined;
} & { [K_3 in Exclude<keyof I, keyof AccountLinkedSIWESignature_V1>]: never; }>(object: I): AccountLinkedSIWESignature_V1;
};
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;

@@ -462,0 +93,0 @@ export declare 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 {} ? {

Sorry, the diff of this file is too big to display

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 not supported yet

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 not supported yet

Sorry, the diff of this file is too big to display

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 not supported yet

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 not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc