Wrap C++ Key object inside "bitcoin" namespace.
This commit is contained in:
parent
7da3c3b969
commit
7e23e5ba0e
|
@ -53,6 +53,8 @@ int static inline EC_KEY_regenerate_key(EC_KEY *eckey, const BIGNUM *priv_key)
|
|||
return(ok);
|
||||
}
|
||||
|
||||
namespace bitcoin {
|
||||
|
||||
void Key::Generate()
|
||||
{
|
||||
if (!EC_KEY_generate_key(ec)) {
|
||||
|
@ -562,10 +564,12 @@ Key::SignSync(const Arguments& args)
|
|||
|
||||
Persistent<FunctionTemplate> Key::s_ct;
|
||||
|
||||
}; // namespace bitcoin
|
||||
|
||||
extern "C" void
|
||||
init (Handle<Object> target)
|
||||
{
|
||||
Key::Init(target);
|
||||
bitcoin::Key::Init(target);
|
||||
}
|
||||
|
||||
NODE_MODULE(native, init)
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
using namespace v8;
|
||||
using namespace node;
|
||||
|
||||
namespace bitcoin {
|
||||
|
||||
class Key : ObjectWrap
|
||||
{
|
||||
private:
|
||||
|
@ -90,4 +92,6 @@ public:
|
|||
SignSync(const Arguments& args);
|
||||
};
|
||||
|
||||
}; // namespace bitcoin
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue