@super-protocol/sdk-js 0.6.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/build/BlockchainConnector.d.ts +48 -0
- package/build/BlockchainConnector.js +259 -0
- package/build/TIIGenerator.d.ts +21 -0
- package/build/TIIGenerator.js +251 -0
- package/build/constants.d.ts +7 -0
- package/build/constants.js +10 -0
- package/build/contracts/ActiveOffersList.json +131 -0
- package/build/contracts/ActiveOrdersList.json +74 -0
- package/build/contracts/Marks.json +79 -0
- package/build/contracts/Offers.json +999 -0
- package/build/contracts/Orders.json +984 -0
- package/build/contracts/Providers.json +440 -0
- package/build/contracts/ProvidersOffers.json +254 -0
- package/build/contracts/Staking.json +323 -0
- package/build/contracts/Superpro.json +197 -0
- package/build/contracts/SuperproToken.json +356 -0
- package/build/crypto/Crypto.d.ts +37 -0
- package/build/crypto/Crypto.js +181 -0
- package/build/crypto/index.d.ts +2 -0
- package/build/crypto/index.js +7 -0
- package/build/crypto/nodejs/AES.d.ts +24 -0
- package/build/crypto/nodejs/AES.js +152 -0
- package/build/crypto/nodejs/ARIA.d.ts +24 -0
- package/build/crypto/nodejs/ARIA.js +151 -0
- package/build/crypto/nodejs/ECIES.d.ts +6 -0
- package/build/crypto/nodejs/ECIES.js +94 -0
- package/build/crypto/nodejs/NativeCrypto.d.ts +54 -0
- package/build/crypto/nodejs/NativeCrypto.js +214 -0
- package/build/crypto/nodejs/RSA-Hybrid.d.ts +15 -0
- package/build/crypto/nodejs/RSA-Hybrid.js +153 -0
- package/build/index.d.ts +65 -0
- package/build/index.js +117 -0
- package/build/logger.d.ts +4 -0
- package/build/logger.js +8 -0
- package/build/models/Ballot.d.ts +13 -0
- package/build/models/Ballot.js +76 -0
- package/build/models/Offer.d.ts +70 -0
- package/build/models/Offer.js +273 -0
- package/build/models/Order.d.ts +125 -0
- package/build/models/Order.js +540 -0
- package/build/models/Provider.d.ts +40 -0
- package/build/models/Provider.js +167 -0
- package/build/models/TCB.d.ts +80 -0
- package/build/models/TCB.js +315 -0
- package/build/models/TeeOffer.d.ts +118 -0
- package/build/models/TeeOffer.js +436 -0
- package/build/proto/Compression.d.ts +33 -0
- package/build/proto/Compression.js +146 -0
- package/build/proto/TRI.d.ts +122 -0
- package/build/proto/TRI.js +316 -0
- package/build/providers/storage/ChunksDownloadDecorator.d.ts +38 -0
- package/build/providers/storage/ChunksDownloadDecorator.js +284 -0
- package/build/providers/storage/IStorageProvider.d.ts +17 -0
- package/build/providers/storage/IStorageProvider.js +2 -0
- package/build/providers/storage/StorjStorageProvider.d.ts +26 -0
- package/build/providers/storage/StorjStorageProvider.js +389 -0
- package/build/providers/storage/getStorageProvider.d.ts +4 -0
- package/build/providers/storage/getStorageProvider.js +16 -0
- package/build/staticModels/ActiveOffers.d.ts +29 -0
- package/build/staticModels/ActiveOffers.js +144 -0
- package/build/staticModels/ActiveOrders.d.ts +21 -0
- package/build/staticModels/ActiveOrders.js +120 -0
- package/build/staticModels/Consensus.d.ts +63 -0
- package/build/staticModels/Consensus.js +373 -0
- package/build/staticModels/Epochs.d.ts +23 -0
- package/build/staticModels/Epochs.js +97 -0
- package/build/staticModels/LastBlocks.d.ts +25 -0
- package/build/staticModels/LastBlocks.js +96 -0
- package/build/staticModels/Marks.d.ts +13 -0
- package/build/staticModels/Marks.js +113 -0
- package/build/staticModels/OffersFactory.d.ts +37 -0
- package/build/staticModels/OffersFactory.js +227 -0
- package/build/staticModels/OrdersFactory.d.ts +137 -0
- package/build/staticModels/OrdersFactory.js +539 -0
- package/build/staticModels/ProviderRegistry.d.ts +81 -0
- package/build/staticModels/ProviderRegistry.js +311 -0
- package/build/staticModels/Staking.d.ts +26 -0
- package/build/staticModels/Staking.js +132 -0
- package/build/staticModels/Superpro.d.ts +20 -0
- package/build/staticModels/Superpro.js +99 -0
- package/build/staticModels/SuperproToken.d.ts +30 -0
- package/build/staticModels/SuperproToken.js +125 -0
- package/build/staticModels/Suspicious.d.ts +26 -0
- package/build/staticModels/Suspicious.js +99 -0
- package/build/staticModels/TeeOffersFactory.d.ts +36 -0
- package/build/staticModels/TeeOffersFactory.js +206 -0
- package/build/staticModels/Voting.d.ts +35 -0
- package/build/staticModels/Voting.js +111 -0
- package/build/store.d.ts +12 -0
- package/build/store.js +13 -0
- package/build/types/Ballot.d.ts +75 -0
- package/build/types/Ballot.js +49 -0
- package/build/types/Epoch.d.ts +21 -0
- package/build/types/Epoch.js +18 -0
- package/build/types/Events.d.ts +18 -0
- package/build/types/Events.js +2 -0
- package/build/types/Marks.d.ts +5 -0
- package/build/types/Marks.js +9 -0
- package/build/types/Offer.d.ts +63 -0
- package/build/types/Offer.js +41 -0
- package/build/types/Order.d.ts +61 -0
- package/build/types/Order.js +36 -0
- package/build/types/Origins.d.ts +12 -0
- package/build/types/Origins.js +10 -0
- package/build/types/Provider.d.ts +25 -0
- package/build/types/Provider.js +19 -0
- package/build/types/Staking.d.ts +27 -0
- package/build/types/Staking.js +22 -0
- package/build/types/Superpro.d.ts +24 -0
- package/build/types/Superpro.js +29 -0
- package/build/types/TcbData.d.ts +26 -0
- package/build/types/TcbData.js +21 -0
- package/build/types/TeeOffer.d.ts +22 -0
- package/build/types/TeeOffer.js +15 -0
- package/build/types/Web3.d.ts +26 -0
- package/build/types/Web3.js +2 -0
- package/build/types/blockchainConnector/StorageAccess.d.ts +8 -0
- package/build/types/blockchainConnector/StorageAccess.js +2 -0
- package/build/types/storage/StorageAccess.d.ts +6 -0
- package/build/types/storage/StorageAccess.js +2 -0
- package/build/types/storage/StorageFileAccess.d.ts +5 -0
- package/build/types/storage/StorageFileAccess.js +2 -0
- package/build/types/storage/StorageObject.d.ts +8 -0
- package/build/types/storage/StorageObject.js +2 -0
- package/build/utils/NonceTracker.d.ts +12 -0
- package/build/utils/NonceTracker.js +84 -0
- package/build/utils/TxManager.d.ts +21 -0
- package/build/utils/TxManager.js +159 -0
- package/build/utils.d.ts +38 -0
- package/build/utils.js +195 -0
- package/package.json +68 -0
- package/readme.md +40 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ContractName, ParamName } from "./Superpro";
|
|
2
|
+
export declare enum ModifyRequestType {
|
|
3
|
+
NewContractAddress = "0",
|
|
4
|
+
NewParamValue = "1"
|
|
5
|
+
}
|
|
6
|
+
export declare enum BallotState {
|
|
7
|
+
InProgress = "0",
|
|
8
|
+
Applied = "1",
|
|
9
|
+
Rejected = "2"
|
|
10
|
+
}
|
|
11
|
+
export declare enum BallotStateReason {
|
|
12
|
+
NoQuorum = "0",
|
|
13
|
+
MajorityDecision = "1"
|
|
14
|
+
}
|
|
15
|
+
export declare const ModifyRequestStructure: {
|
|
16
|
+
requestType: typeof ModifyRequestType;
|
|
17
|
+
contractName: typeof ContractName;
|
|
18
|
+
newContractAddress: StringConstructor;
|
|
19
|
+
paramName: typeof ParamName;
|
|
20
|
+
newParamValue: NumberConstructor;
|
|
21
|
+
};
|
|
22
|
+
export declare type ModifyRequest = {
|
|
23
|
+
requestType: ModifyRequestType;
|
|
24
|
+
contractName: ContractName;
|
|
25
|
+
newContractAddress: string;
|
|
26
|
+
paramName: ParamName;
|
|
27
|
+
newParamValue: number;
|
|
28
|
+
};
|
|
29
|
+
export declare const VoterInfoStructure: {
|
|
30
|
+
voter: StringConstructor;
|
|
31
|
+
yes: NumberConstructor;
|
|
32
|
+
};
|
|
33
|
+
export declare type VoterInfo = {
|
|
34
|
+
voter: string;
|
|
35
|
+
yes: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare const BallotInfoStructure: {
|
|
38
|
+
issuer: StringConstructor;
|
|
39
|
+
depositAmount: NumberConstructor;
|
|
40
|
+
openDate: NumberConstructor;
|
|
41
|
+
closeDate: NumberConstructor;
|
|
42
|
+
execDate: NumberConstructor;
|
|
43
|
+
request: {
|
|
44
|
+
requestType: typeof ModifyRequestType;
|
|
45
|
+
contractName: typeof ContractName;
|
|
46
|
+
newContractAddress: StringConstructor;
|
|
47
|
+
paramName: typeof ParamName;
|
|
48
|
+
newParamValue: NumberConstructor;
|
|
49
|
+
};
|
|
50
|
+
state: typeof BallotState;
|
|
51
|
+
reason: typeof BallotStateReason;
|
|
52
|
+
totalHoldedVotes: NumberConstructor;
|
|
53
|
+
quorum: NumberConstructor;
|
|
54
|
+
yes: NumberConstructor;
|
|
55
|
+
no: NumberConstructor;
|
|
56
|
+
voters: {
|
|
57
|
+
voter: StringConstructor;
|
|
58
|
+
yes: NumberConstructor;
|
|
59
|
+
}[];
|
|
60
|
+
};
|
|
61
|
+
export declare type BallotInfo = {
|
|
62
|
+
issuer: string;
|
|
63
|
+
depositAmount: number;
|
|
64
|
+
openDate: number;
|
|
65
|
+
closeDate: number;
|
|
66
|
+
execDate: number;
|
|
67
|
+
request: ModifyRequest;
|
|
68
|
+
state: BallotState;
|
|
69
|
+
reason: BallotStateReason;
|
|
70
|
+
totalHoldedVotes: number;
|
|
71
|
+
quorum: number;
|
|
72
|
+
yes: number;
|
|
73
|
+
no: number;
|
|
74
|
+
voters: VoterInfo[];
|
|
75
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BallotInfoStructure = exports.VoterInfoStructure = exports.ModifyRequestStructure = exports.BallotStateReason = exports.BallotState = exports.ModifyRequestType = void 0;
|
|
4
|
+
var Superpro_1 = require("./Superpro");
|
|
5
|
+
var ModifyRequestType;
|
|
6
|
+
(function (ModifyRequestType) {
|
|
7
|
+
ModifyRequestType["NewContractAddress"] = "0";
|
|
8
|
+
ModifyRequestType["NewParamValue"] = "1";
|
|
9
|
+
})(ModifyRequestType = exports.ModifyRequestType || (exports.ModifyRequestType = {}));
|
|
10
|
+
var BallotState;
|
|
11
|
+
(function (BallotState) {
|
|
12
|
+
BallotState["InProgress"] = "0";
|
|
13
|
+
BallotState["Applied"] = "1";
|
|
14
|
+
BallotState["Rejected"] = "2";
|
|
15
|
+
})(BallotState = exports.BallotState || (exports.BallotState = {}));
|
|
16
|
+
var BallotStateReason;
|
|
17
|
+
(function (BallotStateReason) {
|
|
18
|
+
BallotStateReason["NoQuorum"] = "0";
|
|
19
|
+
BallotStateReason["MajorityDecision"] = "1";
|
|
20
|
+
})(BallotStateReason = exports.BallotStateReason || (exports.BallotStateReason = {}));
|
|
21
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
22
|
+
exports.ModifyRequestStructure = {
|
|
23
|
+
requestType: ModifyRequestType,
|
|
24
|
+
contractName: Superpro_1.ContractName,
|
|
25
|
+
newContractAddress: String,
|
|
26
|
+
paramName: Superpro_1.ParamName,
|
|
27
|
+
newParamValue: Number,
|
|
28
|
+
};
|
|
29
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
30
|
+
exports.VoterInfoStructure = {
|
|
31
|
+
voter: String,
|
|
32
|
+
yes: Number,
|
|
33
|
+
};
|
|
34
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
35
|
+
exports.BallotInfoStructure = {
|
|
36
|
+
issuer: String,
|
|
37
|
+
depositAmount: Number,
|
|
38
|
+
openDate: Number,
|
|
39
|
+
closeDate: Number,
|
|
40
|
+
execDate: Number,
|
|
41
|
+
request: exports.ModifyRequestStructure,
|
|
42
|
+
state: BallotState,
|
|
43
|
+
reason: BallotStateReason,
|
|
44
|
+
totalHoldedVotes: Number,
|
|
45
|
+
quorum: Number,
|
|
46
|
+
yes: Number,
|
|
47
|
+
no: Number,
|
|
48
|
+
voters: [exports.VoterInfoStructure],
|
|
49
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const EpochStructure: {
|
|
2
|
+
startDate: NumberConstructor;
|
|
3
|
+
endDate: NumberConstructor;
|
|
4
|
+
reward: NumberConstructor;
|
|
5
|
+
benchmark: NumberConstructor;
|
|
6
|
+
reparation: NumberConstructor;
|
|
7
|
+
reparationBenchmark: NumberConstructor;
|
|
8
|
+
};
|
|
9
|
+
export declare type Epoch = {
|
|
10
|
+
startDate: number;
|
|
11
|
+
endDate: number;
|
|
12
|
+
reward: number;
|
|
13
|
+
benchmark: number;
|
|
14
|
+
reparation: number;
|
|
15
|
+
reparationBenchmark: number;
|
|
16
|
+
};
|
|
17
|
+
export declare enum TcbStatus {
|
|
18
|
+
Inited = "0",
|
|
19
|
+
Completed = "1",
|
|
20
|
+
Banned = "2"
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TcbStatus = exports.EpochStructure = void 0;
|
|
4
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
5
|
+
exports.EpochStructure = {
|
|
6
|
+
startDate: Number,
|
|
7
|
+
endDate: Number,
|
|
8
|
+
reward: Number,
|
|
9
|
+
benchmark: Number,
|
|
10
|
+
reparation: Number,
|
|
11
|
+
reparationBenchmark: Number,
|
|
12
|
+
};
|
|
13
|
+
var TcbStatus;
|
|
14
|
+
(function (TcbStatus) {
|
|
15
|
+
TcbStatus["Inited"] = "0";
|
|
16
|
+
TcbStatus["Completed"] = "1";
|
|
17
|
+
TcbStatus["Banned"] = "2";
|
|
18
|
+
})(TcbStatus = exports.TcbStatus || (exports.TcbStatus = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare type OfferCreatedEvent = {
|
|
2
|
+
creator: string;
|
|
3
|
+
externalId: string;
|
|
4
|
+
offerId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type OrderCreatedEvent = {
|
|
7
|
+
consumer: string;
|
|
8
|
+
externalId: string;
|
|
9
|
+
offerId: string;
|
|
10
|
+
orderId: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type SubOrderCreatedEvent = {
|
|
13
|
+
consumer: string;
|
|
14
|
+
externalId: string;
|
|
15
|
+
subOfferId: string;
|
|
16
|
+
subOrderId: string;
|
|
17
|
+
parentOrderId: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Mark = void 0;
|
|
4
|
+
var Mark;
|
|
5
|
+
(function (Mark) {
|
|
6
|
+
Mark[Mark["None"] = 0] = "None";
|
|
7
|
+
Mark[Mark["Positive"] = 1] = "Positive";
|
|
8
|
+
Mark[Mark["Negative"] = 2] = "Negative";
|
|
9
|
+
})(Mark = exports.Mark || (exports.Mark = {}));
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare enum OfferType {
|
|
2
|
+
TeeOffer = "0",
|
|
3
|
+
Storage = "1",
|
|
4
|
+
Solution = "2",
|
|
5
|
+
Data = "3"
|
|
6
|
+
}
|
|
7
|
+
export declare enum OfferGroup {
|
|
8
|
+
Input = "0",
|
|
9
|
+
Processing = "1",
|
|
10
|
+
Output = "2"
|
|
11
|
+
}
|
|
12
|
+
export declare const OfferRestrictionsStructure: {
|
|
13
|
+
offers: StringConstructor[];
|
|
14
|
+
types: (typeof OfferType)[];
|
|
15
|
+
};
|
|
16
|
+
export declare type OfferRestrictions = {
|
|
17
|
+
offers: string[];
|
|
18
|
+
types: OfferType[];
|
|
19
|
+
};
|
|
20
|
+
export declare const OfferInfoStructure: {
|
|
21
|
+
name: StringConstructor;
|
|
22
|
+
group: typeof OfferGroup;
|
|
23
|
+
offerType: typeof OfferType;
|
|
24
|
+
cancelable: BooleanConstructor;
|
|
25
|
+
description: StringConstructor;
|
|
26
|
+
holdSum: StringConstructor;
|
|
27
|
+
restrictions: {
|
|
28
|
+
offers: StringConstructor[];
|
|
29
|
+
types: (typeof OfferType)[];
|
|
30
|
+
};
|
|
31
|
+
properties: StringConstructor;
|
|
32
|
+
maxDurationTimeMinutes: NumberConstructor;
|
|
33
|
+
input: StringConstructor;
|
|
34
|
+
output: StringConstructor;
|
|
35
|
+
allowedArgs: StringConstructor;
|
|
36
|
+
allowedAccounts: StringConstructor[];
|
|
37
|
+
argsPublicKey: StringConstructor;
|
|
38
|
+
resultResource: StringConstructor;
|
|
39
|
+
linkage: StringConstructor;
|
|
40
|
+
hash: StringConstructor;
|
|
41
|
+
};
|
|
42
|
+
export declare type OfferInfo = {
|
|
43
|
+
name: string;
|
|
44
|
+
group: OfferGroup;
|
|
45
|
+
offerType: OfferType;
|
|
46
|
+
cancelable: boolean;
|
|
47
|
+
description: string;
|
|
48
|
+
holdSum: string;
|
|
49
|
+
restrictions: OfferRestrictions;
|
|
50
|
+
properties: string;
|
|
51
|
+
maxDurationTimeMinutes: number;
|
|
52
|
+
input: string;
|
|
53
|
+
output: string;
|
|
54
|
+
allowedArgs: string;
|
|
55
|
+
allowedAccounts: string[];
|
|
56
|
+
argsPublicKey: string;
|
|
57
|
+
resultResource: string;
|
|
58
|
+
linkage: string;
|
|
59
|
+
hash: string;
|
|
60
|
+
};
|
|
61
|
+
export declare type OfferInfoV1 = OfferInfo & {
|
|
62
|
+
disabledAfter?: number;
|
|
63
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OfferInfoStructure = exports.OfferRestrictionsStructure = exports.OfferGroup = exports.OfferType = void 0;
|
|
4
|
+
var OfferType;
|
|
5
|
+
(function (OfferType) {
|
|
6
|
+
OfferType["TeeOffer"] = "0";
|
|
7
|
+
OfferType["Storage"] = "1";
|
|
8
|
+
OfferType["Solution"] = "2";
|
|
9
|
+
OfferType["Data"] = "3";
|
|
10
|
+
})(OfferType = exports.OfferType || (exports.OfferType = {}));
|
|
11
|
+
var OfferGroup;
|
|
12
|
+
(function (OfferGroup) {
|
|
13
|
+
OfferGroup["Input"] = "0";
|
|
14
|
+
OfferGroup["Processing"] = "1";
|
|
15
|
+
OfferGroup["Output"] = "2";
|
|
16
|
+
})(OfferGroup = exports.OfferGroup || (exports.OfferGroup = {}));
|
|
17
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
18
|
+
exports.OfferRestrictionsStructure = {
|
|
19
|
+
offers: [String],
|
|
20
|
+
types: [OfferType],
|
|
21
|
+
};
|
|
22
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
23
|
+
exports.OfferInfoStructure = {
|
|
24
|
+
name: String,
|
|
25
|
+
group: OfferGroup,
|
|
26
|
+
offerType: OfferType,
|
|
27
|
+
cancelable: Boolean,
|
|
28
|
+
description: String,
|
|
29
|
+
holdSum: String,
|
|
30
|
+
restrictions: exports.OfferRestrictionsStructure,
|
|
31
|
+
properties: String,
|
|
32
|
+
maxDurationTimeMinutes: Number,
|
|
33
|
+
input: String,
|
|
34
|
+
output: String,
|
|
35
|
+
allowedArgs: String,
|
|
36
|
+
allowedAccounts: [String],
|
|
37
|
+
argsPublicKey: String,
|
|
38
|
+
resultResource: String,
|
|
39
|
+
linkage: String,
|
|
40
|
+
hash: String,
|
|
41
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare enum OrderStatus {
|
|
2
|
+
New = "0",
|
|
3
|
+
Processing = "1",
|
|
4
|
+
Canceling = "2",
|
|
5
|
+
Canceled = "3",
|
|
6
|
+
Done = "4",
|
|
7
|
+
Error = "5",
|
|
8
|
+
Blocked = "6",
|
|
9
|
+
Suspended = "7",
|
|
10
|
+
AwaitingPayment = "8"
|
|
11
|
+
}
|
|
12
|
+
export declare const OrderArgsStructure: {
|
|
13
|
+
slots: NumberConstructor;
|
|
14
|
+
inputOffers: StringConstructor[];
|
|
15
|
+
selectedOffers: StringConstructor[];
|
|
16
|
+
};
|
|
17
|
+
export declare type OrderArgs = {
|
|
18
|
+
slots: number;
|
|
19
|
+
inputOffers: string[];
|
|
20
|
+
selectedOffers: string[];
|
|
21
|
+
};
|
|
22
|
+
export declare const OrderInfoStructure: {
|
|
23
|
+
offer: StringConstructor;
|
|
24
|
+
resultPublicKey: StringConstructor;
|
|
25
|
+
encryptedRequirements: StringConstructor;
|
|
26
|
+
encryptedArgs: StringConstructor;
|
|
27
|
+
status: typeof OrderStatus;
|
|
28
|
+
args: {
|
|
29
|
+
slots: NumberConstructor;
|
|
30
|
+
inputOffers: StringConstructor[];
|
|
31
|
+
selectedOffers: StringConstructor[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare type OrderInfo = {
|
|
35
|
+
offer: string;
|
|
36
|
+
resultPublicKey: string;
|
|
37
|
+
encryptedRequirements: string;
|
|
38
|
+
encryptedArgs: string;
|
|
39
|
+
status: OrderStatus;
|
|
40
|
+
args: OrderArgs;
|
|
41
|
+
};
|
|
42
|
+
export declare type ExtendedOrderInfo = OrderInfo & {
|
|
43
|
+
blocking: boolean;
|
|
44
|
+
externalId: string;
|
|
45
|
+
holdSum: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const OrderResultStructure: {
|
|
48
|
+
encryptedResult: StringConstructor;
|
|
49
|
+
encryptedError: StringConstructor;
|
|
50
|
+
orderPrice: StringConstructor;
|
|
51
|
+
};
|
|
52
|
+
export declare type OrderResult = {
|
|
53
|
+
encryptedResult: string;
|
|
54
|
+
encryptedError: string;
|
|
55
|
+
orderPrice: string;
|
|
56
|
+
};
|
|
57
|
+
export declare type SubOrderParams = {
|
|
58
|
+
blockParentOrder: Boolean;
|
|
59
|
+
externalId: string;
|
|
60
|
+
holdSum: string;
|
|
61
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderResultStructure = exports.OrderInfoStructure = exports.OrderArgsStructure = exports.OrderStatus = void 0;
|
|
4
|
+
var OrderStatus;
|
|
5
|
+
(function (OrderStatus) {
|
|
6
|
+
OrderStatus["New"] = "0";
|
|
7
|
+
OrderStatus["Processing"] = "1";
|
|
8
|
+
OrderStatus["Canceling"] = "2";
|
|
9
|
+
OrderStatus["Canceled"] = "3";
|
|
10
|
+
OrderStatus["Done"] = "4";
|
|
11
|
+
OrderStatus["Error"] = "5";
|
|
12
|
+
OrderStatus["Blocked"] = "6";
|
|
13
|
+
OrderStatus["Suspended"] = "7";
|
|
14
|
+
OrderStatus["AwaitingPayment"] = "8";
|
|
15
|
+
})(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {}));
|
|
16
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
17
|
+
exports.OrderArgsStructure = {
|
|
18
|
+
slots: Number,
|
|
19
|
+
inputOffers: [String],
|
|
20
|
+
selectedOffers: [String],
|
|
21
|
+
};
|
|
22
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
23
|
+
exports.OrderInfoStructure = {
|
|
24
|
+
offer: String,
|
|
25
|
+
resultPublicKey: String,
|
|
26
|
+
encryptedRequirements: String,
|
|
27
|
+
encryptedArgs: String,
|
|
28
|
+
status: OrderStatus,
|
|
29
|
+
args: exports.OrderArgsStructure,
|
|
30
|
+
};
|
|
31
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
32
|
+
exports.OrderResultStructure = {
|
|
33
|
+
encryptedResult: String,
|
|
34
|
+
encryptedError: String,
|
|
35
|
+
orderPrice: String,
|
|
36
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const OriginsStructure: {
|
|
2
|
+
createdDate: NumberConstructor;
|
|
3
|
+
createdBy: StringConstructor;
|
|
4
|
+
modifiedDate: NumberConstructor;
|
|
5
|
+
modifiedBy: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
export declare type Origins = {
|
|
8
|
+
createdDate: number;
|
|
9
|
+
createdBy: string;
|
|
10
|
+
modifiedDate: number;
|
|
11
|
+
modifiedBy: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OriginsStructure = void 0;
|
|
4
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
5
|
+
exports.OriginsStructure = {
|
|
6
|
+
createdDate: Number,
|
|
7
|
+
createdBy: String,
|
|
8
|
+
modifiedDate: Number,
|
|
9
|
+
modifiedBy: String,
|
|
10
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const ProviderInfoStructure: {
|
|
2
|
+
tokenReceiver: StringConstructor;
|
|
3
|
+
actionAccount: StringConstructor;
|
|
4
|
+
name: StringConstructor;
|
|
5
|
+
description: StringConstructor;
|
|
6
|
+
metadata: StringConstructor;
|
|
7
|
+
};
|
|
8
|
+
export declare const ProviderInfoStructureV2: {
|
|
9
|
+
tokenReceiver: StringConstructor;
|
|
10
|
+
actionAccount: StringConstructor;
|
|
11
|
+
name: StringConstructor;
|
|
12
|
+
description: StringConstructor;
|
|
13
|
+
metadata: StringConstructor;
|
|
14
|
+
externalId: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
export declare type ProviderInfo = {
|
|
17
|
+
tokenReceiver: string;
|
|
18
|
+
actionAccount: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
metadata: string;
|
|
22
|
+
};
|
|
23
|
+
export declare type ProviderInfoV2 = ProviderInfo & {
|
|
24
|
+
externalId?: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProviderInfoStructureV2 = exports.ProviderInfoStructure = void 0;
|
|
4
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
5
|
+
exports.ProviderInfoStructure = {
|
|
6
|
+
tokenReceiver: String,
|
|
7
|
+
actionAccount: String,
|
|
8
|
+
name: String,
|
|
9
|
+
description: String,
|
|
10
|
+
metadata: String,
|
|
11
|
+
};
|
|
12
|
+
exports.ProviderInfoStructureV2 = {
|
|
13
|
+
tokenReceiver: String,
|
|
14
|
+
actionAccount: String,
|
|
15
|
+
name: String,
|
|
16
|
+
description: String,
|
|
17
|
+
metadata: String,
|
|
18
|
+
externalId: String
|
|
19
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const StakeInfoStructure: {
|
|
2
|
+
startDate: NumberConstructor;
|
|
3
|
+
amount: NumberConstructor;
|
|
4
|
+
profit: NumberConstructor;
|
|
5
|
+
totalLocked: NumberConstructor;
|
|
6
|
+
};
|
|
7
|
+
export declare type StakeInfo = {
|
|
8
|
+
startDate: number;
|
|
9
|
+
amount: number;
|
|
10
|
+
profit: number;
|
|
11
|
+
totalLocked: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const LockInfoStructure: {
|
|
14
|
+
fromDate: NumberConstructor;
|
|
15
|
+
toDate: NumberConstructor;
|
|
16
|
+
amount: NumberConstructor;
|
|
17
|
+
};
|
|
18
|
+
export declare type LockInfo = {
|
|
19
|
+
fromDate: number;
|
|
20
|
+
toDate: number;
|
|
21
|
+
amount: number;
|
|
22
|
+
};
|
|
23
|
+
export declare enum Purpose {
|
|
24
|
+
Providers = "0",
|
|
25
|
+
Orders = "1",
|
|
26
|
+
Consensus = "2"
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Purpose = exports.LockInfoStructure = exports.StakeInfoStructure = void 0;
|
|
4
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
5
|
+
exports.StakeInfoStructure = {
|
|
6
|
+
startDate: Number,
|
|
7
|
+
amount: Number,
|
|
8
|
+
profit: Number,
|
|
9
|
+
totalLocked: Number,
|
|
10
|
+
};
|
|
11
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
12
|
+
exports.LockInfoStructure = {
|
|
13
|
+
fromDate: Number,
|
|
14
|
+
toDate: Number,
|
|
15
|
+
amount: Number,
|
|
16
|
+
};
|
|
17
|
+
var Purpose;
|
|
18
|
+
(function (Purpose) {
|
|
19
|
+
Purpose["Providers"] = "0";
|
|
20
|
+
Purpose["Orders"] = "1";
|
|
21
|
+
Purpose["Consensus"] = "2";
|
|
22
|
+
})(Purpose = exports.Purpose || (exports.Purpose = {}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum ContractName {
|
|
2
|
+
Orders = "0",
|
|
3
|
+
ProviderRegistry = "1",
|
|
4
|
+
Staking = "2",
|
|
5
|
+
Superpro = "3",
|
|
6
|
+
TeeOffersFactory = "4",
|
|
7
|
+
Token = "5",
|
|
8
|
+
ValueOffersFactory = "6",
|
|
9
|
+
Voting = "7",
|
|
10
|
+
Consensus = "8",
|
|
11
|
+
Suspicious = "9",
|
|
12
|
+
LastBlocks = "10",
|
|
13
|
+
Epochs = "11"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ParamName {
|
|
16
|
+
OrderMinimumDeposit = "0",
|
|
17
|
+
ProfitWithdrawDelaySeconds = "1",
|
|
18
|
+
MinSecDeposit = "2",
|
|
19
|
+
StakingPercentPerDay = "3",
|
|
20
|
+
StopDelaySeconds = "4",
|
|
21
|
+
TeeOfferSecDeposit = "5",
|
|
22
|
+
OfferSecDeposit = "6",
|
|
23
|
+
TeeRewardPerEpoch = "7"
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParamName = exports.ContractName = void 0;
|
|
4
|
+
var ContractName;
|
|
5
|
+
(function (ContractName) {
|
|
6
|
+
ContractName["Orders"] = "0";
|
|
7
|
+
ContractName["ProviderRegistry"] = "1";
|
|
8
|
+
ContractName["Staking"] = "2";
|
|
9
|
+
ContractName["Superpro"] = "3";
|
|
10
|
+
ContractName["TeeOffersFactory"] = "4";
|
|
11
|
+
ContractName["Token"] = "5";
|
|
12
|
+
ContractName["ValueOffersFactory"] = "6";
|
|
13
|
+
ContractName["Voting"] = "7";
|
|
14
|
+
ContractName["Consensus"] = "8";
|
|
15
|
+
ContractName["Suspicious"] = "9";
|
|
16
|
+
ContractName["LastBlocks"] = "10";
|
|
17
|
+
ContractName["Epochs"] = "11";
|
|
18
|
+
})(ContractName = exports.ContractName || (exports.ContractName = {}));
|
|
19
|
+
var ParamName;
|
|
20
|
+
(function (ParamName) {
|
|
21
|
+
ParamName["OrderMinimumDeposit"] = "0";
|
|
22
|
+
ParamName["ProfitWithdrawDelaySeconds"] = "1";
|
|
23
|
+
ParamName["MinSecDeposit"] = "2";
|
|
24
|
+
ParamName["StakingPercentPerDay"] = "3";
|
|
25
|
+
ParamName["StopDelaySeconds"] = "4";
|
|
26
|
+
ParamName["TeeOfferSecDeposit"] = "5";
|
|
27
|
+
ParamName["OfferSecDeposit"] = "6";
|
|
28
|
+
ParamName["TeeRewardPerEpoch"] = "7";
|
|
29
|
+
})(ParamName = exports.ParamName || (exports.ParamName = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum LType {
|
|
2
|
+
L1 = "0",
|
|
3
|
+
L2 = "1"
|
|
4
|
+
}
|
|
5
|
+
export declare const PublicDataStructure: {
|
|
6
|
+
teeOffer: StringConstructor;
|
|
7
|
+
deviceID: StringConstructor;
|
|
8
|
+
benchmark: NumberConstructor;
|
|
9
|
+
properties: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
export declare type PublicData = {
|
|
12
|
+
teeOffer: string;
|
|
13
|
+
deviceID: string;
|
|
14
|
+
benchmark: number;
|
|
15
|
+
properties: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const TcbEpochInfoStructure: {
|
|
18
|
+
index: NumberConstructor;
|
|
19
|
+
valid: BooleanConstructor;
|
|
20
|
+
reparation: BooleanConstructor;
|
|
21
|
+
};
|
|
22
|
+
export declare type TcbEpochInfo = {
|
|
23
|
+
index: number;
|
|
24
|
+
valid: boolean;
|
|
25
|
+
reparation: boolean;
|
|
26
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TcbEpochInfoStructure = exports.PublicDataStructure = exports.LType = void 0;
|
|
4
|
+
var LType;
|
|
5
|
+
(function (LType) {
|
|
6
|
+
LType["L1"] = "0";
|
|
7
|
+
LType["L2"] = "1";
|
|
8
|
+
})(LType = exports.LType || (exports.LType = {}));
|
|
9
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
10
|
+
exports.PublicDataStructure = {
|
|
11
|
+
teeOffer: String,
|
|
12
|
+
deviceID: String,
|
|
13
|
+
benchmark: Number,
|
|
14
|
+
properties: String,
|
|
15
|
+
};
|
|
16
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
17
|
+
exports.TcbEpochInfoStructure = {
|
|
18
|
+
index: Number,
|
|
19
|
+
valid: Boolean,
|
|
20
|
+
reparation: Boolean,
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const TeeOfferInfoStructure: {
|
|
2
|
+
name: StringConstructor;
|
|
3
|
+
description: StringConstructor;
|
|
4
|
+
teeType: StringConstructor;
|
|
5
|
+
slots: NumberConstructor;
|
|
6
|
+
minTimeMinutes: NumberConstructor;
|
|
7
|
+
properties: StringConstructor;
|
|
8
|
+
tcb: StringConstructor;
|
|
9
|
+
tlb: StringConstructor;
|
|
10
|
+
argsPublicKey: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
export declare type TeeOfferInfo = {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
teeType: string;
|
|
16
|
+
slots: number;
|
|
17
|
+
minTimeMinutes: number;
|
|
18
|
+
properties: string;
|
|
19
|
+
tcb: string;
|
|
20
|
+
tlb: string;
|
|
21
|
+
argsPublicKey: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TeeOfferInfoStructure = void 0;
|
|
4
|
+
// Order of keys and type conversion functions for this object in blockchain contract
|
|
5
|
+
exports.TeeOfferInfoStructure = {
|
|
6
|
+
name: String,
|
|
7
|
+
description: String,
|
|
8
|
+
teeType: String,
|
|
9
|
+
slots: Number,
|
|
10
|
+
minTimeMinutes: Number,
|
|
11
|
+
properties: String,
|
|
12
|
+
tcb: String,
|
|
13
|
+
tlb: String,
|
|
14
|
+
argsPublicKey: String,
|
|
15
|
+
};
|