@bosonprotocol/core-sdk 1.44.0-alpha.10 → 1.44.0-alpha.11

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.
@@ -1,4 +1,4 @@
1
- import { ConditionStruct, TransactionResponse, Web3LibAdapter } from "@bosonprotocol/common";
1
+ import { ConditionStruct, TransactionResponse, TransactionRequest, Web3LibAdapter } from "@bosonprotocol/common";
2
2
  import { BigNumberish } from "@ethersproject/bignumber";
3
3
  import { offers, accounts } from "..";
4
4
  import { BaseCoreSDK } from "./../mixins/base-core-sdk";
@@ -11,8 +11,13 @@ export declare class OrchestrationMixin<T extends Web3LibAdapter> extends BaseCo
11
11
  * @param overrides - Optional overrides.
12
12
  * @returns Transaction response.
13
13
  */
14
+ createOfferWithCondition(offerToCreate: offers.CreateOfferArgs, condition: ConditionStruct, overrides: Partial<{
15
+ contractAddress: string;
16
+ returnTxInfo: true;
17
+ }>): Promise<TransactionRequest>;
14
18
  createOfferWithCondition(offerToCreate: offers.CreateOfferArgs, condition: ConditionStruct, overrides?: Partial<{
15
19
  contractAddress: string;
20
+ returnTxInfo?: false;
16
21
  }>): Promise<TransactionResponse>;
17
22
  /**
18
23
  * Creates a seller account and offer with a specific conditions
@@ -23,55 +28,80 @@ export declare class OrchestrationMixin<T extends Web3LibAdapter> extends BaseCo
23
28
  * @param overrides - Optional overrides.
24
29
  * @returns Transaction response.
25
30
  */
31
+ createSellerAndOfferWithCondition(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, condition: ConditionStruct, overrides: Partial<{
32
+ contractAddress: string;
33
+ returnTxInfo: true;
34
+ }>): Promise<TransactionRequest>;
26
35
  createSellerAndOfferWithCondition(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, condition: ConditionStruct, overrides?: Partial<{
27
36
  contractAddress: string;
37
+ returnTxInfo?: false;
28
38
  }>): Promise<TransactionResponse>;
29
39
  /**
30
40
  * Creates a preminted offer and adds it to an existing group
31
41
  * @param offerToCreate - Offer arguments.
32
- * @param reservedRangeLength - Already reserved range length.
42
+ * @param premintParameters - Premint parameters.
33
43
  * @param groupId - Group ID the offer will be added to
34
44
  * @param overrides - Optional overrides.
35
45
  * @returns Transaction response.
36
46
  */
47
+ createPremintedOfferAddToGroup(offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, groupId: BigNumberish, overrides: Partial<{
48
+ contractAddress: string;
49
+ returnTxInfo: true;
50
+ }>): Promise<TransactionRequest>;
37
51
  createPremintedOfferAddToGroup(offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, groupId: BigNumberish, overrides?: Partial<{
38
52
  contractAddress: string;
53
+ returnTxInfo?: false;
39
54
  }>): Promise<TransactionResponse>;
40
55
  /**
41
56
  * Creates a seller account and preminted offer
42
57
  * This transaction only succeeds if there is no existing seller account for the connected signer.
43
58
  * @param sellerToCreate - Addresses to set in the seller account.
44
59
  * @param offerToCreate - Offer arguments.
45
- * @param condition - contract condition applied to the offer
60
+ * @param premintParameters - Premint parameters.
46
61
  * @param overrides - Optional overrides.
47
62
  * @returns Transaction response.
48
63
  */
64
+ createSellerAndPremintedOffer(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, overrides: Partial<{
65
+ contractAddress: string;
66
+ returnTxInfo: true;
67
+ }>): Promise<TransactionRequest>;
49
68
  createSellerAndPremintedOffer(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, overrides?: Partial<{
50
69
  contractAddress: string;
70
+ returnTxInfo?: false;
51
71
  }>): Promise<TransactionResponse>;
52
72
  /**
53
- * Creates a preminted offer and adds it to an existing group
73
+ * Creates a preminted offer with condition
54
74
  * @param offerToCreate - Offer arguments.
55
- * @param reservedRangeLength - Already reserved range length.
56
- * @param groupId - Group ID the offer will be added to
75
+ * @param premintParameters - Premint parameters.
76
+ * @param condition - Contract condition applied to the offer.
57
77
  * @param overrides - Optional overrides.
58
78
  * @returns Transaction response.
59
79
  */
80
+ createPremintedOfferWithCondition(offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, condition: ConditionStruct, overrides: Partial<{
81
+ contractAddress: string;
82
+ returnTxInfo: true;
83
+ }>): Promise<TransactionRequest>;
60
84
  createPremintedOfferWithCondition(offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, condition: ConditionStruct, overrides?: Partial<{
61
85
  contractAddress: string;
86
+ returnTxInfo?: false;
62
87
  }>): Promise<TransactionResponse>;
63
88
  /**
64
89
  * Creates a seller account and preminted offer with a specific conditions
65
90
  * This transaction only succeeds if there is no existing seller account for the connected signer.
66
91
  * @param sellerToCreate - Addresses to set in the seller account.
67
92
  * @param offerToCreate - Offer arguments.
68
- * @param reservedRangeLength - Already reserved range length.
69
- * @param condition - contract condition applied to the offer
93
+ * @param premintParameters - Premint parameters.
94
+ * @param condition - Contract condition applied to the offer.
70
95
  * @param overrides - Optional overrides.
71
96
  * @returns Transaction response.
72
97
  */
98
+ createSellerAndPremintedOfferWithCondition(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, condition: ConditionStruct, overrides: Partial<{
99
+ contractAddress: string;
100
+ returnTxInfo: true;
101
+ }>): Promise<TransactionRequest>;
73
102
  createSellerAndPremintedOfferWithCondition(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, condition: ConditionStruct, overrides?: Partial<{
74
103
  contractAddress: string;
104
+ returnTxInfo?: false;
75
105
  }>): Promise<TransactionResponse>;
76
106
  /**
77
107
  * Raises a dispute and immediately escalates it
@@ -79,8 +109,13 @@ export declare class OrchestrationMixin<T extends Web3LibAdapter> extends BaseCo
79
109
  * @param overrides - Optional overrides.
80
110
  * @returns Transaction response.
81
111
  */
112
+ raiseAndEscalateDispute(exchangeId: BigNumberish, overrides: Partial<{
113
+ contractAddress: string;
114
+ returnTxInfo: true;
115
+ }>): Promise<TransactionRequest>;
82
116
  raiseAndEscalateDispute(exchangeId: BigNumberish, overrides?: Partial<{
83
117
  contractAddress: string;
118
+ returnTxInfo?: false;
84
119
  }>): Promise<TransactionResponse>;
85
120
  }
86
121
  //# sourceMappingURL=mixin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mixin.d.ts","sourceRoot":"","sources":["../../../src/orchestration/mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,qBAAa,kBAAkB,CAC7B,CAAC,SAAS,cAAc,CACxB,SAAQ,WAAW,CAAC,CAAC,CAAC;IACtB;;;;;;OAMG;IACU,wBAAwB,CACnC,aAAa,EAAE,MAAM,CAAC,eAAe,EACrC,SAAS,EAAE,eAAe,EAC1B,SAAS,GAAE,OAAO,CAAC;QACjB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAM,GACN,OAAO,CAAC,mBAAmB,CAAC;IAU/B;;;;;;;;OAQG;IACU,iCAAiC,CAC5C,cAAc,EAAE,QAAQ,CAAC,gBAAgB,EACzC,aAAa,EAAE,MAAM,CAAC,eAAe,EACrC,SAAS,EAAE,eAAe,EAC1B,SAAS,GAAE,OAAO,CAAC;QACjB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAM,GACN,OAAO,CAAC,mBAAmB,CAAC;IAY/B;;;;;;;OAOG;IACU,8BAA8B,CACzC,aAAa,EAAE,MAAM,CAAC,eAAe,EACrC,iBAAiB,EAAE,uBAAuB,EAC1C,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Ae,EAAE,MAAM,CAAC;QACxB,YAAY,CAAC,EAAE,KAAK,CAAC;KACtB,CAAC,GACD,OAAO,CAAC,mBAAmB,CAAC;CAgChC"}
@@ -13,150 +13,149 @@ exports.OrchestrationMixin = void 0;
13
13
  const _1 = require(".");
14
14
  const base_core_sdk_1 = require("./../mixins/base-core-sdk");
15
15
  class OrchestrationMixin extends base_core_sdk_1.BaseCoreSDK {
16
- /**
17
- * Creates an offer with a specific conditions
18
- * @param offerToCreate - Offer arguments.
19
- * @param condition - contract condition applied to the offer
20
- * @param overrides - Optional overrides.
21
- * @returns Transaction response.
22
- */
16
+ // Implementation
23
17
  createOfferWithCondition(offerToCreate_1, condition_1) {
24
18
  return __awaiter(this, arguments, void 0, function* (offerToCreate, condition, overrides = {}) {
25
- return _1.handler.createOfferWithCondition({
19
+ const { returnTxInfo } = overrides;
20
+ const createArgs = {
26
21
  offerToCreate,
27
- contractAddress: overrides.contractAddress || this._protocolDiamond,
22
+ condition,
28
23
  web3Lib: this._web3Lib,
29
24
  metadataStorage: this._metadataStorage,
30
25
  theGraphStorage: this._theGraphStorage,
31
- condition
32
- });
26
+ contractAddress: overrides.contractAddress || this._protocolDiamond
27
+ };
28
+ if (returnTxInfo === true) {
29
+ return _1.handler.createOfferWithCondition(Object.assign(Object.assign({}, createArgs), { returnTxInfo: true }));
30
+ }
31
+ else {
32
+ return _1.handler.createOfferWithCondition(Object.assign(Object.assign({}, createArgs), { returnTxInfo: false }));
33
+ }
33
34
  });
34
35
  }
35
- /**
36
- * Creates a seller account and offer with a specific conditions
37
- * This transaction only succeeds if there is no existing seller account for the connected signer.
38
- * @param sellerToCreate - Addresses to set in the seller account.
39
- * @param offerToCreate - Offer arguments.
40
- * @param condition - contract condition applied to the offer
41
- * @param overrides - Optional overrides.
42
- * @returns Transaction response.
43
- */
36
+ // Implementation
44
37
  createSellerAndOfferWithCondition(sellerToCreate_1, offerToCreate_1, condition_1) {
45
38
  return __awaiter(this, arguments, void 0, function* (sellerToCreate, offerToCreate, condition, overrides = {}) {
46
- return _1.handler.createSellerAndOfferWithCondition({
39
+ const { returnTxInfo } = overrides;
40
+ const createArgs = {
47
41
  sellerToCreate,
48
42
  offerToCreate,
49
- contractAddress: overrides.contractAddress || this._protocolDiamond,
43
+ condition,
50
44
  web3Lib: this._web3Lib,
51
45
  metadataStorage: this._metadataStorage,
52
46
  theGraphStorage: this._theGraphStorage,
53
- condition
54
- });
47
+ contractAddress: overrides.contractAddress || this._protocolDiamond
48
+ };
49
+ if (returnTxInfo === true) {
50
+ return _1.handler.createSellerAndOfferWithCondition(Object.assign(Object.assign({}, createArgs), { returnTxInfo: true }));
51
+ }
52
+ else {
53
+ return _1.handler.createSellerAndOfferWithCondition(Object.assign(Object.assign({}, createArgs), { returnTxInfo: false }));
54
+ }
55
55
  });
56
56
  }
57
- /**
58
- * Creates a preminted offer and adds it to an existing group
59
- * @param offerToCreate - Offer arguments.
60
- * @param reservedRangeLength - Already reserved range length.
61
- * @param groupId - Group ID the offer will be added to
62
- * @param overrides - Optional overrides.
63
- * @returns Transaction response.
64
- */
57
+ // Implementation
65
58
  createPremintedOfferAddToGroup(offerToCreate_1, premintParameters_1, groupId_1) {
66
59
  return __awaiter(this, arguments, void 0, function* (offerToCreate, premintParameters, groupId, overrides = {}) {
67
- return _1.handler.createPremintedOfferAddToGroup({
60
+ const { returnTxInfo } = overrides;
61
+ const createArgs = {
68
62
  offerToCreate,
69
63
  premintParameters,
70
64
  groupId,
71
- contractAddress: overrides.contractAddress || this._protocolDiamond,
72
65
  web3Lib: this._web3Lib,
73
66
  metadataStorage: this._metadataStorage,
74
- theGraphStorage: this._theGraphStorage
75
- });
67
+ theGraphStorage: this._theGraphStorage,
68
+ contractAddress: overrides.contractAddress || this._protocolDiamond
69
+ };
70
+ if (returnTxInfo === true) {
71
+ return _1.handler.createPremintedOfferAddToGroup(Object.assign(Object.assign({}, createArgs), { returnTxInfo: true }));
72
+ }
73
+ else {
74
+ return _1.handler.createPremintedOfferAddToGroup(Object.assign(Object.assign({}, createArgs), { returnTxInfo: false }));
75
+ }
76
76
  });
77
77
  }
78
- /**
79
- * Creates a seller account and preminted offer
80
- * This transaction only succeeds if there is no existing seller account for the connected signer.
81
- * @param sellerToCreate - Addresses to set in the seller account.
82
- * @param offerToCreate - Offer arguments.
83
- * @param condition - contract condition applied to the offer
84
- * @param overrides - Optional overrides.
85
- * @returns Transaction response.
86
- */
78
+ // Implementation
87
79
  createSellerAndPremintedOffer(sellerToCreate_1, offerToCreate_1, premintParameters_1) {
88
80
  return __awaiter(this, arguments, void 0, function* (sellerToCreate, offerToCreate, premintParameters, overrides = {}) {
89
- return _1.handler.createSellerAndPremintedOffer({
81
+ const { returnTxInfo } = overrides;
82
+ const createArgs = {
90
83
  sellerToCreate,
91
84
  offerToCreate,
92
85
  premintParameters,
93
- contractAddress: overrides.contractAddress || this._protocolDiamond,
94
86
  web3Lib: this._web3Lib,
95
87
  metadataStorage: this._metadataStorage,
96
- theGraphStorage: this._theGraphStorage
97
- });
88
+ theGraphStorage: this._theGraphStorage,
89
+ contractAddress: overrides.contractAddress || this._protocolDiamond
90
+ };
91
+ if (returnTxInfo === true) {
92
+ return _1.handler.createSellerAndPremintedOffer(Object.assign(Object.assign({}, createArgs), { returnTxInfo: true }));
93
+ }
94
+ else {
95
+ return _1.handler.createSellerAndPremintedOffer(Object.assign(Object.assign({}, createArgs), { returnTxInfo: false }));
96
+ }
98
97
  });
99
98
  }
100
- /**
101
- * Creates a preminted offer and adds it to an existing group
102
- * @param offerToCreate - Offer arguments.
103
- * @param reservedRangeLength - Already reserved range length.
104
- * @param groupId - Group ID the offer will be added to
105
- * @param overrides - Optional overrides.
106
- * @returns Transaction response.
107
- */
99
+ // Implementation
108
100
  createPremintedOfferWithCondition(offerToCreate_1, premintParameters_1, condition_1) {
109
101
  return __awaiter(this, arguments, void 0, function* (offerToCreate, premintParameters, condition, overrides = {}) {
110
- return _1.handler.createPremintedOfferWithCondition({
102
+ const { returnTxInfo } = overrides;
103
+ const createArgs = {
111
104
  offerToCreate,
112
105
  premintParameters,
113
106
  condition,
114
- contractAddress: overrides.contractAddress || this._protocolDiamond,
115
107
  web3Lib: this._web3Lib,
116
108
  metadataStorage: this._metadataStorage,
117
- theGraphStorage: this._theGraphStorage
118
- });
109
+ theGraphStorage: this._theGraphStorage,
110
+ contractAddress: overrides.contractAddress || this._protocolDiamond
111
+ };
112
+ if (returnTxInfo === true) {
113
+ return _1.handler.createPremintedOfferWithCondition(Object.assign(Object.assign({}, createArgs), { returnTxInfo: true }));
114
+ }
115
+ else {
116
+ return _1.handler.createPremintedOfferWithCondition(Object.assign(Object.assign({}, createArgs), { returnTxInfo: false }));
117
+ }
119
118
  });
120
119
  }
121
- /**
122
- * Creates a seller account and preminted offer with a specific conditions
123
- * This transaction only succeeds if there is no existing seller account for the connected signer.
124
- * @param sellerToCreate - Addresses to set in the seller account.
125
- * @param offerToCreate - Offer arguments.
126
- * @param reservedRangeLength - Already reserved range length.
127
- * @param condition - contract condition applied to the offer
128
- * @param overrides - Optional overrides.
129
- * @returns Transaction response.
130
- */
120
+ // Implementation
131
121
  createSellerAndPremintedOfferWithCondition(sellerToCreate_1, offerToCreate_1, premintParameters_1, condition_1) {
132
122
  return __awaiter(this, arguments, void 0, function* (sellerToCreate, offerToCreate, premintParameters, condition, overrides = {}) {
133
- return _1.handler.createSellerAndPremintedOfferWithCondition({
123
+ const { returnTxInfo } = overrides;
124
+ const createArgs = {
134
125
  sellerToCreate,
135
126
  offerToCreate,
136
127
  premintParameters,
137
- contractAddress: overrides.contractAddress || this._protocolDiamond,
128
+ condition,
138
129
  web3Lib: this._web3Lib,
139
130
  metadataStorage: this._metadataStorage,
140
131
  theGraphStorage: this._theGraphStorage,
141
- condition
142
- });
132
+ contractAddress: overrides.contractAddress || this._protocolDiamond
133
+ };
134
+ if (returnTxInfo === true) {
135
+ return _1.handler.createSellerAndPremintedOfferWithCondition(Object.assign(Object.assign({}, createArgs), { returnTxInfo: true }));
136
+ }
137
+ else {
138
+ return _1.handler.createSellerAndPremintedOfferWithCondition(Object.assign(Object.assign({}, createArgs), { returnTxInfo: false }));
139
+ }
143
140
  });
144
141
  }
145
- /**
146
- * Raises a dispute and immediately escalates it
147
- * @param exchangeId - Exchange ID
148
- * @param overrides - Optional overrides.
149
- * @returns Transaction response.
150
- */
142
+ // Implementation
151
143
  raiseAndEscalateDispute(exchangeId_1) {
152
144
  return __awaiter(this, arguments, void 0, function* (exchangeId, overrides = {}) {
153
- return _1.handler.raiseAndEscalateDispute({
145
+ const { returnTxInfo } = overrides;
146
+ const disputeArgs = {
154
147
  exchangeId,
155
- contractAddress: overrides.contractAddress || this._protocolDiamond,
156
148
  web3Lib: this._web3Lib,
157
149
  metadataStorage: this._metadataStorage,
158
- theGraphStorage: this._theGraphStorage
159
- });
150
+ theGraphStorage: this._theGraphStorage,
151
+ contractAddress: overrides.contractAddress || this._protocolDiamond
152
+ };
153
+ if (returnTxInfo === true) {
154
+ return _1.handler.raiseAndEscalateDispute(Object.assign(Object.assign({}, disputeArgs), { returnTxInfo: true }));
155
+ }
156
+ else {
157
+ return _1.handler.raiseAndEscalateDispute(Object.assign(Object.assign({}, disputeArgs), { returnTxInfo: false }));
158
+ }
160
159
  });
161
160
  }
162
161
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mixin.js","sourceRoot":"","sources":["../../../src/orchestration/mixin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,wBAA4B;AAE5B,6DAAwD;AAGxD,MAAa,kBAEX,SAAQ,2BAAc;IACtB;;;;;;OAMG;IACU,wBAAwB;6DACnC,aAAqC,EACrC,SAA0B,EAC1B,YAEK,EAAE;YAEP,OAAO,UAAO,CAAC,wBAAwB,CAAC;gBACtC,aAAa;gBACb,eAAe,EAAE,SAAS,CAAC,eAAe,IAAI,IAAI,CAAC,gBAAgB;gBACnE,OAAO,EAAE,IAAI,CAAC,QAAQ;gBACtB,eAAe,EAAE,IAAI,CAAC,gBAAgB;gBACtC,eAAe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tC,eAAe,EAAE,SAAS,CAAC,eAAe,IAAI,IAAI,CAAC,gBAAgB;aAGjE,CAAC;YAEL,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;gBAC1B,OAAO,UAAO,CAAC,0CAA0C,iCACpD,UAAU,KACb,YAAY,EAAE,IAAI,IAClB,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,OAAO,UAAO,CAAC,0CAA0C,iCACpD,UAAU,KACb,YAAY,EAAE,KAAK,IACnB,CAAC;YACL,CAAC;QACH,CAAC;KAAA;IA0BD,iBAAiB;IACJ,uBAAuB;6DAClC,UAAwB,EACxB,YAGK,EAAE;YAEP,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;YAEnC,MAAM,WAAW,GAAG;gBAClB,UAAU;gBACV,OAAO,EAAE,IAAI,CAAC,QAAQ;gBACtB,eAAe,EAAE,IAAI,CAAC,gBAAgB;gBACtC,eAAe,EAAE,IAAI,CAAC,gBAAgB;gBACtC,eAAe,EAAE,SAAS,CAAC,eAAe,IAAI,IAAI,CAAC,gBAAgB;aACK,CAAC;YAE3E,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;gBAC1B,OAAO,UAAO,CAAC,uBAAuB,iCACjC,WAAW,KACd,YAAY,EAAE,IAAI,IAClB,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,OAAO,UAAO,CAAC,uBAAuB,iCACjC,WAAW,KACd,YAAY,EAAE,KAAK,IACnB,CAAC;YACL,CAAC;QACH,CAAC;KAAA;CACF;AA3cD,gDA2cC"}
@@ -1,4 +1,4 @@
1
- import { ConditionStruct, TransactionResponse, Web3LibAdapter } from "@bosonprotocol/common";
1
+ import { ConditionStruct, TransactionResponse, TransactionRequest, Web3LibAdapter } from "@bosonprotocol/common";
2
2
  import { BigNumberish } from "@ethersproject/bignumber";
3
3
  import { offers, accounts } from "..";
4
4
  import { BaseCoreSDK } from "./../mixins/base-core-sdk";
@@ -11,8 +11,13 @@ export declare class OrchestrationMixin<T extends Web3LibAdapter> extends BaseCo
11
11
  * @param overrides - Optional overrides.
12
12
  * @returns Transaction response.
13
13
  */
14
+ createOfferWithCondition(offerToCreate: offers.CreateOfferArgs, condition: ConditionStruct, overrides: Partial<{
15
+ contractAddress: string;
16
+ returnTxInfo: true;
17
+ }>): Promise<TransactionRequest>;
14
18
  createOfferWithCondition(offerToCreate: offers.CreateOfferArgs, condition: ConditionStruct, overrides?: Partial<{
15
19
  contractAddress: string;
20
+ returnTxInfo?: false;
16
21
  }>): Promise<TransactionResponse>;
17
22
  /**
18
23
  * Creates a seller account and offer with a specific conditions
@@ -23,55 +28,80 @@ export declare class OrchestrationMixin<T extends Web3LibAdapter> extends BaseCo
23
28
  * @param overrides - Optional overrides.
24
29
  * @returns Transaction response.
25
30
  */
31
+ createSellerAndOfferWithCondition(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, condition: ConditionStruct, overrides: Partial<{
32
+ contractAddress: string;
33
+ returnTxInfo: true;
34
+ }>): Promise<TransactionRequest>;
26
35
  createSellerAndOfferWithCondition(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, condition: ConditionStruct, overrides?: Partial<{
27
36
  contractAddress: string;
37
+ returnTxInfo?: false;
28
38
  }>): Promise<TransactionResponse>;
29
39
  /**
30
40
  * Creates a preminted offer and adds it to an existing group
31
41
  * @param offerToCreate - Offer arguments.
32
- * @param reservedRangeLength - Already reserved range length.
42
+ * @param premintParameters - Premint parameters.
33
43
  * @param groupId - Group ID the offer will be added to
34
44
  * @param overrides - Optional overrides.
35
45
  * @returns Transaction response.
36
46
  */
47
+ createPremintedOfferAddToGroup(offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, groupId: BigNumberish, overrides: Partial<{
48
+ contractAddress: string;
49
+ returnTxInfo: true;
50
+ }>): Promise<TransactionRequest>;
37
51
  createPremintedOfferAddToGroup(offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, groupId: BigNumberish, overrides?: Partial<{
38
52
  contractAddress: string;
53
+ returnTxInfo?: false;
39
54
  }>): Promise<TransactionResponse>;
40
55
  /**
41
56
  * Creates a seller account and preminted offer
42
57
  * This transaction only succeeds if there is no existing seller account for the connected signer.
43
58
  * @param sellerToCreate - Addresses to set in the seller account.
44
59
  * @param offerToCreate - Offer arguments.
45
- * @param condition - contract condition applied to the offer
60
+ * @param premintParameters - Premint parameters.
46
61
  * @param overrides - Optional overrides.
47
62
  * @returns Transaction response.
48
63
  */
64
+ createSellerAndPremintedOffer(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, overrides: Partial<{
65
+ contractAddress: string;
66
+ returnTxInfo: true;
67
+ }>): Promise<TransactionRequest>;
49
68
  createSellerAndPremintedOffer(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, overrides?: Partial<{
50
69
  contractAddress: string;
70
+ returnTxInfo?: false;
51
71
  }>): Promise<TransactionResponse>;
52
72
  /**
53
- * Creates a preminted offer and adds it to an existing group
73
+ * Creates a preminted offer with condition
54
74
  * @param offerToCreate - Offer arguments.
55
- * @param reservedRangeLength - Already reserved range length.
56
- * @param groupId - Group ID the offer will be added to
75
+ * @param premintParameters - Premint parameters.
76
+ * @param condition - Contract condition applied to the offer.
57
77
  * @param overrides - Optional overrides.
58
78
  * @returns Transaction response.
59
79
  */
80
+ createPremintedOfferWithCondition(offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, condition: ConditionStruct, overrides: Partial<{
81
+ contractAddress: string;
82
+ returnTxInfo: true;
83
+ }>): Promise<TransactionRequest>;
60
84
  createPremintedOfferWithCondition(offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, condition: ConditionStruct, overrides?: Partial<{
61
85
  contractAddress: string;
86
+ returnTxInfo?: false;
62
87
  }>): Promise<TransactionResponse>;
63
88
  /**
64
89
  * Creates a seller account and preminted offer with a specific conditions
65
90
  * This transaction only succeeds if there is no existing seller account for the connected signer.
66
91
  * @param sellerToCreate - Addresses to set in the seller account.
67
92
  * @param offerToCreate - Offer arguments.
68
- * @param reservedRangeLength - Already reserved range length.
69
- * @param condition - contract condition applied to the offer
93
+ * @param premintParameters - Premint parameters.
94
+ * @param condition - Contract condition applied to the offer.
70
95
  * @param overrides - Optional overrides.
71
96
  * @returns Transaction response.
72
97
  */
98
+ createSellerAndPremintedOfferWithCondition(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, condition: ConditionStruct, overrides: Partial<{
99
+ contractAddress: string;
100
+ returnTxInfo: true;
101
+ }>): Promise<TransactionRequest>;
73
102
  createSellerAndPremintedOfferWithCondition(sellerToCreate: accounts.CreateSellerArgs, offerToCreate: offers.CreateOfferArgs, premintParameters: PremintParametersStruct, condition: ConditionStruct, overrides?: Partial<{
74
103
  contractAddress: string;
104
+ returnTxInfo?: false;
75
105
  }>): Promise<TransactionResponse>;
76
106
  /**
77
107
  * Raises a dispute and immediately escalates it
@@ -79,8 +109,13 @@ export declare class OrchestrationMixin<T extends Web3LibAdapter> extends BaseCo
79
109
  * @param overrides - Optional overrides.
80
110
  * @returns Transaction response.
81
111
  */
112
+ raiseAndEscalateDispute(exchangeId: BigNumberish, overrides: Partial<{
113
+ contractAddress: string;
114
+ returnTxInfo: true;
115
+ }>): Promise<TransactionRequest>;
82
116
  raiseAndEscalateDispute(exchangeId: BigNumberish, overrides?: Partial<{
83
117
  contractAddress: string;
118
+ returnTxInfo?: false;
84
119
  }>): Promise<TransactionResponse>;
85
120
  }
86
121
  //# sourceMappingURL=mixin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mixin.d.ts","sourceRoot":"","sources":["../../../src/orchestration/mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY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