@super-protocol/sdk-js 0.9.0-beta.2 → 0.10.1-beta.2
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/contracts/app.json
CHANGED
|
@@ -3488,6 +3488,24 @@
|
|
|
3488
3488
|
"stateMutability": "nonpayable",
|
|
3489
3489
|
"type": "function"
|
|
3490
3490
|
},
|
|
3491
|
+
{
|
|
3492
|
+
"inputs": [
|
|
3493
|
+
{
|
|
3494
|
+
"internalType": "address",
|
|
3495
|
+
"name": "consumer",
|
|
3496
|
+
"type": "address"
|
|
3497
|
+
},
|
|
3498
|
+
{
|
|
3499
|
+
"internalType": "uint256",
|
|
3500
|
+
"name": "orderId",
|
|
3501
|
+
"type": "uint256"
|
|
3502
|
+
}
|
|
3503
|
+
],
|
|
3504
|
+
"name": "cancelOrderByApp",
|
|
3505
|
+
"outputs": [],
|
|
3506
|
+
"stateMutability": "nonpayable",
|
|
3507
|
+
"type": "function"
|
|
3508
|
+
},
|
|
3491
3509
|
{
|
|
3492
3510
|
"inputs": [
|
|
3493
3511
|
{
|
|
@@ -3561,6 +3579,11 @@
|
|
|
3561
3579
|
"internalType": "struct OrderArgs",
|
|
3562
3580
|
"name": "args",
|
|
3563
3581
|
"type": "tuple"
|
|
3582
|
+
},
|
|
3583
|
+
{
|
|
3584
|
+
"internalType": "bytes32",
|
|
3585
|
+
"name": "externalId",
|
|
3586
|
+
"type": "bytes32"
|
|
3564
3587
|
}
|
|
3565
3588
|
],
|
|
3566
3589
|
"internalType": "struct OrderInfo",
|
|
@@ -3576,11 +3599,6 @@
|
|
|
3576
3599
|
"internalType": "bool",
|
|
3577
3600
|
"name": "suspended",
|
|
3578
3601
|
"type": "bool"
|
|
3579
|
-
},
|
|
3580
|
-
{
|
|
3581
|
-
"internalType": "bytes32",
|
|
3582
|
-
"name": "externalId",
|
|
3583
|
-
"type": "bytes32"
|
|
3584
3602
|
}
|
|
3585
3603
|
],
|
|
3586
3604
|
"name": "createOrder",
|
|
@@ -3649,6 +3667,11 @@
|
|
|
3649
3667
|
"internalType": "struct OrderArgs",
|
|
3650
3668
|
"name": "args",
|
|
3651
3669
|
"type": "tuple"
|
|
3670
|
+
},
|
|
3671
|
+
{
|
|
3672
|
+
"internalType": "bytes32",
|
|
3673
|
+
"name": "externalId",
|
|
3674
|
+
"type": "bytes32"
|
|
3652
3675
|
}
|
|
3653
3676
|
],
|
|
3654
3677
|
"internalType": "struct OrderInfo",
|
|
@@ -3664,11 +3687,6 @@
|
|
|
3664
3687
|
"internalType": "bool",
|
|
3665
3688
|
"name": "suspended",
|
|
3666
3689
|
"type": "bool"
|
|
3667
|
-
},
|
|
3668
|
-
{
|
|
3669
|
-
"internalType": "bytes32",
|
|
3670
|
-
"name": "externalId",
|
|
3671
|
-
"type": "bytes32"
|
|
3672
3690
|
}
|
|
3673
3691
|
],
|
|
3674
3692
|
"name": "createOrderByApp",
|
|
@@ -3737,6 +3755,11 @@
|
|
|
3737
3755
|
"internalType": "struct OrderArgs",
|
|
3738
3756
|
"name": "args",
|
|
3739
3757
|
"type": "tuple"
|
|
3758
|
+
},
|
|
3759
|
+
{
|
|
3760
|
+
"internalType": "bytes32",
|
|
3761
|
+
"name": "externalId",
|
|
3762
|
+
"type": "bytes32"
|
|
3740
3763
|
}
|
|
3741
3764
|
],
|
|
3742
3765
|
"internalType": "struct OrderInfo",
|
|
@@ -3750,11 +3773,6 @@
|
|
|
3750
3773
|
"name": "blockParentOrder",
|
|
3751
3774
|
"type": "bool"
|
|
3752
3775
|
},
|
|
3753
|
-
{
|
|
3754
|
-
"internalType": "bytes32",
|
|
3755
|
-
"name": "externalId",
|
|
3756
|
-
"type": "bytes32"
|
|
3757
|
-
},
|
|
3758
3776
|
{
|
|
3759
3777
|
"internalType": "uint256",
|
|
3760
3778
|
"name": "holdSum",
|
|
@@ -3837,6 +3855,11 @@
|
|
|
3837
3855
|
"internalType": "struct OrderArgs",
|
|
3838
3856
|
"name": "args",
|
|
3839
3857
|
"type": "tuple"
|
|
3858
|
+
},
|
|
3859
|
+
{
|
|
3860
|
+
"internalType": "bytes32",
|
|
3861
|
+
"name": "externalId",
|
|
3862
|
+
"type": "bytes32"
|
|
3840
3863
|
}
|
|
3841
3864
|
],
|
|
3842
3865
|
"internalType": "struct OrderInfo",
|
|
@@ -3850,11 +3873,6 @@
|
|
|
3850
3873
|
"name": "blockParentOrder",
|
|
3851
3874
|
"type": "bool"
|
|
3852
3875
|
},
|
|
3853
|
-
{
|
|
3854
|
-
"internalType": "bytes32",
|
|
3855
|
-
"name": "externalId",
|
|
3856
|
-
"type": "bytes32"
|
|
3857
|
-
},
|
|
3858
3876
|
{
|
|
3859
3877
|
"internalType": "uint256",
|
|
3860
3878
|
"name": "holdSum",
|
|
@@ -4099,6 +4117,24 @@
|
|
|
4099
4117
|
"stateMutability": "nonpayable",
|
|
4100
4118
|
"type": "function"
|
|
4101
4119
|
},
|
|
4120
|
+
{
|
|
4121
|
+
"inputs": [
|
|
4122
|
+
{
|
|
4123
|
+
"internalType": "address",
|
|
4124
|
+
"name": "consumer",
|
|
4125
|
+
"type": "address"
|
|
4126
|
+
},
|
|
4127
|
+
{
|
|
4128
|
+
"internalType": "uint256",
|
|
4129
|
+
"name": "orderId",
|
|
4130
|
+
"type": "uint256"
|
|
4131
|
+
}
|
|
4132
|
+
],
|
|
4133
|
+
"name": "withdrawChangeByApp",
|
|
4134
|
+
"outputs": [],
|
|
4135
|
+
"stateMutability": "nonpayable",
|
|
4136
|
+
"type": "function"
|
|
4137
|
+
},
|
|
4102
4138
|
{
|
|
4103
4139
|
"inputs": [
|
|
4104
4140
|
{
|
|
@@ -4270,6 +4306,11 @@
|
|
|
4270
4306
|
"internalType": "struct OrderArgs",
|
|
4271
4307
|
"name": "args",
|
|
4272
4308
|
"type": "tuple"
|
|
4309
|
+
},
|
|
4310
|
+
{
|
|
4311
|
+
"internalType": "bytes32",
|
|
4312
|
+
"name": "externalId",
|
|
4313
|
+
"type": "bytes32"
|
|
4273
4314
|
}
|
|
4274
4315
|
],
|
|
4275
4316
|
"internalType": "struct OrderInfo",
|
|
@@ -5920,6 +5961,19 @@
|
|
|
5920
5961
|
"name": "WorkflowCreated",
|
|
5921
5962
|
"type": "event"
|
|
5922
5963
|
},
|
|
5964
|
+
{
|
|
5965
|
+
"inputs": [
|
|
5966
|
+
{
|
|
5967
|
+
"internalType": "uint256",
|
|
5968
|
+
"name": "parentOrderId",
|
|
5969
|
+
"type": "uint256"
|
|
5970
|
+
}
|
|
5971
|
+
],
|
|
5972
|
+
"name": "cancelWorkflow",
|
|
5973
|
+
"outputs": [],
|
|
5974
|
+
"stateMutability": "nonpayable",
|
|
5975
|
+
"type": "function"
|
|
5976
|
+
},
|
|
5923
5977
|
{
|
|
5924
5978
|
"inputs": [
|
|
5925
5979
|
{
|
|
@@ -5970,6 +6024,11 @@
|
|
|
5970
6024
|
"internalType": "struct OrderArgs",
|
|
5971
6025
|
"name": "args",
|
|
5972
6026
|
"type": "tuple"
|
|
6027
|
+
},
|
|
6028
|
+
{
|
|
6029
|
+
"internalType": "bytes32",
|
|
6030
|
+
"name": "externalId",
|
|
6031
|
+
"type": "bytes32"
|
|
5973
6032
|
}
|
|
5974
6033
|
],
|
|
5975
6034
|
"internalType": "struct OrderInfo",
|
|
@@ -5981,11 +6040,6 @@
|
|
|
5981
6040
|
"name": "holdDeposit",
|
|
5982
6041
|
"type": "uint256"
|
|
5983
6042
|
},
|
|
5984
|
-
{
|
|
5985
|
-
"internalType": "bytes32",
|
|
5986
|
-
"name": "externalId",
|
|
5987
|
-
"type": "bytes32"
|
|
5988
|
-
},
|
|
5989
6043
|
{
|
|
5990
6044
|
"components": [
|
|
5991
6045
|
{
|
|
@@ -6034,6 +6088,11 @@
|
|
|
6034
6088
|
"internalType": "struct OrderArgs",
|
|
6035
6089
|
"name": "args",
|
|
6036
6090
|
"type": "tuple"
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
"internalType": "bytes32",
|
|
6094
|
+
"name": "externalId",
|
|
6095
|
+
"type": "bytes32"
|
|
6037
6096
|
}
|
|
6038
6097
|
],
|
|
6039
6098
|
"internalType": "struct OrderInfo[]",
|
|
@@ -6046,6 +6105,19 @@
|
|
|
6046
6105
|
"stateMutability": "nonpayable",
|
|
6047
6106
|
"type": "function"
|
|
6048
6107
|
},
|
|
6108
|
+
{
|
|
6109
|
+
"inputs": [
|
|
6110
|
+
{
|
|
6111
|
+
"internalType": "uint256",
|
|
6112
|
+
"name": "parentOrderId",
|
|
6113
|
+
"type": "uint256"
|
|
6114
|
+
}
|
|
6115
|
+
],
|
|
6116
|
+
"name": "withdrawWorkflowChange",
|
|
6117
|
+
"outputs": [],
|
|
6118
|
+
"stateMutability": "nonpayable",
|
|
6119
|
+
"type": "function"
|
|
6120
|
+
},
|
|
6049
6121
|
{
|
|
6050
6122
|
"anonymous": false,
|
|
6051
6123
|
"inputs": [
|
|
@@ -7594,6 +7666,24 @@
|
|
|
7594
7666
|
"stateMutability": "nonpayable",
|
|
7595
7667
|
"type": "function"
|
|
7596
7668
|
},
|
|
7669
|
+
{
|
|
7670
|
+
"inputs": [
|
|
7671
|
+
{
|
|
7672
|
+
"internalType": "address",
|
|
7673
|
+
"name": "consumer",
|
|
7674
|
+
"type": "address"
|
|
7675
|
+
},
|
|
7676
|
+
{
|
|
7677
|
+
"internalType": "uint256",
|
|
7678
|
+
"name": "orderId",
|
|
7679
|
+
"type": "uint256"
|
|
7680
|
+
}
|
|
7681
|
+
],
|
|
7682
|
+
"name": "cancelOrderByApp",
|
|
7683
|
+
"outputs": [],
|
|
7684
|
+
"stateMutability": "nonpayable",
|
|
7685
|
+
"type": "function"
|
|
7686
|
+
},
|
|
7597
7687
|
{
|
|
7598
7688
|
"inputs": [
|
|
7599
7689
|
{
|
|
@@ -7649,6 +7739,11 @@
|
|
|
7649
7739
|
"internalType": "struct OrderArgs",
|
|
7650
7740
|
"name": "args",
|
|
7651
7741
|
"type": "tuple"
|
|
7742
|
+
},
|
|
7743
|
+
{
|
|
7744
|
+
"internalType": "bytes32",
|
|
7745
|
+
"name": "externalId",
|
|
7746
|
+
"type": "bytes32"
|
|
7652
7747
|
}
|
|
7653
7748
|
],
|
|
7654
7749
|
"internalType": "struct OrderInfo",
|
|
@@ -7664,11 +7759,6 @@
|
|
|
7664
7759
|
"internalType": "bool",
|
|
7665
7760
|
"name": "suspended",
|
|
7666
7761
|
"type": "bool"
|
|
7667
|
-
},
|
|
7668
|
-
{
|
|
7669
|
-
"internalType": "bytes32",
|
|
7670
|
-
"name": "externalId",
|
|
7671
|
-
"type": "bytes32"
|
|
7672
7762
|
}
|
|
7673
7763
|
],
|
|
7674
7764
|
"name": "createOrderByApp",
|
|
@@ -7742,6 +7832,11 @@
|
|
|
7742
7832
|
"internalType": "struct OrderArgs",
|
|
7743
7833
|
"name": "args",
|
|
7744
7834
|
"type": "tuple"
|
|
7835
|
+
},
|
|
7836
|
+
{
|
|
7837
|
+
"internalType": "bytes32",
|
|
7838
|
+
"name": "externalId",
|
|
7839
|
+
"type": "bytes32"
|
|
7745
7840
|
}
|
|
7746
7841
|
],
|
|
7747
7842
|
"internalType": "struct OrderInfo",
|
|
@@ -7755,11 +7850,6 @@
|
|
|
7755
7850
|
"name": "blockParentOrder",
|
|
7756
7851
|
"type": "bool"
|
|
7757
7852
|
},
|
|
7758
|
-
{
|
|
7759
|
-
"internalType": "bytes32",
|
|
7760
|
-
"name": "externalId",
|
|
7761
|
-
"type": "bytes32"
|
|
7762
|
-
},
|
|
7763
7853
|
{
|
|
7764
7854
|
"internalType": "uint256",
|
|
7765
7855
|
"name": "holdSum",
|
|
@@ -7845,6 +7935,11 @@
|
|
|
7845
7935
|
"internalType": "struct OrderArgs",
|
|
7846
7936
|
"name": "args",
|
|
7847
7937
|
"type": "tuple"
|
|
7938
|
+
},
|
|
7939
|
+
{
|
|
7940
|
+
"internalType": "bytes32",
|
|
7941
|
+
"name": "externalId",
|
|
7942
|
+
"type": "bytes32"
|
|
7848
7943
|
}
|
|
7849
7944
|
],
|
|
7850
7945
|
"internalType": "struct OrderInfo",
|
|
@@ -7890,6 +7985,24 @@
|
|
|
7890
7985
|
"stateMutability": "nonpayable",
|
|
7891
7986
|
"type": "function"
|
|
7892
7987
|
},
|
|
7988
|
+
{
|
|
7989
|
+
"inputs": [
|
|
7990
|
+
{
|
|
7991
|
+
"internalType": "address",
|
|
7992
|
+
"name": "sender",
|
|
7993
|
+
"type": "address"
|
|
7994
|
+
},
|
|
7995
|
+
{
|
|
7996
|
+
"internalType": "uint256",
|
|
7997
|
+
"name": "orderId",
|
|
7998
|
+
"type": "uint256"
|
|
7999
|
+
}
|
|
8000
|
+
],
|
|
8001
|
+
"name": "withdrawChangeByApp",
|
|
8002
|
+
"outputs": [],
|
|
8003
|
+
"stateMutability": "nonpayable",
|
|
8004
|
+
"type": "function"
|
|
8005
|
+
},
|
|
7893
8006
|
{
|
|
7894
8007
|
"inputs": [
|
|
7895
8008
|
{
|
|
@@ -7991,6 +8104,11 @@
|
|
|
7991
8104
|
"internalType": "struct OrderArgs",
|
|
7992
8105
|
"name": "args",
|
|
7993
8106
|
"type": "tuple"
|
|
8107
|
+
},
|
|
8108
|
+
{
|
|
8109
|
+
"internalType": "bytes32",
|
|
8110
|
+
"name": "externalId",
|
|
8111
|
+
"type": "bytes32"
|
|
7994
8112
|
}
|
|
7995
8113
|
],
|
|
7996
8114
|
"internalType": "struct OrderInfo",
|
package/build/models/Order.d.ts
CHANGED
|
@@ -107,7 +107,7 @@ declare class Order {
|
|
|
107
107
|
* @param transactionOptions - object what contains alternative action account or gas limit (optional)
|
|
108
108
|
* @returns {Promise<void>} - Does not return id of created sub order!
|
|
109
109
|
*/
|
|
110
|
-
createSubOrder(subOrderInfo: OrderInfo, blocking: boolean,
|
|
110
|
+
createSubOrder(subOrderInfo: OrderInfo, blocking: boolean, holdSum?: string, transactionOptions?: TransactionOptions): Promise<void>;
|
|
111
111
|
/**
|
|
112
112
|
* Function for creating pack of sub orders (wokflow) for current order
|
|
113
113
|
* @param subOrdersInfo - orders info for new subOrders
|
package/build/models/Order.js
CHANGED
|
@@ -408,21 +408,18 @@ var Order = /** @class */ (function () {
|
|
|
408
408
|
* @param transactionOptions - object what contains alternative action account or gas limit (optional)
|
|
409
409
|
* @returns {Promise<void>} - Does not return id of created sub order!
|
|
410
410
|
*/
|
|
411
|
-
Order.prototype.createSubOrder = function (subOrderInfo, blocking,
|
|
412
|
-
if (externalId === void 0) { externalId = "default"; }
|
|
411
|
+
Order.prototype.createSubOrder = function (subOrderInfo, blocking, holdSum, transactionOptions) {
|
|
413
412
|
if (holdSum === void 0) { holdSum = '0'; }
|
|
414
413
|
return __awaiter(this, void 0, void 0, function () {
|
|
415
|
-
var tupleSubOrder,
|
|
414
|
+
var tupleSubOrder, params;
|
|
416
415
|
return __generator(this, function (_a) {
|
|
417
416
|
switch (_a.label) {
|
|
418
417
|
case 0:
|
|
419
418
|
transactionOptions !== null && transactionOptions !== void 0 ? transactionOptions : this.checkInitOrder(transactionOptions);
|
|
420
419
|
(0, utils_1.checkIfActionAccountInitialized)(transactionOptions);
|
|
421
420
|
tupleSubOrder = (0, utils_1.objectToTuple)(subOrderInfo, Order_1.OrderInfoStructure);
|
|
422
|
-
formattedExternalId = (0, utils_2.formatBytes32String)(externalId);
|
|
423
421
|
params = {
|
|
424
422
|
blockParentOrder: blocking,
|
|
425
|
-
externalId: formattedExternalId,
|
|
426
423
|
holdSum: holdSum,
|
|
427
424
|
};
|
|
428
425
|
return [4 /*yield*/, TxManager_1.default.execute(Order.contract.methods.createSubOrder, [this.id, tupleSubOrder, params], transactionOptions)];
|
|
@@ -452,10 +449,8 @@ var Order = /** @class */ (function () {
|
|
|
452
449
|
promises = subOrdersInfo.map(function (subOrderInfo) {
|
|
453
450
|
return new Promise(function (res, rej) {
|
|
454
451
|
var tupleSubOrder = (0, utils_1.objectToTuple)(subOrderInfo, Order_1.OrderInfoStructure);
|
|
455
|
-
var formattedExternalId = (0, utils_2.formatBytes32String)(subOrderInfo.externalId);
|
|
456
452
|
var params = {
|
|
457
453
|
blockParentOrder: subOrderInfo.blocking,
|
|
458
|
-
externalId: formattedExternalId,
|
|
459
454
|
holdSum: subOrderInfo.holdSum,
|
|
460
455
|
};
|
|
461
456
|
var request = Order.contract.methods.createSubOrder(_this.id, tupleSubOrder, params).send.request({
|
|
@@ -26,7 +26,7 @@ declare class OrdersFactory {
|
|
|
26
26
|
* @param transactionOptions - object what contains alternative action account or gas limit (optional)
|
|
27
27
|
* @returns {Promise<void>} - Does not return id of created order!
|
|
28
28
|
*/
|
|
29
|
-
static createOrder(orderInfo: OrderInfo, holdDeposit?: string, suspended?: boolean,
|
|
29
|
+
static createOrder(orderInfo: OrderInfo, holdDeposit?: string, suspended?: boolean, transactionOptions?: TransactionOptions): Promise<void>;
|
|
30
30
|
static getOrder(consumer: string, externalId: string): Promise<OrderCreatedEvent>;
|
|
31
31
|
/**
|
|
32
32
|
* Function for create workflow
|
|
@@ -36,7 +36,7 @@ declare class OrdersFactory {
|
|
|
36
36
|
* @param transactionOptions - object what contains alternative action account or gas limit (optional)
|
|
37
37
|
* @returns {Promise<void>} - Does not return id of created order!
|
|
38
38
|
*/
|
|
39
|
-
static createWorkflow(perentOrderInfo: OrderInfo, subOrdersInfo: OrderInfo[], holdDeposit?: string,
|
|
39
|
+
static createWorkflow(perentOrderInfo: OrderInfo, subOrdersInfo: OrderInfo[], holdDeposit?: string, transactionOptions?: TransactionOptions): Promise<void>;
|
|
40
40
|
/**
|
|
41
41
|
* Function for refilling order deposit
|
|
42
42
|
* @param orderId - order id
|
|
@@ -123,20 +123,18 @@ var OrdersFactory = /** @class */ (function () {
|
|
|
123
123
|
* @param transactionOptions - object what contains alternative action account or gas limit (optional)
|
|
124
124
|
* @returns {Promise<void>} - Does not return id of created order!
|
|
125
125
|
*/
|
|
126
|
-
OrdersFactory.createOrder = function (orderInfo, holdDeposit, suspended,
|
|
126
|
+
OrdersFactory.createOrder = function (orderInfo, holdDeposit, suspended, transactionOptions) {
|
|
127
127
|
if (holdDeposit === void 0) { holdDeposit = "0"; }
|
|
128
128
|
if (suspended === void 0) { suspended = false; }
|
|
129
|
-
if (externalId === void 0) { externalId = "default"; }
|
|
130
129
|
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
-
var contract, orderInfoArguments
|
|
130
|
+
var contract, orderInfoArguments;
|
|
132
131
|
return __generator(this, function (_a) {
|
|
133
132
|
switch (_a.label) {
|
|
134
133
|
case 0:
|
|
135
134
|
contract = BlockchainConnector_1.default.getContractInstance(transactionOptions);
|
|
136
135
|
(0, utils_1.checkIfActionAccountInitialized)(transactionOptions);
|
|
137
136
|
orderInfoArguments = (0, utils_1.objectToTuple)(orderInfo, Order_1.OrderInfoStructure);
|
|
138
|
-
|
|
139
|
-
return [4 /*yield*/, TxManager_1.default.execute(contract.methods.createOrder, [orderInfoArguments, holdDeposit, suspended, formattedExternalId], transactionOptions)];
|
|
137
|
+
return [4 /*yield*/, TxManager_1.default.execute(contract.methods.createOrder, [orderInfoArguments, holdDeposit, suspended], transactionOptions)];
|
|
140
138
|
case 1:
|
|
141
139
|
_a.sent();
|
|
142
140
|
return [2 /*return*/];
|
|
@@ -178,20 +176,18 @@ var OrdersFactory = /** @class */ (function () {
|
|
|
178
176
|
* @param transactionOptions - object what contains alternative action account or gas limit (optional)
|
|
179
177
|
* @returns {Promise<void>} - Does not return id of created order!
|
|
180
178
|
*/
|
|
181
|
-
OrdersFactory.createWorkflow = function (perentOrderInfo, subOrdersInfo, holdDeposit,
|
|
179
|
+
OrdersFactory.createWorkflow = function (perentOrderInfo, subOrdersInfo, holdDeposit, transactionOptions) {
|
|
182
180
|
if (holdDeposit === void 0) { holdDeposit = "0"; }
|
|
183
|
-
if (externalId === void 0) { externalId = "default"; }
|
|
184
181
|
return __awaiter(this, void 0, void 0, function () {
|
|
185
|
-
var contract, perentOrderInfoArgs,
|
|
182
|
+
var contract, perentOrderInfoArgs, subOrdersInfoArgs;
|
|
186
183
|
return __generator(this, function (_a) {
|
|
187
184
|
switch (_a.label) {
|
|
188
185
|
case 0:
|
|
189
186
|
contract = BlockchainConnector_1.default.getContractInstance(transactionOptions);
|
|
190
187
|
(0, utils_1.checkIfActionAccountInitialized)(transactionOptions);
|
|
191
188
|
perentOrderInfoArgs = (0, utils_1.objectToTuple)(perentOrderInfo, Order_1.OrderInfoStructure);
|
|
192
|
-
formattedExternalId = (0, utils_2.formatBytes32String)(externalId);
|
|
193
189
|
subOrdersInfoArgs = (0, utils_1.objectToTuple)(subOrdersInfo, Order_1.OrderInfoStructureArray);
|
|
194
|
-
return [4 /*yield*/, TxManager_1.default.execute(contract.methods.createWorkflow, [perentOrderInfoArgs, holdDeposit,
|
|
190
|
+
return [4 /*yield*/, TxManager_1.default.execute(contract.methods.createWorkflow, [perentOrderInfoArgs, holdDeposit, subOrdersInfoArgs], transactionOptions)];
|
|
195
191
|
case 1:
|
|
196
192
|
_a.sent();
|
|
197
193
|
return [2 /*return*/];
|
package/build/types/Order.d.ts
CHANGED
|
@@ -50,10 +50,10 @@ export declare type OrderInfo = {
|
|
|
50
50
|
encryptedArgs: string;
|
|
51
51
|
status: OrderStatus;
|
|
52
52
|
args: OrderArgs;
|
|
53
|
+
externalId: string;
|
|
53
54
|
};
|
|
54
55
|
export declare type ExtendedOrderInfo = OrderInfo & {
|
|
55
56
|
blocking: boolean;
|
|
56
|
-
externalId: string;
|
|
57
57
|
holdSum: string;
|
|
58
58
|
};
|
|
59
59
|
export declare const OrderResultStructure: {
|
|
@@ -68,6 +68,5 @@ export declare type OrderResult = {
|
|
|
68
68
|
};
|
|
69
69
|
export declare type SubOrderParams = {
|
|
70
70
|
blockParentOrder: Boolean;
|
|
71
|
-
externalId: string;
|
|
72
71
|
holdSum: string;
|
|
73
72
|
};
|