mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
update libsignal + no dependency on proto files + no native deps
This commit is contained in:
1697
WASignalGroup/GroupProtocol.js
Normal file
1697
WASignalGroup/GroupProtocol.js
Normal file
File diff suppressed because it is too large
Load Diff
1
WASignalGroup/generate-proto.sh
Normal file
1
WASignalGroup/generate-proto.sh
Normal file
@@ -0,0 +1 @@
|
||||
yarn pbjs -t static-module -w commonjs -o ./WASignalGroup/GroupProtocol.js ./WASignalGroup/group.proto
|
||||
@@ -13,22 +13,23 @@ message SenderKeyMessage {
|
||||
optional bytes signingKey = 4;
|
||||
}
|
||||
|
||||
message SenderChainKey {
|
||||
optional uint32 iteration = 1;
|
||||
optional bytes seed = 2;
|
||||
}
|
||||
|
||||
message SenderMessageKey {
|
||||
optional uint32 iteration = 1;
|
||||
optional bytes seed = 2;
|
||||
}
|
||||
|
||||
message SenderSigningKey {
|
||||
optional bytes public = 1;
|
||||
optional bytes private = 2;
|
||||
}
|
||||
|
||||
message SenderKeyStateStructure {
|
||||
message SenderChainKey {
|
||||
optional uint32 iteration = 1;
|
||||
optional bytes seed = 2;
|
||||
}
|
||||
|
||||
message SenderMessageKey {
|
||||
optional uint32 iteration = 1;
|
||||
optional bytes seed = 2;
|
||||
}
|
||||
|
||||
message SenderSigningKey {
|
||||
optional bytes public = 1;
|
||||
optional bytes private = 2;
|
||||
}
|
||||
|
||||
|
||||
optional uint32 senderKeyId = 1;
|
||||
optional SenderChainKey senderChainKey = 2;
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
const path = require('path');
|
||||
const protobuf = require('protobufjs');
|
||||
const { groupproto } = require('./GroupProtocol')
|
||||
|
||||
const protodir = path.resolve(__dirname);
|
||||
const group = protobuf.loadSync(path.join(protodir, 'group.proto')).lookup('groupproto');
|
||||
|
||||
module.exports = {
|
||||
SenderKeyDistributionMessage: group.lookup('SenderKeyDistributionMessage'),
|
||||
SenderKeyMessage: group.lookup('SenderKeyMessage'),
|
||||
SenderKeyStateStructure: group.lookup('SenderKeyStateStructure'),
|
||||
SenderChainKey: group.lookup('SenderChainKey'),
|
||||
SenderSigningKey: group.lookup('SenderSigningKey'),
|
||||
};
|
||||
module.exports = groupproto
|
||||
Reference in New Issue
Block a user