Add register function for IPNS

This commit is contained in:
Anthony Laibe 2018-07-30 12:47:04 +01:00
parent c8bed200c8
commit 33e15a3dbe

View File

@ -46,4 +46,11 @@ Names.registerSubDomain = function(name, address, callback) {
return this.currentNameSystems.registerSubDomain(name, address, callback);
};
Names.register = function(name, callback) {
if (!this.currentNameSystems) {
throw new Error(this.noProviderError);
}
return this.currentNameSystems.register(name, callback);
};
export default Names;