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 to 3.21.0

2

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

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

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.Ciphertext_Aes256gcmHkdfsha256 = exports.Ciphertext = exports.protobufPackage = void 0;
exports.SignedEciesCiphertext_Ecies = exports.SignedEciesCiphertext = exports.Ciphertext_Aes256gcmHkdfsha256 = exports.Ciphertext = exports.protobufPackage = void 0;
/* eslint-disable */
const long_1 = __importDefault(require("long"));
const signature_pb_1 = require("./signature.pb");
const minimal_1 = __importDefault(require("protobufjs/minimal"));

@@ -139,2 +140,152 @@ exports.protobufPackage = "xmtp.message_contents";

};
function createBaseSignedEciesCiphertext() {
return { eciesBytes: new Uint8Array(), signature: undefined };
}
exports.SignedEciesCiphertext = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.eciesBytes.length !== 0) {
writer.uint32(10).bytes(message.eciesBytes);
}
if (message.signature !== undefined) {
signature_pb_1.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 = createBaseSignedEciesCiphertext();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.eciesBytes = reader.bytes();
break;
case 2:
message.signature = signature_pb_1.Signature.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
eciesBytes: isSet(object.eciesBytes)
? bytesFromBase64(object.eciesBytes)
: new Uint8Array(),
signature: isSet(object.signature)
? signature_pb_1.Signature.fromJSON(object.signature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.eciesBytes !== undefined &&
(obj.eciesBytes = base64FromBytes(message.eciesBytes !== undefined ? message.eciesBytes : new Uint8Array()));
message.signature !== undefined &&
(obj.signature = message.signature
? signature_pb_1.Signature.toJSON(message.signature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseSignedEciesCiphertext();
message.eciesBytes = (_a = object.eciesBytes) !== null && _a !== void 0 ? _a : new Uint8Array();
message.signature =
object.signature !== undefined && object.signature !== null
? signature_pb_1.Signature.fromPartial(object.signature)
: undefined;
return message;
},
};
function createBaseSignedEciesCiphertext_Ecies() {
return {
ephemeralPublicKey: new Uint8Array(),
iv: new Uint8Array(),
mac: new Uint8Array(),
ciphertext: new Uint8Array(),
};
}
exports.SignedEciesCiphertext_Ecies = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.ephemeralPublicKey.length !== 0) {
writer.uint32(10).bytes(message.ephemeralPublicKey);
}
if (message.iv.length !== 0) {
writer.uint32(18).bytes(message.iv);
}
if (message.mac.length !== 0) {
writer.uint32(26).bytes(message.mac);
}
if (message.ciphertext.length !== 0) {
writer.uint32(34).bytes(message.ciphertext);
}
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 = createBaseSignedEciesCiphertext_Ecies();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.ephemeralPublicKey = reader.bytes();
break;
case 2:
message.iv = reader.bytes();
break;
case 3:
message.mac = reader.bytes();
break;
case 4:
message.ciphertext = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
ephemeralPublicKey: isSet(object.ephemeralPublicKey)
? bytesFromBase64(object.ephemeralPublicKey)
: new Uint8Array(),
iv: isSet(object.iv) ? bytesFromBase64(object.iv) : new Uint8Array(),
mac: isSet(object.mac) ? bytesFromBase64(object.mac) : new Uint8Array(),
ciphertext: isSet(object.ciphertext)
? bytesFromBase64(object.ciphertext)
: new Uint8Array(),
};
},
toJSON(message) {
const obj = {};
message.ephemeralPublicKey !== undefined &&
(obj.ephemeralPublicKey = base64FromBytes(message.ephemeralPublicKey !== undefined
? message.ephemeralPublicKey
: new Uint8Array()));
message.iv !== undefined &&
(obj.iv = base64FromBytes(message.iv !== undefined ? message.iv : new Uint8Array()));
message.mac !== undefined &&
(obj.mac = base64FromBytes(message.mac !== undefined ? message.mac : new Uint8Array()));
message.ciphertext !== undefined &&
(obj.ciphertext = base64FromBytes(message.ciphertext !== undefined ? message.ciphertext : new Uint8Array()));
return obj;
},
fromPartial(object) {
var _a, _b, _c, _d;
const message = createBaseSignedEciesCiphertext_Ecies();
message.ephemeralPublicKey = (_a = object.ephemeralPublicKey) !== null && _a !== void 0 ? _a : new Uint8Array();
message.iv = (_b = object.iv) !== null && _b !== void 0 ? _b : new Uint8Array();
message.mac = (_c = object.mac) !== null && _c !== void 0 ? _c : new Uint8Array();
message.ciphertext = (_d = object.ciphertext) !== null && _d !== void 0 ? _d : new Uint8Array();
return message;
},
};
var globalThis = (() => {

@@ -141,0 +292,0 @@ if (typeof globalThis !== "undefined")

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

@@ -132,2 +133,152 @@ export const protobufPackage = "xmtp.message_contents";

};
function createBaseSignedEciesCiphertext() {
return { eciesBytes: new Uint8Array(), signature: undefined };
}
export const SignedEciesCiphertext = {
encode(message, writer = _m0.Writer.create()) {
if (message.eciesBytes.length !== 0) {
writer.uint32(10).bytes(message.eciesBytes);
}
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 = createBaseSignedEciesCiphertext();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.eciesBytes = reader.bytes();
break;
case 2:
message.signature = Signature.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
eciesBytes: isSet(object.eciesBytes)
? bytesFromBase64(object.eciesBytes)
: new Uint8Array(),
signature: isSet(object.signature)
? Signature.fromJSON(object.signature)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.eciesBytes !== undefined &&
(obj.eciesBytes = base64FromBytes(message.eciesBytes !== undefined ? message.eciesBytes : new Uint8Array()));
message.signature !== undefined &&
(obj.signature = message.signature
? Signature.toJSON(message.signature)
: undefined);
return obj;
},
fromPartial(object) {
var _a;
const message = createBaseSignedEciesCiphertext();
message.eciesBytes = (_a = object.eciesBytes) !== null && _a !== void 0 ? _a : new Uint8Array();
message.signature =
object.signature !== undefined && object.signature !== null
? Signature.fromPartial(object.signature)
: undefined;
return message;
},
};
function createBaseSignedEciesCiphertext_Ecies() {
return {
ephemeralPublicKey: new Uint8Array(),
iv: new Uint8Array(),
mac: new Uint8Array(),
ciphertext: new Uint8Array(),
};
}
export const SignedEciesCiphertext_Ecies = {
encode(message, writer = _m0.Writer.create()) {
if (message.ephemeralPublicKey.length !== 0) {
writer.uint32(10).bytes(message.ephemeralPublicKey);
}
if (message.iv.length !== 0) {
writer.uint32(18).bytes(message.iv);
}
if (message.mac.length !== 0) {
writer.uint32(26).bytes(message.mac);
}
if (message.ciphertext.length !== 0) {
writer.uint32(34).bytes(message.ciphertext);
}
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 = createBaseSignedEciesCiphertext_Ecies();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.ephemeralPublicKey = reader.bytes();
break;
case 2:
message.iv = reader.bytes();
break;
case 3:
message.mac = reader.bytes();
break;
case 4:
message.ciphertext = reader.bytes();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
ephemeralPublicKey: isSet(object.ephemeralPublicKey)
? bytesFromBase64(object.ephemeralPublicKey)
: new Uint8Array(),
iv: isSet(object.iv) ? bytesFromBase64(object.iv) : new Uint8Array(),
mac: isSet(object.mac) ? bytesFromBase64(object.mac) : new Uint8Array(),
ciphertext: isSet(object.ciphertext)
? bytesFromBase64(object.ciphertext)
: new Uint8Array(),
};
},
toJSON(message) {
const obj = {};
message.ephemeralPublicKey !== undefined &&
(obj.ephemeralPublicKey = base64FromBytes(message.ephemeralPublicKey !== undefined
? message.ephemeralPublicKey
: new Uint8Array()));
message.iv !== undefined &&
(obj.iv = base64FromBytes(message.iv !== undefined ? message.iv : new Uint8Array()));
message.mac !== undefined &&
(obj.mac = base64FromBytes(message.mac !== undefined ? message.mac : new Uint8Array()));
message.ciphertext !== undefined &&
(obj.ciphertext = base64FromBytes(message.ciphertext !== undefined ? message.ciphertext : new Uint8Array()));
return obj;
},
fromPartial(object) {
var _a, _b, _c, _d;
const message = createBaseSignedEciesCiphertext_Ecies();
message.ephemeralPublicKey = (_a = object.ephemeralPublicKey) !== null && _a !== void 0 ? _a : new Uint8Array();
message.iv = (_b = object.iv) !== null && _b !== void 0 ? _b : new Uint8Array();
message.mac = (_c = object.mac) !== null && _c !== void 0 ? _c : new Uint8Array();
message.ciphertext = (_d = object.ciphertext) !== null && _d !== void 0 ? _d : new Uint8Array();
return message;
},
};
var globalThis = (() => {

@@ -134,0 +285,0 @@ if (typeof globalThis !== "undefined")

import Long from "long";
import { Signature } from "./signature.pb";
import _m0 from "protobufjs/minimal";

@@ -26,2 +27,20 @@ export declare const protobufPackage = "xmtp.message_contents";

}
/** SignedEciesCiphertext represents an ECIES encrypted payload and a signature */
export interface SignedEciesCiphertext {
/** serialized Ecies message */
eciesBytes: Uint8Array;
/** signature of sha256(ecies_bytes) signed with the IdentityKey */
signature: Signature | undefined;
}
/** Ecies is ciphertext encrypted using ECIES with a MAC */
export interface SignedEciesCiphertext_Ecies {
/** 65 bytes */
ephemeralPublicKey: Uint8Array;
/** 16 bytes */
iv: Uint8Array;
/** 32 bytes */
mac: Uint8Array;
/** encrypted payload with block size of 16 */
ciphertext: Uint8Array;
}
export declare const Ciphertext: {

@@ -65,2 +84,65 @@ encode(message: Ciphertext, writer?: _m0.Writer): _m0.Writer;

};
export declare const SignedEciesCiphertext: {
encode(message: SignedEciesCiphertext, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SignedEciesCiphertext;
fromJSON(object: any): SignedEciesCiphertext;
toJSON(message: SignedEciesCiphertext): unknown;
fromPartial<I extends {
eciesBytes?: Uint8Array | undefined;
signature?: {
ecdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
walletEcdsaCompact?: {
bytes?: Uint8Array | undefined;
recovery?: number | undefined;
} | undefined;
} | undefined;
} & {
eciesBytes?: 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 import("./signature.pb").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 import("./signature.pb").Signature_WalletECDSACompact>]: never; }) | undefined;
} & { [K_2 in Exclude<keyof I["signature"], keyof Signature>]: never; }) | undefined;
} & { [K_3 in Exclude<keyof I, keyof SignedEciesCiphertext>]: never; }>(object: I): SignedEciesCiphertext;
};
export declare const SignedEciesCiphertext_Ecies: {
encode(message: SignedEciesCiphertext_Ecies, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SignedEciesCiphertext_Ecies;
fromJSON(object: any): SignedEciesCiphertext_Ecies;
toJSON(message: SignedEciesCiphertext_Ecies): unknown;
fromPartial<I extends {
ephemeralPublicKey?: Uint8Array | undefined;
iv?: Uint8Array | undefined;
mac?: Uint8Array | undefined;
ciphertext?: Uint8Array | undefined;
} & {
ephemeralPublicKey?: Uint8Array | undefined;
iv?: Uint8Array | undefined;
mac?: Uint8Array | undefined;
ciphertext?: Uint8Array | undefined;
} & { [K in Exclude<keyof I, keyof SignedEciesCiphertext_Ecies>]: never; }>(object: I): SignedEciesCiphertext_Ecies;
};
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;

@@ -67,0 +149,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 not supported yet

Sorry, the diff of this file is not supported yet

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