mirror of https://github.com/status-im/web3.js.git
add shh_confirmMessagesProcessed
This commit is contained in:
parent
948d2d8ba9
commit
ff09ce57e9
|
@ -5830,6 +5830,11 @@ var methods = function () {
|
||||||
name: 'requestMessages',
|
name: 'requestMessages',
|
||||||
call: 'shhext_requestMessages',
|
call: 'shhext_requestMessages',
|
||||||
params: 1
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'confirmMessagesProcessed',
|
||||||
|
call: 'shhext_confirmMessagesProcessed',
|
||||||
|
params: 1
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5830,6 +5830,11 @@ var methods = function () {
|
||||||
name: 'requestMessages',
|
name: 'requestMessages',
|
||||||
call: 'shhext_requestMessages',
|
call: 'shhext_requestMessages',
|
||||||
params: 1
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'confirmMessagesProcessed',
|
||||||
|
call: 'shhext_confirmMessagesProcessed',
|
||||||
|
params: 1
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -147,6 +147,11 @@ var methods = function () {
|
||||||
name: 'requestMessages',
|
name: 'requestMessages',
|
||||||
call: 'shhext_requestMessages',
|
call: 'shhext_requestMessages',
|
||||||
params: 1
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'confirmMessagesProcessed',
|
||||||
|
call: 'shhext_confirmMessagesProcessed',
|
||||||
|
params: 1
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,144 @@
|
||||||
|
/*
|
||||||
|
This file is part of web3.js.
|
||||||
|
|
||||||
|
web3.js is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
web3.js is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/** @file shh.js
|
||||||
|
* @authors:
|
||||||
|
* Fabian Vogelsteller <fabian@ethereum.org>
|
||||||
|
* Marek Kotewicz <marek@ethcore.io>
|
||||||
|
* @date 2017
|
||||||
|
*/
|
||||||
|
|
||||||
|
var Method = require('../method');
|
||||||
|
var Filter = require('../filter');
|
||||||
|
var watches = require('./watches');
|
||||||
|
|
||||||
|
var Shh = function (web3) {
|
||||||
|
this._requestManager = web3._requestManager;
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
methods().forEach(function(method) {
|
||||||
|
method.attachToObject(self);
|
||||||
|
method.setRequestManager(self._requestManager);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
Shh.prototype.newMessageFilter = function (options, callback, filterCreationErrorCallback) {
|
||||||
|
return new Filter(options, 'shh', this._requestManager, watches.shh(), null, callback, filterCreationErrorCallback);
|
||||||
|
};
|
||||||
|
|
||||||
|
var methods = function () {
|
||||||
|
|
||||||
|
return [
|
||||||
|
new Method({
|
||||||
|
name: 'version',
|
||||||
|
call: 'shh_version',
|
||||||
|
params: 0
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'info',
|
||||||
|
call: 'shh_info',
|
||||||
|
params: 0
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'setMaxMessageSize',
|
||||||
|
call: 'shh_setMaxMessageSize',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'setMinPoW',
|
||||||
|
call: 'shh_setMinPoW',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'markTrustedPeer',
|
||||||
|
call: 'shh_markTrustedPeer',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'newKeyPair',
|
||||||
|
call: 'shh_newKeyPair',
|
||||||
|
params: 0
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'addPrivateKey',
|
||||||
|
call: 'shh_addPrivateKey',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'deleteKeyPair',
|
||||||
|
call: 'shh_deleteKeyPair',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'hasKeyPair',
|
||||||
|
call: 'shh_hasKeyPair',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'getPublicKey',
|
||||||
|
call: 'shh_getPublicKey',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'getPrivateKey',
|
||||||
|
call: 'shh_getPrivateKey',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'newSymKey',
|
||||||
|
call: 'shh_newSymKey',
|
||||||
|
params: 0
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'addSymKey',
|
||||||
|
call: 'shh_addSymKey',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'generateSymKeyFromPassword',
|
||||||
|
call: 'shh_generateSymKeyFromPassword',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'hasSymKey',
|
||||||
|
call: 'shh_hasSymKey',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'getSymKey',
|
||||||
|
call: 'shh_getSymKey',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
new Method({
|
||||||
|
name: 'deleteSymKey',
|
||||||
|
call: 'shh_deleteSymKey',
|
||||||
|
params: 1
|
||||||
|
}),
|
||||||
|
|
||||||
|
// subscribe and unsubscribe missing
|
||||||
|
|
||||||
|
new Method({
|
||||||
|
name: 'post',
|
||||||
|
call: 'shh_post',
|
||||||
|
params: 1,
|
||||||
|
inputFormatter: [null]
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = Shh;
|
||||||
|
|
Loading…
Reference in New Issue