godprotocol 1.0.7991 → 1.1.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.
Files changed (88) hide show
  1. package/Executables/callables.js +131 -0
  2. package/Executables/executables.js +230 -0
  3. package/Executables/functions/adminstrator/adm_register.js +29 -0
  4. package/Executables/functions/adminstrator/native_components.js +10 -0
  5. package/Executables/functions/adminstrator/query_selectors.js +10 -0
  6. package/Executables/functions/adminstrator/render.js +24 -0
  7. package/Executables/functions/array_register.js +161 -0
  8. package/Executables/functions/assign.js +19 -0
  9. package/Executables/functions/display.js +55 -0
  10. package/Executables/functions/folder.js +95 -0
  11. package/Executables/functions/folder_register.js +87 -0
  12. package/Executables/functions/importcheck.js +13 -0
  13. package/Executables/functions/indices.js +56 -0
  14. package/Executables/functions/len.js +22 -0
  15. package/Executables/functions/methods/array.js +272 -0
  16. package/Executables/functions/methods/string.js +197 -0
  17. package/Executables/functions/methods/twain.js +148 -0
  18. package/Executables/functions/op.js +15 -0
  19. package/Executables/functions/price_register.js +30 -0
  20. package/Executables/functions/pricing.js +26 -0
  21. package/Executables/functions/servers/account.js +81 -0
  22. package/Executables/functions/servers/account_register.js +56 -0
  23. package/Executables/functions/servers/block.js +21 -0
  24. package/Executables/functions/servers/block_register.js +18 -0
  25. package/Executables/functions/servers/chain.js +42 -0
  26. package/Executables/functions/servers/chain_register.js +28 -0
  27. package/Executables/functions/set_error_catch.js +34 -0
  28. package/Executables/functions/string_register.js +130 -0
  29. package/Executables/functions/twain_register.js +56 -0
  30. package/Executables/functions/typecast.js +43 -0
  31. package/Executables/functions/utils.js +9 -0
  32. package/Executables/stack.js +53 -0
  33. package/Index.js +2 -7
  34. package/Loader_sequence/main.js +535 -119
  35. package/Loader_sequence/repository.js +33 -0
  36. package/Objects/Account.js +220 -54
  37. package/Objects/Block.js +46 -16
  38. package/Objects/Blockweb.js +14 -0
  39. package/Objects/Chain.js +163 -16
  40. package/Objects/Fee.js +33 -0
  41. package/Objects/Filesystem.js +100 -26
  42. package/Objects/Frame.js +10 -3
  43. package/Objects/Manager.js +272 -46
  44. package/Objects/Opcodes.js +60 -10
  45. package/Objects/Oracle.js +90 -5
  46. package/Objects/Protocol.js +5 -0
  47. package/Objects/Virtual_machine.js +145 -53
  48. package/Trinity.js +20 -0
  49. package/callables.js +172 -0
  50. package/framer.js +111 -52
  51. package/opcodes/add.js +6 -6
  52. package/opcodes/indices.js +82 -0
  53. package/opcodes/jmp.js +12 -11
  54. package/opcodes/std.js +7 -2
  55. package/opcodes.js +72 -14
  56. package/package.json +6 -5
  57. package/readme.md +1 -1
  58. package/starter_scripts/constants.seq +11 -0
  59. package/utils/create_server.js +34 -27
  60. package/utils/hash.js +2 -2
  61. package/utils/logger.js +79 -0
  62. package/utils/services.js +5 -3
  63. package/utils/type_coersion.js +3 -0
  64. package/utils/vm_utils.js +292 -0
  65. package/.babelrc +0 -3
  66. package/build/Account.js +0 -162
  67. package/build/Block.js +0 -65
  68. package/build/Blockweb.js +0 -36
  69. package/build/Chain.js +0 -119
  70. package/build/Explorer.js +0 -47
  71. package/build/Filesystem.js +0 -127
  72. package/build/Frame.js +0 -52
  73. package/build/Index.js +0 -15
  74. package/build/Manager.js +0 -99
  75. package/build/Opcodes.js +0 -39
  76. package/build/Oracle.js +0 -42
  77. package/build/Virtual_machine.js +0 -128
  78. package/build/add.js +0 -41
  79. package/build/create_server.js +0 -119
  80. package/build/framer.js +0 -57
  81. package/build/functions.js +0 -82
  82. package/build/hash.js +0 -14
  83. package/build/jmp.js +0 -19
  84. package/build/main.js +0 -283
  85. package/build/opcodes.js +0 -42
  86. package/build/privacy.js +0 -27
  87. package/build/services.js +0 -50
  88. package/build/std.js +0 -11
package/build/privacy.js DELETED
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var EC = require("elliptic").ec;
8
- var ec = new EC("secp256k1"); // You can use other curves like 'ed25519' based on your requirements
9
-
10
- /**
11
- * Function to validate a signature using elliptic
12
- * @param {string} public_key - The public key of the user
13
- * @param {string} message - The original message that was signed
14
- * @param {string} signature - The signature to be validated
15
- * @returns {boolean} - True if the signature is valid, false otherwise
16
- */
17
- var validate_signature = function validate_signature(public_key, message, signature) {
18
- var key = ec.keyFromPublic(public_key, "hex");
19
- var hash = ec.hash().update(message).digest("hex");
20
- var sig = {
21
- r: signature.slice(0, 64),
22
- s: signature.slice(64, 128)
23
- };
24
- return key.verify(hash, sig);
25
- };
26
- var _default = validate_signature;
27
- exports["default"] = _default;
package/build/services.js DELETED
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.post_request = void 0;
7
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
11
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
12
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
- var http = require("http");
14
- var post_request = function post_request(payload, cb) {
15
- // let options = {
16
- // hostname: 'example.com',
17
- // port: 80,
18
- // path: '/api/users',
19
- // method: 'POST',
20
- // headers: {
21
- // 'Content-Type': 'application/json',
22
- // 'Content-Length': Buffer.byteLength(postData),
23
- // },
24
- // };
25
-
26
- var req = http.request(_objectSpread(_objectSpread({}, payload.options), {}, {
27
- method: "POST",
28
- headers: {
29
- "Content-Type": "application/json",
30
- "Content-Length": Buffer.byteLength(payload.data)
31
- }
32
- }), function (res) {
33
- var data = "";
34
- res.on("data", function (chunk) {
35
- data += chunk;
36
- cb && cb(chunk);
37
- });
38
- res.on("end", function () {
39
- cb && cb(data);
40
- // console.log("Response:", data);
41
- });
42
- });
43
- req.on("error", function (e) {
44
- cb(e.message);
45
- console.error("Problem with request: ".concat(e.message));
46
- });
47
- req.write(payload.data);
48
- req.end();
49
- };
50
- exports.post_request = post_request;
package/build/std.js DELETED
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.stdout = void 0;
7
- var stdout = function stdout(args) {
8
- if (!args) return;
9
- for (var v in args) console.log(args[v]);
10
- };
11
- exports.stdout = stdout;