@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.
- package/build/types/Operation.d.ts +10 -0
- package/build/types/StateChange.d.ts +19 -0
- package/build/types/StateChange.js +13 -0
- package/build/types/StateChange.js.map +1 -0
- package/build/types/Transaction.d.ts +11 -1
- package/build/types/TransactionContent.d.ts +1 -13
- package/build/types/blocks.d.ts +7 -0
- package/build/types/blocks.js +13 -0
- package/build/types/blocks.js.map +1 -0
- package/build/types/genesisTypes.d.ts +29 -0
- package/build/types/genesisTypes.js +4 -0
- package/build/types/genesisTypes.js.map +1 -0
- package/build/types/index.d.ts +12 -4
- package/build/types/network/ExecutionResult.d.ts +7 -0
- package/build/types/network/ExecutionResult.js +3 -0
- package/build/types/network/ExecutionResult.js.map +1 -0
- package/build/types/network/SecurityTypes.d.ts +15 -0
- package/build/types/network/SecurityTypes.js +3 -0
- package/build/types/network/SecurityTypes.js.map +1 -0
- package/build/types/peers/Peer.d.ts +6 -0
- package/build/types/peers/Peer.js +13 -0
- package/build/types/peers/Peer.js.map +1 -0
- package/build/types/rawTransaction.d.ts +16 -0
- package/build/types/rawTransaction.js +13 -0
- package/build/types/rawTransaction.js.map +1 -0
- package/build/types/statusNative.d.ts +6 -0
- package/build/types/statusNative.js +3 -0
- package/build/types/statusNative.js.map +1 -0
- package/build/types/statusProperties.d.ts +8 -0
- package/build/types/statusProperties.js +3 -0
- package/build/types/statusProperties.js.map +1 -0
- package/package.json +2 -1
|
@@ -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
|
-
|
|
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,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 @@
|
|
|
1
|
+
{"version":3,"file":"genesisTypes.js","sourceRoot":"","sources":["../../../src/types/genesisTypes.ts"],"names":[],"mappings":";AAAA,qBAAqB"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
export {
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityTypes.js","sourceRoot":"","sources":["../../../../src/types/network/SecurityTypes.ts"],"names":[],"mappings":""}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"statusNative.js","sourceRoot":"","sources":["../../../src/types/statusNative.ts"],"names":[],"mappings":""}
|
|
@@ -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
|
+
"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": {
|