File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,19 @@ Handle<Value> except(const char* msg) {
1919 return ThrowException (Exception::Error (String::New (msg)));
2020}
2121
22+ blobdata uint64be_to_blob (uint64_t num) {
23+ blobdata res = " " ;
24+ res[0 ] = num >> 56 & 0xff ;
25+ res[1 ] = num >> 48 & 0xff ;
26+ res[2 ] = num >> 40 & 0xff ;
27+ res[3 ] = num >> 32 & 0xff ;
28+ res[4 ] = num >> 24 & 0xff ;
29+ res[5 ] = num >> 16 & 0xff ;
30+ res[6 ] = num >> 8 & 0xff ;
31+ res[7 ] = num & 0xff ;
32+ return res;
33+ }
34+
2235Handle<Value> convert_blob (const Arguments& args) {
2336 HandleScope scope;
2437
@@ -65,6 +78,8 @@ Handle<Value> address_decode(const Arguments& args) {
6578
6679 tools::base58::decode_addr (input, prefix, output);
6780
81+ output = uint64be_to_blob (prefix) + output;
82+
6883 Buffer* buff = Buffer::New (output.data (), output.size ());
6984 return scope.Close (buff->handle_ );
7085}
You can’t perform that action at this time.
0 commit comments