@kynesyslabs/demosdk 1.1.8 → 1.3.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 (131) hide show
  1. package/build/encryption/Cryptography.d.ts +6 -1
  2. package/build/encryption/Cryptography.js +16 -3
  3. package/build/encryption/Cryptography.js.map +1 -1
  4. package/build/encryption/PQC/index.d.ts +0 -1
  5. package/build/encryption/zK/primer.js +1 -1
  6. package/build/encryption/zK/primer.js.map +1 -1
  7. package/build/index.d.ts +7 -7
  8. package/build/index.js +2 -2
  9. package/build/index.js.map +1 -1
  10. package/build/multichain/core/evm.js +1 -0
  11. package/build/multichain/core/evm.js.map +1 -1
  12. package/build/multichain/core/ibc.js +0 -2
  13. package/build/multichain/core/ibc.js.map +1 -1
  14. package/build/multichain/core/index.d.ts +1 -0
  15. package/build/multichain/core/index.js +3 -1
  16. package/build/multichain/core/index.js.map +1 -1
  17. package/build/multichain/core/near.d.ts +47 -0
  18. package/build/multichain/core/near.js +154 -0
  19. package/build/multichain/core/near.js.map +1 -0
  20. package/build/multichain/core/solana.d.ts +0 -1
  21. package/build/multichain/core/ton.d.ts +0 -1
  22. package/build/multichain/core/types/defaultChain.d.ts +1 -1
  23. package/build/multichain/core/utils.js +1 -2
  24. package/build/multichain/core/utils.js.map +1 -1
  25. package/build/multichain/core/xrp.js +2 -2
  26. package/build/multichain/core/xrp.js.map +1 -1
  27. package/build/multichain/localsdk/index.d.ts +1 -0
  28. package/build/multichain/localsdk/index.js +3 -1
  29. package/build/multichain/localsdk/index.js.map +1 -1
  30. package/build/multichain/localsdk/near.d.ts +7 -0
  31. package/build/multichain/localsdk/near.js +34 -0
  32. package/build/multichain/localsdk/near.js.map +1 -0
  33. package/build/multichain/localsdk/ton.d.ts +0 -1
  34. package/build/multichain/websdk/near.d.ts +1 -0
  35. package/build/multichain/websdk/near.js +7 -0
  36. package/build/multichain/websdk/near.js.map +1 -0
  37. package/build/multichain/websdk/solana.d.ts +0 -1
  38. package/build/multichain/websdk/solana.js +2 -2
  39. package/build/multichain/websdk/solana.js.map +1 -1
  40. package/build/types/communication/demosWork.d.ts +14 -1
  41. package/build/types/communication/rpc.d.ts +33 -0
  42. package/build/types/communication/rpc.js +11 -0
  43. package/build/types/communication/rpc.js.map +1 -0
  44. package/build/types/index.d.ts +22 -21
  45. package/build/types/index.js +3 -1
  46. package/build/types/index.js.map +1 -1
  47. package/build/utils/dataManipulation.js +5 -6
  48. package/build/utils/dataManipulation.js.map +1 -1
  49. package/build/utils/getRemoteIP.js +1 -1
  50. package/build/utils/getRemoteIP.js.map +1 -1
  51. package/build/wallet/Wallet.d.ts +2 -1
  52. package/build/wallet/Wallet.js +2 -2
  53. package/build/wallet/Wallet.js.map +1 -1
  54. package/build/websdk/DemosTransactions.d.ts +10 -2
  55. package/build/websdk/DemosTransactions.js +25 -26
  56. package/build/websdk/DemosTransactions.js.map +1 -1
  57. package/build/websdk/DemosWebAuth.d.ts +4 -4
  58. package/build/websdk/DemosWebAuth.js.map +1 -1
  59. package/build/websdk/Web2Transactions.d.ts +22 -2
  60. package/build/websdk/Web2Transactions.js +30 -15
  61. package/build/websdk/Web2Transactions.js.map +1 -1
  62. package/build/websdk/XMTransactions.d.ts +2 -1
  63. package/build/websdk/XMTransactions.js +5 -6
  64. package/build/websdk/XMTransactions.js.map +1 -1
  65. package/build/websdk/demos.d.ts +38 -26
  66. package/build/websdk/demos.js +118 -252
  67. package/build/websdk/demos.js.map +1 -1
  68. package/build/websdk/index.js +1 -0
  69. package/build/websdk/index.js.map +1 -1
  70. package/build/websdk/rsa.d.ts +2 -2
  71. package/build/websdk/types/KeyPair.d.ts +0 -1
  72. package/build/websdk/utils/bufferizer.js +1 -2
  73. package/build/websdk/utils/bufferizer.js.map +1 -1
  74. package/build/websdk/utils/forge_converter.js +2 -3
  75. package/build/websdk/utils/forge_converter.js.map +1 -1
  76. package/build/websdk/utils/required.js +2 -3
  77. package/build/websdk/utils/required.js.map +1 -1
  78. package/build/websdk/utils/sha256.js +1 -2
  79. package/build/websdk/utils/sha256.js.map +1 -1
  80. package/package.json +10 -9
  81. package/build/demoswork/executor/conditionalExecutor.d.ts +0 -3
  82. package/build/demoswork/executor/conditionalExecutor.js +0 -30
  83. package/build/demoswork/executor/conditionalExecutor.js.map +0 -1
  84. package/build/demoswork/executor/index.d.ts +0 -2
  85. package/build/demoswork/executor/index.js +0 -26
  86. package/build/demoswork/executor/index.js.map +0 -1
  87. package/build/demoswork/executor/stepexecutor.d.ts +0 -18
  88. package/build/demoswork/executor/stepexecutor.js +0 -53
  89. package/build/demoswork/executor/stepexecutor.js.map +0 -1
  90. package/build/demoswork/index.d.ts +0 -4
  91. package/build/demoswork/index.js +0 -15
  92. package/build/demoswork/index.js.map +0 -1
  93. package/build/demoswork/operations/conditional.d.ts +0 -18
  94. package/build/demoswork/operations/conditional.js +0 -90
  95. package/build/demoswork/operations/conditional.js.map +0 -1
  96. package/build/demoswork/operations/index.d.ts +0 -10
  97. package/build/demoswork/operations/index.js +0 -22
  98. package/build/demoswork/operations/index.js.map +0 -1
  99. package/build/demoswork/utils.d.ts +0 -30
  100. package/build/demoswork/utils.js +0 -72
  101. package/build/demoswork/utils.js.map +0 -1
  102. package/build/demoswork/validator/index.d.ts +0 -7
  103. package/build/demoswork/validator/index.js +0 -13
  104. package/build/demoswork/validator/index.js.map +0 -1
  105. package/build/demoswork/validator/steps.validator.d.ts +0 -8
  106. package/build/demoswork/validator/steps.validator.js +0 -52
  107. package/build/demoswork/validator/steps.validator.js.map +0 -1
  108. package/build/demoswork/work.d.ts +0 -12
  109. package/build/demoswork/work.js +0 -56
  110. package/build/demoswork/work.js.map +0 -1
  111. package/build/demoswork/workstep.d.ts +0 -63
  112. package/build/demoswork/workstep.js +0 -93
  113. package/build/demoswork/workstep.js.map +0 -1
  114. package/build/types/demoswork/index.d.ts +0 -14
  115. package/build/types/demoswork/index.js +0 -3
  116. package/build/types/demoswork/index.js.map +0 -1
  117. package/build/types/demoswork/operations.d.ts +0 -10
  118. package/build/types/demoswork/operations.js +0 -3
  119. package/build/types/demoswork/operations.js.map +0 -1
  120. package/build/types/demoswork/steps.d.ts +0 -54
  121. package/build/types/demoswork/steps.js +0 -18
  122. package/build/types/demoswork/steps.js.map +0 -1
  123. package/build/types/demoswork/types.d.ts +0 -4
  124. package/build/types/demoswork/types.js +0 -8
  125. package/build/types/demoswork/types.js.map +0 -1
  126. package/build/types/demoswork/web2.d.ts +0 -4
  127. package/build/types/demoswork/web2.js +0 -3
  128. package/build/types/demoswork/web2.js.map +0 -1
  129. package/build/utils/pprint.d.ts +0 -5
  130. package/build/utils/pprint.js +0 -15
  131. package/build/utils/pprint.js.map +0 -1
@@ -1,56 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DemosWork = void 0;
7
- const pprint_1 = __importDefault(require("../utils/pprint"));
8
- const executor_1 = __importDefault(require("./executor"));
9
- const conditional_1 = require("./operations/conditional");
10
- const validator_1 = __importDefault(require("./validator"));
11
- class DemosWork {
12
- constructor() {
13
- this.script = {
14
- operationOrder: new Set(),
15
- operations: {},
16
- steps: {},
17
- };
18
- // INFO: Step results indexed by stepUID
19
- this.results = {};
20
- }
21
- if(condition) {
22
- return new conditional_1.Conditional(this.script, condition);
23
- }
24
- validate(script) {
25
- (0, validator_1.default)(script);
26
- }
27
- fromJSON(script) {
28
- let newscript = script;
29
- (0, pprint_1.default)(newscript.operationOrder);
30
- newscript.operationOrder = new Set(script.operationOrder);
31
- this.script = script;
32
- return this;
33
- }
34
- async execute() {
35
- return await (0, executor_1.default)(this);
36
- }
37
- toJSON() {
38
- let script = this.script;
39
- // @ts-expect-error
40
- // convert set to array
41
- script.operationOrder = [...script.operationOrder];
42
- // remove all step outputs
43
- for (const stepUID in script.steps) {
44
- delete script.steps[stepUID].output;
45
- delete script.steps[stepUID].workUID;
46
- }
47
- // remove all operation uids
48
- for (const opUID in script.operations) {
49
- delete script.operations[opUID].operationUID;
50
- }
51
- this.validate(script);
52
- return script;
53
- }
54
- }
55
- exports.DemosWork = DemosWork;
56
- //# sourceMappingURL=work.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"work.js","sourceRoot":"","sources":["../../../src/demoswork/work.ts"],"names":[],"mappings":";;;;;;AAEA,4DAAmC;AACnC,0DAAsC;AACtC,0DAAsD;AACtD,4DAAqC;AAErC,MAAa,SAAS;IAAtB;QACI,WAAM,GAAe;YACjB,cAAc,EAAE,IAAI,GAAG,EAAU;YACjC,UAAU,EAAE,EAAE;YACd,KAAK,EAAE,EAAE;SACZ,CAAA;QACD,wCAAwC;QACxC,YAAO,GAAwB,EAAE,CAAA;IA2CrC,CAAC;IAzCG,EAAE,CAAC,SAA8B;QAC7B,OAAO,IAAI,yBAAW,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAClD,CAAC;IAED,QAAQ,CAAC,MAAkB;QACvB,IAAA,mBAAW,EAAC,MAAM,CAAC,CAAA;IACvB,CAAC;IAED,QAAQ,CAAC,MAAkB;QACvB,IAAI,SAAS,GAAG,MAAM,CAAA;QACtB,IAAA,gBAAM,EAAC,SAAS,CAAC,cAAc,CAAC,CAAA;QAChC,SAAS,CAAC,cAAc,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;QAEzD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,OAAO,IAAI,CAAA;IACf,CAAC;IAED,KAAK,CAAC,OAAO;QACT,OAAO,MAAM,IAAA,kBAAa,EAAC,IAAI,CAAC,CAAA;IACpC,CAAC;IAED,MAAM;QACF,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACxB,mBAAmB;QACnB,uBAAuB;QACvB,MAAM,CAAC,cAAc,GAAG,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;QAElD,0BAA0B;QAC1B,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACjC,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAA;YACnC,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAA;QACxC,CAAC;QAED,4BAA4B;QAC5B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YACpC,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAAA;QAChD,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QACrB,OAAO,MAAM,CAAA;IACjB,CAAC;CACJ;AAlDD,8BAkDC"}
@@ -1,63 +0,0 @@
1
- import forge from "node-forge";
2
- import { IWeb2Request, XMScript } from "../types";
3
- import { DataTypes } from "../types/demoswork/types";
4
- import { WorkStepInput } from "../types/demoswork/steps";
5
- export declare class WorkStep {
6
- type: string;
7
- workUID: string;
8
- content: WorkStepInput;
9
- output: any;
10
- description: string;
11
- signature: forge.pki.ed25519.BinaryBuffer;
12
- constructor(payload: WorkStepInput);
13
- get hash(): string;
14
- /**
15
- * Sign a work step using a private key
16
- *
17
- * @param privateKey The private key
18
- * @returns The signature
19
- */
20
- sign(privateKey: forge.pki.ed25519.BinaryBuffer | any): forge.pki.ed25519.NativeBuffer;
21
- execute(): void;
22
- }
23
- export declare class Web2WorkStep extends WorkStep {
24
- type: string;
25
- output: {
26
- statusCode: {
27
- type: DataTypes;
28
- src: {
29
- stepUID: string;
30
- key: string;
31
- };
32
- };
33
- payload: {
34
- type: DataTypes;
35
- src: {
36
- stepUID: string;
37
- key: string;
38
- };
39
- };
40
- };
41
- constructor(payload: IWeb2Request);
42
- }
43
- export declare class XmWorkStep extends WorkStep {
44
- type: string;
45
- output: {
46
- result: {
47
- type: DataTypes;
48
- src: {
49
- stepUID: string;
50
- key: string;
51
- };
52
- };
53
- hash: {
54
- type: DataTypes;
55
- src: {
56
- stepUID: string;
57
- key: string;
58
- };
59
- };
60
- };
61
- constructor(payload: XMScript);
62
- }
63
- export declare function prepareXMStep(xm_payload: XMScript): XmWorkStep;
@@ -1,93 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.prepareXMStep = exports.XmWorkStep = exports.Web2WorkStep = exports.WorkStep = void 0;
7
- const node_forge_1 = __importDefault(require("node-forge"));
8
- const utils_1 = require("./utils");
9
- const encryption_1 = require("../encryption");
10
- const dataManipulation_1 = require("../utils/dataManipulation");
11
- const types_1 = require("../types/demoswork/types");
12
- class WorkStep {
13
- constructor(payload) {
14
- this.content = payload;
15
- this.workUID = (0, utils_1.getNewUID)();
16
- }
17
- get hash() {
18
- return encryption_1.Hashing.sha256(JSON.stringify(this));
19
- }
20
- /**
21
- * Sign a work step using a private key
22
- *
23
- * @param privateKey The private key
24
- * @returns The signature
25
- */
26
- sign(privateKey) {
27
- if (privateKey.type == "string") {
28
- console.log("[HexToForge] Deriving a buffer from privateKey...");
29
- privateKey = (0, dataManipulation_1.HexToForge)(privateKey);
30
- }
31
- this.signature = node_forge_1.default.pki.ed25519.sign({
32
- message: this.hash,
33
- encoding: "utf8",
34
- privateKey,
35
- });
36
- return this.signature;
37
- }
38
- execute() {
39
- // INFO: Send payload or execute web2 request here
40
- }
41
- }
42
- exports.WorkStep = WorkStep;
43
- class Web2WorkStep extends WorkStep {
44
- constructor(payload) {
45
- super(payload);
46
- this.type = "web2";
47
- this.output = {
48
- statusCode: {
49
- type: types_1.DataTypes.internal,
50
- src: {
51
- stepUID: this.workUID,
52
- key: "output.statusCode",
53
- },
54
- },
55
- payload: {
56
- type: types_1.DataTypes.internal,
57
- src: {
58
- stepUID: this.workUID,
59
- key: "output.payload",
60
- },
61
- },
62
- };
63
- }
64
- }
65
- exports.Web2WorkStep = Web2WorkStep;
66
- class XmWorkStep extends WorkStep {
67
- constructor(payload) {
68
- super(payload);
69
- this.type = "xm";
70
- this.output = {
71
- result: {
72
- type: types_1.DataTypes.internal,
73
- src: {
74
- stepUID: this.workUID,
75
- key: "output.result",
76
- },
77
- },
78
- hash: {
79
- type: types_1.DataTypes.internal,
80
- src: {
81
- stepUID: this.workUID,
82
- key: "output.hash",
83
- },
84
- },
85
- };
86
- }
87
- }
88
- exports.XmWorkStep = XmWorkStep;
89
- function prepareXMStep(xm_payload) {
90
- return new XmWorkStep(xm_payload);
91
- }
92
- exports.prepareXMStep = prepareXMStep;
93
- //# sourceMappingURL=workstep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workstep.js","sourceRoot":"","sources":["../../../src/demoswork/workstep.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA8B;AAE9B,mCAAmC;AACnC,6CAAsC;AACtC,+DAAqD;AAGrD,mDAAmD;AAGnD,MAAa,QAAQ;IAQjB,YAAY,OAAsB;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,IAAA,iBAAS,GAAE,CAAA;IAC9B,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,oBAAO,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;IAC/C,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,UAAgD;QACjD,IAAI,UAAU,CAAC,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAA;YAChE,UAAU,GAAG,IAAA,6BAAU,EAAC,UAAU,CAAC,CAAA;QACvC,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,oBAAK,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;YACpC,OAAO,EAAE,IAAI,CAAC,IAAI;YAClB,QAAQ,EAAE,MAAM;YAChB,UAAU;SACb,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,SAAS,CAAA;IACzB,CAAC;IAED,OAAO;QACH,kDAAkD;IACtD,CAAC;CACJ;AAzCD,4BAyCC;AAED,MAAa,YAAa,SAAQ,QAAQ;IAmBtC,YAAY,OAAqB;QAC7B,KAAK,CAAC,OAAO,CAAC,CAAA;QAnBT,SAAI,GAAW,MAAM,CAAA;QACrB,WAAM,GAAG;YACd,UAAU,EAAE;gBACR,IAAI,EAAE,iBAAS,CAAC,QAAQ;gBACxB,GAAG,EAAE;oBACD,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,GAAG,EAAE,mBAAmB;iBAC3B;aACJ;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,iBAAS,CAAC,QAAQ;gBACxB,GAAG,EAAE;oBACD,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,GAAG,EAAE,gBAAgB;iBACxB;aACJ;SACJ,CAAA;IAID,CAAC;CACJ;AAtBD,oCAsBC;AAED,MAAa,UAAW,SAAQ,QAAQ;IAmBpC,YAAY,OAAiB;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QAnBT,SAAI,GAAW,IAAI,CAAA;QACnB,WAAM,GAAG;YACd,MAAM,EAAE;gBACJ,IAAI,EAAE,iBAAS,CAAC,QAAQ;gBACxB,GAAG,EAAE;oBACD,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,GAAG,EAAE,eAAe;iBACvB;aACJ;YACD,IAAI,EAAE;gBACF,IAAI,EAAE,iBAAS,CAAC,QAAQ;gBACxB,GAAG,EAAE;oBACD,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,GAAG,EAAE,aAAa;iBACrB;aACJ;SACJ,CAAA;IAID,CAAC;CACJ;AAtBD,gCAsBC;AAED,SAAgB,aAAa,CAAC,UAAoB;IAC9C,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,CAAA;AACrC,CAAC;AAFD,sCAEC"}
@@ -1,14 +0,0 @@
1
- import { WorkStep } from "../../demoswork/workstep";
2
- import { AnyOperation } from "./operations";
3
- /**
4
- * The final shape of the work script
5
- */
6
- export interface DemoScript {
7
- operationOrder: Set<string>;
8
- operations: {
9
- [key: string]: AnyOperation;
10
- };
11
- steps: {
12
- [key: string]: WorkStep;
13
- };
14
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/demoswork/index.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import { Conditional } from "./steps";
2
- export type OperationType = "conditional" | "loop" | "operation" | "function";
3
- export interface OperationScript {
4
- operationUID: string;
5
- operationType: OperationType;
6
- }
7
- export interface ConditionalScript extends OperationScript {
8
- conditions: Conditional[];
9
- }
10
- export type AnyOperation = ConditionalScript;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=operations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/types/demoswork/operations.ts"],"names":[],"mappings":""}
@@ -1,54 +0,0 @@
1
- import { XMScript } from "../xm";
2
- import { operators } from "./types";
3
- import { IWeb2Request } from "../web2";
4
- import { DemosWeb2StepOutput } from "./web2";
5
- import { WorkStep } from "../../demoswork/workstep";
6
- interface BaseCondition {
7
- operator: operators;
8
- key: string;
9
- value: any;
10
- }
11
- /**
12
- * The shape of the condition
13
- * that is used in `DemosWork.if` and friends
14
- */
15
- export interface Condition extends BaseCondition {
16
- step: WorkStep;
17
- }
18
- /**
19
- * The shape of the conditional operation
20
- * on the if_script
21
- */
22
- export interface Conditional extends BaseCondition {
23
- stepUID: string;
24
- do: {
25
- type: "step";
26
- uid: string;
27
- };
28
- }
29
- export declare enum stepKeysEnum {
30
- "output.result" = "output.result",
31
- "output.hash" = "output.hash"
32
- }
33
- export type stepKeys = keyof typeof stepKeysEnum;
34
- export type WorkStepInput = XMScript | IWeb2Request | any;
35
- export type WorkStepOutput = DemosXmStepOutput | DemosWeb2StepOutput;
36
- /**
37
- * Assume a xm step that send some ether outputs and object of this shape
38
- */
39
- export interface DemosXmStepOutput {
40
- stepUID: string;
41
- result: XmStepResult;
42
- /**
43
- * The hash of the sent transaction
44
- */
45
- hash: string;
46
- }
47
- /**
48
- * A xm step can either be successful or error
49
- */
50
- export declare enum XmStepResult {
51
- success = "success",
52
- error = "error"
53
- }
54
- export {};
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.XmStepResult = exports.stepKeysEnum = void 0;
4
- var stepKeysEnum;
5
- (function (stepKeysEnum) {
6
- stepKeysEnum["output.result"] = "output.result";
7
- stepKeysEnum["output.hash"] = "output.hash";
8
- // others here
9
- })(stepKeysEnum || (exports.stepKeysEnum = stepKeysEnum = {}));
10
- /**
11
- * A xm step can either be successful or error
12
- */
13
- var XmStepResult;
14
- (function (XmStepResult) {
15
- XmStepResult["success"] = "success";
16
- XmStepResult["error"] = "error";
17
- })(XmStepResult || (exports.XmStepResult = XmStepResult = {}));
18
- //# sourceMappingURL=steps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../../src/types/demoswork/steps.ts"],"names":[],"mappings":";;;AAiCA,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,+CAAiC,CAAA;IACjC,2CAA6B,CAAA;IAC7B,cAAc;AAClB,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAmBD;;GAEG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;AACnB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
@@ -1,4 +0,0 @@
1
- export declare enum DataTypes {
2
- internal = "internal"
3
- }
4
- export type operators = "==" | "equality" | "inequality" | "greater" | "lesser" | "greaterOrEqual" | "lesserOrEqual";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataTypes = void 0;
4
- var DataTypes;
5
- (function (DataTypes) {
6
- DataTypes["internal"] = "internal";
7
- })(DataTypes || (exports.DataTypes = DataTypes = {}));
8
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/types/demoswork/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAEX;AAFD,WAAY,SAAS;IACjB,kCAAqB,CAAA;AACzB,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB"}
@@ -1,4 +0,0 @@
1
- export interface DemosWeb2StepOutput {
2
- statusCode: number;
3
- payload: Object;
4
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=web2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web2.js","sourceRoot":"","sources":["../../../../src/types/demoswork/web2.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- /**
2
- * Pretty prints a fully expanded object to the console.
3
- * @param obj The object to print
4
- */
5
- export default function pprint(obj: any): void;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const util_1 = __importDefault(require("util"));
7
- /**
8
- * Pretty prints a fully expanded object to the console.
9
- * @param obj The object to print
10
- */
11
- function pprint(obj) {
12
- console.log(util_1.default.inspect(obj, false, null, true));
13
- }
14
- exports.default = pprint;
15
- //# sourceMappingURL=pprint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pprint.js","sourceRoot":"","sources":["../../../src/utils/pprint.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AAEvB;;;GAGG;AACH,SAAwB,MAAM,CAAC,GAAQ;IACnC,OAAO,CAAC,GAAG,CAAC,cAAI,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AACrD,CAAC;AAFD,yBAEC"}