Files
Signal-Desktop/libtextsecure/protocol_wrapper.js
2016-05-15 17:04:13 -07:00

25 lines
735 B
JavaScript

/*
* vim: ts=4:sw=4:expandtab
*/
;(function() {
'use strict';
window.textsecure = window.textsecure || {};
window.textsecure.storage = window.textsecure.storage || {};
textsecure.storage.protocol = new SignalProtocolStore();
var protocolInstance = libsignal.protocol(textsecure.storage.protocol);
window.textsecure = window.textsecure || {};
window.textsecure.protocol_wrapper = {
startWorker: function(url) {
protocolInstance.startWorker(url);
},
stopWorker: function() {
protocolInstance.stopWorker();
},
createIdentityKeyRecvSocket: function() {
return protocolInstance.createIdentityKeyRecvSocket();
}
};
})();