@eosrio/node-abieos 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/abieos.node +0 -0
- package/lib/abieos.d.ts +19 -0
- package/lib/abieos.d.ts.map +1 -0
- package/lib/abieos.js +100 -0
- package/lib/abieos.ts +107 -0
- package/package.json +13 -8
- package/.idea/modules.xml +0 -8
- package/.idea/node-abieos.iml +0 -12
- package/.idea/vcs.xml +0 -9
- package/.idea/workspace.xml +0 -66
- package/CMakeLists.txt +0 -35
- package/abieos.d.ts +0 -21
- package/abieos.js +0 -59
- package/eosio.json +0 -1596
- package/include/.clang-format +0 -76
- package/include/eosio/abi.hpp +0 -393
- package/include/eosio/asset.hpp +0 -458
- package/include/eosio/bytes.hpp +0 -27
- package/include/eosio/chain_conversions.hpp +0 -450
- package/include/eosio/chain_types.hpp +0 -14
- package/include/eosio/check.hpp +0 -178
- package/include/eosio/convert.hpp +0 -95
- package/include/eosio/crypto.hpp +0 -148
- package/include/eosio/eosio_outcome.hpp +0 -41
- package/include/eosio/fixed_bytes.hpp +0 -250
- package/include/eosio/float.hpp +0 -35
- package/include/eosio/for_each_field.hpp +0 -48
- package/include/eosio/fpconv.c +0 -336
- package/include/eosio/fpconv.h +0 -41
- package/include/eosio/fpconv.license +0 -23
- package/include/eosio/from_bin.hpp +0 -272
- package/include/eosio/from_json.hpp +0 -749
- package/include/eosio/from_string.hpp +0 -28
- package/include/eosio/map_macro.h +0 -64
- package/include/eosio/murmur.hpp +0 -55
- package/include/eosio/name.hpp +0 -178
- package/include/eosio/opaque.hpp +0 -184
- package/include/eosio/operators.hpp +0 -71
- package/include/eosio/powers.h +0 -76
- package/include/eosio/reflection.hpp +0 -61
- package/include/eosio/ship_protocol.hpp +0 -971
- package/include/eosio/stream.hpp +0 -235
- package/include/eosio/symbol.hpp +0 -300
- package/include/eosio/time.hpp +0 -264
- package/include/eosio/to_bin.hpp +0 -189
- package/include/eosio/to_json.hpp +0 -334
- package/include/eosio/to_key.hpp +0 -305
- package/include/eosio/types.hpp +0 -103
- package/include/eosio/varint.hpp +0 -452
- package/include/outcome-basic.hpp +0 -6836
- package/include/rapidjson/allocators.h +0 -284
- package/include/rapidjson/cursorstreamwrapper.h +0 -78
- package/include/rapidjson/document.h +0 -2646
- package/include/rapidjson/encodedstream.h +0 -299
- package/include/rapidjson/encodings.h +0 -716
- package/include/rapidjson/error/en.h +0 -74
- package/include/rapidjson/error/error.h +0 -161
- package/include/rapidjson/filereadstream.h +0 -99
- package/include/rapidjson/filewritestream.h +0 -104
- package/include/rapidjson/fwd.h +0 -151
- package/include/rapidjson/internal/biginteger.h +0 -290
- package/include/rapidjson/internal/diyfp.h +0 -271
- package/include/rapidjson/internal/dtoa.h +0 -245
- package/include/rapidjson/internal/ieee754.h +0 -78
- package/include/rapidjson/internal/itoa.h +0 -308
- package/include/rapidjson/internal/meta.h +0 -186
- package/include/rapidjson/internal/pow10.h +0 -55
- package/include/rapidjson/internal/regex.h +0 -732
- package/include/rapidjson/internal/stack.h +0 -231
- package/include/rapidjson/internal/strfunc.h +0 -69
- package/include/rapidjson/internal/strtod.h +0 -290
- package/include/rapidjson/internal/swap.h +0 -46
- package/include/rapidjson/istreamwrapper.h +0 -113
- package/include/rapidjson/memorybuffer.h +0 -70
- package/include/rapidjson/memorystream.h +0 -71
- package/include/rapidjson/msinttypes/inttypes.h +0 -316
- package/include/rapidjson/msinttypes/stdint.h +0 -300
- package/include/rapidjson/ostreamwrapper.h +0 -81
- package/include/rapidjson/pointer.h +0 -1357
- package/include/rapidjson/prettywriter.h +0 -277
- package/include/rapidjson/rapidjson.h +0 -654
- package/include/rapidjson/reader.h +0 -2230
- package/include/rapidjson/schema.h +0 -2494
- package/include/rapidjson/stream.h +0 -223
- package/include/rapidjson/stringbuffer.h +0 -121
- package/include/rapidjson/writer.h +0 -710
- package/src/abi.cpp +0 -274
- package/src/abieos.cpp +0 -334
- package/src/abieos.h +0 -91
- package/src/abieos.hpp +0 -1011
- package/src/abieos_exception.hpp +0 -89
- package/src/abieos_numeric.hpp +0 -94
- package/src/abieos_ripemd160.hpp +0 -417
- package/src/crypto.cpp +0 -215
- package/src/main.cpp +0 -242
- package/src/ship.abi.cpp +0 -695
- package/tools/CMakeLists.txt +0 -9
- package/tools/name.cpp +0 -86
package/tools/CMakeLists.txt
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# copyright defined in abieos/LICENSE.txt
|
|
2
|
-
|
|
3
|
-
find_package(Threads)
|
|
4
|
-
|
|
5
|
-
add_executable(name name.cpp)
|
|
6
|
-
target_link_libraries(name abieos ${CMAKE_THREAD_LIBS_INIT})
|
|
7
|
-
|
|
8
|
-
add_custom_command( TARGET name POST_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE:name> ${CMAKE_CURRENT_BINARY_DIR}/name2num )
|
|
9
|
-
add_custom_command( TARGET name POST_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE:name> ${CMAKE_CURRENT_BINARY_DIR}/num2name )
|
package/tools/name.cpp
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
#include <eosio/name.hpp>
|
|
2
|
-
#include <iostream>
|
|
3
|
-
#include <string>
|
|
4
|
-
#include <string_view>
|
|
5
|
-
#include <vector>
|
|
6
|
-
|
|
7
|
-
bool handle_one(const std::string& s, bool reverse) {
|
|
8
|
-
try {
|
|
9
|
-
if (reverse) {
|
|
10
|
-
std::cout << eosio::name(s).value << std::endl;
|
|
11
|
-
return true;
|
|
12
|
-
} else {
|
|
13
|
-
std::size_t pos;
|
|
14
|
-
std::uint64_t value = std::stoull(s, &pos, 0);
|
|
15
|
-
if (pos == s.size()) {
|
|
16
|
-
std::cout << eosio::name(value).to_string() << std::endl;
|
|
17
|
-
} else {
|
|
18
|
-
std::cerr << "Invalid name value: " << s << std::endl;
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
} catch (std::exception& e) {
|
|
23
|
-
std::cerr << e.what() << std::endl;
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
int usage(bool reverse) {
|
|
30
|
-
if (reverse) {
|
|
31
|
-
std::cerr << "Usage: name2num [-x|--hex] [-d|--dec] [-r|--reverse] [names...]" << std::endl;
|
|
32
|
-
} else {
|
|
33
|
-
std::cerr << "Usage: num2name [-r|--reverse] [values...]" << std::endl;
|
|
34
|
-
}
|
|
35
|
-
return 2;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
int main(int argc, const char** argv) {
|
|
39
|
-
if (argc == 0)
|
|
40
|
-
return 1;
|
|
41
|
-
bool reverse = false;
|
|
42
|
-
bool hex = true;
|
|
43
|
-
int result = 0;
|
|
44
|
-
if (std::string_view(argv[0]).find("name2num") != std::string::npos) {
|
|
45
|
-
reverse = true;
|
|
46
|
-
}
|
|
47
|
-
std::vector<std::string> args;
|
|
48
|
-
for (int i = 1; i < argc; ++i) {
|
|
49
|
-
std::string_view a(argv[i]);
|
|
50
|
-
if (a[0] == '-') {
|
|
51
|
-
if (a == "--help") {
|
|
52
|
-
return usage(reverse);
|
|
53
|
-
} else if (a == "--reverse") {
|
|
54
|
-
reverse = !reverse;
|
|
55
|
-
} else if (a == "--hex") {
|
|
56
|
-
hex = true;
|
|
57
|
-
} else if (a == "--dec") {
|
|
58
|
-
hex = false;
|
|
59
|
-
} else {
|
|
60
|
-
for (auto ch : a.substr(1)) {
|
|
61
|
-
switch (ch) {
|
|
62
|
-
case 'x': hex = true; break;
|
|
63
|
-
case 'd': hex = false; break;
|
|
64
|
-
case 'r': reverse = !reverse; break;
|
|
65
|
-
case 'h': return usage(reverse);
|
|
66
|
-
default: std::cerr << "Unknown argument: " << a << std::endl; return 2;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
} else {
|
|
71
|
-
args.emplace_back(a);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (reverse) {
|
|
75
|
-
std::cout << std::showbase;
|
|
76
|
-
if (hex)
|
|
77
|
-
std::cout << std::hex;
|
|
78
|
-
}
|
|
79
|
-
if (args.empty()) {
|
|
80
|
-
std::string s;
|
|
81
|
-
while (std::getline(std::cin, s)) { result |= !handle_one(s, reverse); }
|
|
82
|
-
} else {
|
|
83
|
-
for (const std::string& s : args) { result |= !handle_one(s, reverse); }
|
|
84
|
-
}
|
|
85
|
-
return result;
|
|
86
|
-
}
|