@kynesyslabs/demosdk 1.0.3 → 1.0.5

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.
@@ -9,3 +9,13 @@ export interface Operation {
9
9
  status: boolean | "pending";
10
10
  fees: TxFee;
11
11
  }
12
+ export interface OperationResult {
13
+ success: boolean;
14
+ message: string;
15
+ }
16
+ export interface OperationRegistrySlot {
17
+ operation: Operation;
18
+ status: boolean | "pending";
19
+ result: OperationResult;
20
+ timestamp: number;
21
+ }
@@ -0,0 +1,19 @@
1
+ import forge from "node-forge";
2
+ interface TokenTransfer {
3
+ address: string;
4
+ amount: number;
5
+ }
6
+ interface NFTTransfer {
7
+ address: string;
8
+ tokenId: string;
9
+ amount: number;
10
+ }
11
+ export interface StateChange {
12
+ sender: forge.pki.ed25519.BinaryBuffer;
13
+ receiver: forge.pki.ed25519.BinaryBuffer;
14
+ nativeAmount: number;
15
+ tx_hash: string;
16
+ token: TokenTransfer;
17
+ nft: NFTTransfer;
18
+ }
19
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /* LICENSE
3
+
4
+ © 2023 by KyneSys Labs, licensed under CC BY-NC-ND 4.0
5
+
6
+ Full license text: https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
7
+ Human readable license: https://creativecommons.org/licenses/by-nc-nd/4.0/
8
+
9
+ KyneSys Labs: https://www.kynesys.xyz/
10
+
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=StateChange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateChange.js","sourceRoot":"","sources":["../../../src/types/StateChange.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE"}
@@ -1,6 +1,16 @@
1
1
  import { ISignature } from "./ISignature";
2
- import { TransactionContent } from "./TransactionContent";
3
2
  import * as forge from "node-forge";
3
+ import { TxFee } from "./TxFee";
4
+ export interface TransactionContent {
5
+ type: string;
6
+ from: forge.pki.ed25519.BinaryBuffer | forge.pki.PublicKey | ISignature;
7
+ to: forge.pki.ed25519.BinaryBuffer | forge.pki.PrivateKey | ISignature;
8
+ amount: number;
9
+ data: [string, string];
10
+ nonce: number;
11
+ timestamp: number;
12
+ transaction_fee: TxFee;
13
+ }
4
14
  export interface Transaction {
5
15
  content: TransactionContent;
6
16
  signature: ISignature | forge.pki.ed25519.BinaryBuffer;
@@ -1,13 +1 @@
1
- import forge from 'node-forge';
2
- import { TxFee } from './TxFee';
3
- import { ISignature } from './ISignature';
4
- export interface TransactionContent {
5
- type: string;
6
- from: forge.pki.ed25519.BinaryBuffer | forge.pki.PublicKey | ISignature;
7
- to: forge.pki.ed25519.BinaryBuffer | forge.pki.PrivateKey | ISignature;
8
- amount: number;
9
- data: [string, string];
10
- nonce: number;
11
- timestamp: number;
12
- transaction_fee: TxFee;
13
- }
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface BlockContent {
2
+ ordered_transactions: string[];
3
+ per_address_transactions: Map<string, string[]>;
4
+ web2data: {};
5
+ previousHash: string;
6
+ timestamp: number;
7
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /* LICENSE
3
+
4
+ © 2023 by KyneSys Labs, licensed under CC BY-NC-ND 4.0
5
+
6
+ Full license text: https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
7
+ Human readable license: https://creativecommons.org/licenses/by-nc-nd/4.0/
8
+
9
+ KyneSys Labs: https://www.kynesys.xyz/
10
+
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=blocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocks.js","sourceRoot":"","sources":["../../../src/types/blocks.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE"}
@@ -0,0 +1,29 @@
1
+ export interface GenesisImmutableProperties {
2
+ id: number;
3
+ name: string;
4
+ currency: string;
5
+ }
6
+ export interface GenesisMutableProperties {
7
+ minBlocksForValidationOnlineStatus: number;
8
+ }
9
+ export interface GenesisArtifact {
10
+ properties: GenesisImmutableProperties;
11
+ mutables: GenesisMutableProperties;
12
+ balances: [[address: string, amount: string]];
13
+ timestamp: number;
14
+ previous_genesis_hash: string;
15
+ previous_block_hash: string;
16
+ signature: string;
17
+ hash: string;
18
+ number: number;
19
+ }
20
+ export interface StandardGenesis {
21
+ properties: GenesisImmutableProperties;
22
+ mutables: GenesisMutableProperties;
23
+ balances: [[address: string, amount: string]];
24
+ timestamp: number;
25
+ }
26
+ export interface forkGenesis extends StandardGenesis {
27
+ previous_genesis_hash: string;
28
+ previous_block_hash: string;
29
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // SECTION Primitives
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=genesisTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genesisTypes.js","sourceRoot":"","sources":["../../../src/types/genesisTypes.ts"],"names":[],"mappings":";AAAA,qBAAqB"}
@@ -1,6 +1,14 @@
1
- export { ISignature } from './ISignature';
2
- export { Operation } from './Operation';
3
- export { Transaction } from './Transaction';
4
- export { TransactionContent } from './TransactionContent';
1
+ export { GenesisArtifact, GenesisImmutableProperties, GenesisMutableProperties, StandardGenesis, forkGenesis, } from './genesisTypes';
5
2
  export { TxFee } from './TxFee';
3
+ export { BlockContent } from './blocks';
4
+ export { ISignature } from './ISignature';
5
+ export { StateChange } from './StateChange';
6
6
  export { ValidityData } from './ValidityData';
7
+ export { RawTransaction } from './rawTransaction';
8
+ export { Transaction, TransactionContent } from './Transaction';
9
+ export { StatusNative } from './statusNative';
10
+ export { statusNative as StatusProperties } from './statusProperties';
11
+ export { Operation, OperationRegistrySlot, OperationResult } from './Operation';
12
+ export { ISecurityReport, SIComlink, SIResponseRegistry, } from './network/SecurityTypes';
13
+ export { ExecutionResult } from './network/ExecutionResult';
14
+ export { IPeerConfig } from './peers/Peer';
@@ -0,0 +1,7 @@
1
+ import { Operation } from "../Operation";
2
+ export interface ExecutionResult {
3
+ response: any;
4
+ extra: any;
5
+ require_reply: boolean;
6
+ operations?: Operation[];
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ExecutionResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionResult.js","sourceRoot":"","sources":["../../../../src/types/network/ExecutionResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export interface ISecurityReport {
2
+ state: boolean;
3
+ code: string;
4
+ message: string;
5
+ }
6
+ export interface SIResponseRegistry {
7
+ prune_interval: number;
8
+ }
9
+ export interface SIComlink {
10
+ rate_limit_size: number;
11
+ rate_limit_time: number;
12
+ rate_limit_bin: number;
13
+ rate_limit_timestamp: number;
14
+ checkRateLimits: Function;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SecurityTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecurityTypes.js","sourceRoot":"","sources":["../../../../src/types/network/SecurityTypes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { Socket } from "socket.io-client";
2
+ export interface IPeerConfig {
3
+ connectionString?: string;
4
+ socket?: Socket;
5
+ identity?: string;
6
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /* LICENSE
3
+
4
+ © 2023 by KyneSys Labs, licensed under CC BY-NC-ND 4.0
5
+
6
+ Full license text: https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
7
+ Human readable license: https://creativecommons.org/licenses/by-nc-nd/4.0/
8
+
9
+ KyneSys Labs: https://www.kynesys.xyz/
10
+
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=Peer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Peer.js","sourceRoot":"","sources":["../../../../src/types/peers/Peer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE"}
@@ -0,0 +1,16 @@
1
+ export interface RawTransaction {
2
+ blockNumber: number;
3
+ signature: string;
4
+ status: string;
5
+ hash: string;
6
+ content: NonNullable<string>;
7
+ type: string;
8
+ from: any;
9
+ to: any;
10
+ amount: number;
11
+ nonce: number;
12
+ timestamp: number;
13
+ networkFee: number;
14
+ rpcFee: number;
15
+ additionalFee: number;
16
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /* LICENSE
3
+
4
+ © 2023 by KyneSys Labs, licensed under CC BY-NC-ND 4.0
5
+
6
+ Full license text: https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
7
+ Human readable license: https://creativecommons.org/licenses/by-nc-nd/4.0/
8
+
9
+ KyneSys Labs: https://www.kynesys.xyz/
10
+
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=rawTransaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rawTransaction.js","sourceRoot":"","sources":["../../../src/types/rawTransaction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE"}
@@ -0,0 +1,6 @@
1
+ export interface StatusNative {
2
+ address: string;
3
+ balance: number;
4
+ nonce: number;
5
+ tx_list: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=statusNative.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusNative.js","sourceRoot":"","sources":["../../../src/types/statusNative.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export interface statusNative {
2
+ address: string;
3
+ tokens: string;
4
+ nfts: string;
5
+ xm: string;
6
+ web2: string;
7
+ other: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=statusProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusProperties.js","sourceRoot":"","sources":["../../../src/types/statusProperties.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kynesyslabs/demosdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "author": "Kynesys Labs",
@@ -29,6 +29,7 @@
29
29
  "@multiversx/sdk-wallet": "^4.4.0",
30
30
  "ethers": "^6.11.1",
31
31
  "node-forge": "^1.3.1",
32
+ "socket.io-client": "^4.7.2",
32
33
  "xrpl": "^3.0.0"
33
34
  },
34
35
  "devDependencies": {