@dmarket/p2p-tracker-core 1.3.1-SNAPSHOT-development.254 → 1.3.1-SNAPSHOT-development.265

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.
@@ -367,9 +367,9 @@ initMetadataForClass(HeartbeatResponse, 'HeartbeatResponse', HeartbeatResponse);
367
367
  initMetadataForClass(HeartbeatRequest, 'HeartbeatRequest');
368
368
  initMetadataForClass(TrackedDeal, 'TrackedDeal');
369
369
  initMetadataForCompanion(Companion_10);
370
- initMetadataForClass(WatchTarget, 'WatchTarget', VOID, Enum);
371
- initMetadataForCompanion(Companion_11);
372
370
  initMetadataForClass(DealRole, 'DealRole', VOID, Enum);
371
+ initMetadataForCompanion(Companion_11);
372
+ initMetadataForClass(WatchTarget, 'WatchTarget', VOID, Enum);
373
373
  initMetadataForCompanion(Companion_12);
374
374
  initMetadataForClass(MarketplaceCredential, 'MarketplaceCredential');
375
375
  initMetadataForObject(MarketplaceTokenJwt, 'MarketplaceTokenJwt');
@@ -4697,8 +4697,8 @@ function isCorroborated($this, intent, now, accepted, ttlMs) {
4697
4697
  }
4698
4698
  function ProofMintPolicy() {
4699
4699
  }
4700
- protoOf(ProofMintPolicy).a2z = function (intent, now, refused, accepted, acceptedTtlMs, proverAvailable, proverParkedUntil, mintedThisCycle, cycleDeadline, networkDeferred, wakeBudget) {
4701
- return refused.d1(intent) ? new Skip(ProofSkipReason_ALREADY_REFUSED_getInstance()) : isCorroborated(this, intent, now, accepted, acceptedTtlMs) ? new Skip(ProofSkipReason_ALREADY_ACCEPTED_getInstance()) : spendingGates(this, now, proverAvailable, proverParkedUntil, mintedThisCycle, cycleDeadline, networkDeferred, wakeBudget);
4700
+ protoOf(ProofMintPolicy).a2z = function (intent, now, refused, accepted, acceptedTtlMs, proverAvailable, proverParkedUntil, mintedThisCycle, cycleDeadline, networkDeferred, wakeBudget, role) {
4701
+ return refused.d1(intent) ? new Skip(ProofSkipReason_ALREADY_REFUSED_getInstance()) : isCorroborated(this, intent, now, accepted, acceptedTtlMs) ? new Skip(ProofSkipReason_ALREADY_ACCEPTED_getInstance()) : role.equals(DealRole_BUYER_getInstance()) ? new Skip(ProofSkipReason_SELLER_PROVES_getInstance()) : spendingGates(this, now, proverAvailable, proverParkedUntil, mintedThisCycle, cycleDeadline, networkDeferred, wakeBudget);
4702
4702
  };
4703
4703
  protoOf(ProofMintPolicy).b2z = function (progress, now, proverAvailable, proverParkedUntil, mintedThisCycle, cycleDeadline, networkDeferred, wakeBudget) {
4704
4704
  var retryAt = progress == null ? null : progress.i2y_1;
@@ -4719,6 +4719,7 @@ var ProofSkipReason_NETWORK_DEFERRED_instance;
4719
4719
  var ProofSkipReason_WAKE_BUDGET_instance;
4720
4720
  var ProofSkipReason_PROVER_PARKED_instance;
4721
4721
  var ProofSkipReason_BUDGET_SPENT_instance;
4722
+ var ProofSkipReason_SELLER_PROVES_instance;
4722
4723
  var ProofSkipReason_entriesInitialized;
4723
4724
  function ProofSkipReason_initEntries() {
4724
4725
  if (ProofSkipReason_entriesInitialized)
@@ -4732,6 +4733,7 @@ function ProofSkipReason_initEntries() {
4732
4733
  ProofSkipReason_WAKE_BUDGET_instance = new ProofSkipReason('WAKE_BUDGET', 5, 'the wake has no time for a proof');
4733
4734
  ProofSkipReason_PROVER_PARKED_instance = new ProofSkipReason('PROVER_PARKED', 6, 'the prover is parked after repeated proof failures');
4734
4735
  ProofSkipReason_BUDGET_SPENT_instance = new ProofSkipReason('BUDGET_SPENT', 7, "this cycle's proving budget is spent; the next heartbeat is due");
4736
+ ProofSkipReason_SELLER_PROVES_instance = new ProofSkipReason('SELLER_PROVES', 8, "the seller's tracker proves this transition; this device is the buyer");
4735
4737
  }
4736
4738
  function ProofSkipReason(name, ordinal, message) {
4737
4739
  Enum.call(this, name, ordinal);
@@ -4741,7 +4743,7 @@ protoOf(ProofSkipReason).f2z = function () {
4741
4743
  return this.equals(ProofSkipReason_ALREADY_ACCEPTED_getInstance());
4742
4744
  };
4743
4745
  protoOf(ProofSkipReason).g2z = function () {
4744
- return this.equals(ProofSkipReason_NO_PROVER_getInstance()) || this.equals(ProofSkipReason_PROVER_PARKED_getInstance()) || this.equals(ProofSkipReason_BUDGET_SPENT_getInstance());
4746
+ return this.equals(ProofSkipReason_NO_PROVER_getInstance()) || this.equals(ProofSkipReason_PROVER_PARKED_getInstance()) || this.equals(ProofSkipReason_BUDGET_SPENT_getInstance()) || this.equals(ProofSkipReason_SELLER_PROVES_getInstance());
4745
4747
  };
4746
4748
  function ProofSkipReason_ALREADY_REFUSED_getInstance() {
4747
4749
  ProofSkipReason_initEntries();
@@ -4775,6 +4777,10 @@ function ProofSkipReason_BUDGET_SPENT_getInstance() {
4775
4777
  ProofSkipReason_initEntries();
4776
4778
  return ProofSkipReason_BUDGET_SPENT_instance;
4777
4779
  }
4780
+ function ProofSkipReason_SELLER_PROVES_getInstance() {
4781
+ ProofSkipReason_initEntries();
4782
+ return ProofSkipReason_SELLER_PROVES_instance;
4783
+ }
4778
4784
  function ReportAck(report, accepted, reason) {
4779
4785
  reason = reason === VOID ? null : reason;
4780
4786
  this.h2z_1 = report;
@@ -9049,135 +9055,135 @@ protoOf(TrackedDeal).equals = function (other) {
9049
9055
  return false;
9050
9056
  return true;
9051
9057
  };
9052
- function watches(_this__u8e3s4, source) {
9053
- var tmp;
9054
- switch (source.a1_1) {
9055
- case 0:
9056
- tmp = _this__u8e3s4.c2t_1.d1(WatchTarget_GET_TRADE_OFFER_getInstance());
9057
- break;
9058
- case 1:
9059
- tmp = _this__u8e3s4.c2t_1.d1(WatchTarget_GET_TRADE_HISTORY_getInstance()) || _this__u8e3s4.c2t_1.d1(WatchTarget_GET_TRADE_STATUS_getInstance());
9060
- break;
9061
- default:
9062
- noWhenBranchMatchedException();
9063
- break;
9064
- }
9065
- return tmp;
9066
- }
9067
- var WatchTarget_GET_TRADE_OFFER_instance;
9068
- var WatchTarget_GET_TRADE_STATUS_instance;
9069
- var WatchTarget_GET_TRADE_HISTORY_instance;
9070
- var WatchTarget_UNKNOWN_instance;
9058
+ var DealRole_SELLER_instance;
9059
+ var DealRole_BUYER_instance;
9060
+ var DealRole_UNKNOWN_instance;
9071
9061
  function Companion_10() {
9072
9062
  }
9073
9063
  protoOf(Companion_10).p3a = function (name) {
9064
+ var tmp;
9065
+ if (name == null) {
9066
+ tmp = null;
9067
+ } else {
9068
+ // Inline function 'kotlin.text.lowercase' call
9069
+ // Inline function 'kotlin.js.asDynamic' call
9070
+ tmp = name.toLowerCase();
9071
+ }
9072
+ var tmp1_safe_receiver = tmp;
9073
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : substringAfterLast(tmp1_safe_receiver, _Char___init__impl__6a9atx(95));
9074
+ var tmp_0;
9075
+ if (tmp2_elvis_lhs == null) {
9076
+ return DealRole_UNKNOWN_getInstance();
9077
+ } else {
9078
+ tmp_0 = tmp2_elvis_lhs;
9079
+ }
9080
+ var token = tmp_0;
9074
9081
  var tmp0 = get_entries_3();
9075
- var tmp$ret$0;
9082
+ var tmp$ret$2;
9076
9083
  $l$block: {
9077
9084
  // Inline function 'kotlin.collections.firstOrNull' call
9078
9085
  var _iterator__ex2g4s = tmp0.t();
9079
9086
  while (_iterator__ex2g4s.u()) {
9080
9087
  var element = _iterator__ex2g4s.v();
9081
- if (element.e3b_1 === name) {
9082
- tmp$ret$0 = element;
9088
+ if (element.e3b_1 === token) {
9089
+ tmp$ret$2 = element;
9083
9090
  break $l$block;
9084
9091
  }
9085
9092
  }
9086
- tmp$ret$0 = null;
9093
+ tmp$ret$2 = null;
9087
9094
  }
9088
- var tmp0_elvis_lhs = tmp$ret$0;
9089
- return tmp0_elvis_lhs == null ? WatchTarget_UNKNOWN_getInstance() : tmp0_elvis_lhs;
9095
+ var tmp3_elvis_lhs = tmp$ret$2;
9096
+ return tmp3_elvis_lhs == null ? DealRole_UNKNOWN_getInstance() : tmp3_elvis_lhs;
9090
9097
  };
9091
9098
  var Companion_instance_11;
9092
9099
  function Companion_getInstance_13() {
9093
9100
  return Companion_instance_11;
9094
9101
  }
9095
9102
  function values_3() {
9096
- return [WatchTarget_GET_TRADE_OFFER_getInstance(), WatchTarget_GET_TRADE_STATUS_getInstance(), WatchTarget_GET_TRADE_HISTORY_getInstance(), WatchTarget_UNKNOWN_getInstance()];
9103
+ return [DealRole_SELLER_getInstance(), DealRole_BUYER_getInstance(), DealRole_UNKNOWN_getInstance()];
9097
9104
  }
9098
9105
  function get_entries_3() {
9099
9106
  if ($ENTRIES_3 == null)
9100
9107
  $ENTRIES_3 = enumEntries(values_3());
9101
9108
  return $ENTRIES_3;
9102
9109
  }
9103
- var WatchTarget_entriesInitialized;
9104
- function WatchTarget_initEntries() {
9105
- if (WatchTarget_entriesInitialized)
9110
+ var DealRole_entriesInitialized;
9111
+ function DealRole_initEntries() {
9112
+ if (DealRole_entriesInitialized)
9106
9113
  return Unit_instance;
9107
- WatchTarget_entriesInitialized = true;
9108
- WatchTarget_GET_TRADE_OFFER_instance = new WatchTarget('GET_TRADE_OFFER', 0, 'GetTradeOffer');
9109
- WatchTarget_GET_TRADE_STATUS_instance = new WatchTarget('GET_TRADE_STATUS', 1, 'GetTradeStatus');
9110
- WatchTarget_GET_TRADE_HISTORY_instance = new WatchTarget('GET_TRADE_HISTORY', 2, 'GetTradeHistory');
9111
- WatchTarget_UNKNOWN_instance = new WatchTarget('UNKNOWN', 3, 'unknown');
9114
+ DealRole_entriesInitialized = true;
9115
+ DealRole_SELLER_instance = new DealRole('SELLER', 0, 'seller');
9116
+ DealRole_BUYER_instance = new DealRole('BUYER', 1, 'buyer');
9117
+ DealRole_UNKNOWN_instance = new DealRole('UNKNOWN', 2, 'unknown');
9112
9118
  }
9113
9119
  var $ENTRIES_3;
9114
- function WatchTarget(name, ordinal, wireName) {
9120
+ function DealRole(name, ordinal, wireName) {
9115
9121
  Enum.call(this, name, ordinal);
9116
9122
  this.e3b_1 = wireName;
9117
9123
  }
9118
- var DealRole_SELLER_instance;
9119
- var DealRole_BUYER_instance;
9120
- var DealRole_UNKNOWN_instance;
9124
+ function watches(_this__u8e3s4, source) {
9125
+ var tmp;
9126
+ switch (source.a1_1) {
9127
+ case 0:
9128
+ tmp = _this__u8e3s4.c2t_1.d1(WatchTarget_GET_TRADE_OFFER_getInstance());
9129
+ break;
9130
+ case 1:
9131
+ tmp = _this__u8e3s4.c2t_1.d1(WatchTarget_GET_TRADE_HISTORY_getInstance()) || _this__u8e3s4.c2t_1.d1(WatchTarget_GET_TRADE_STATUS_getInstance());
9132
+ break;
9133
+ default:
9134
+ noWhenBranchMatchedException();
9135
+ break;
9136
+ }
9137
+ return tmp;
9138
+ }
9139
+ var WatchTarget_GET_TRADE_OFFER_instance;
9140
+ var WatchTarget_GET_TRADE_STATUS_instance;
9141
+ var WatchTarget_GET_TRADE_HISTORY_instance;
9142
+ var WatchTarget_UNKNOWN_instance;
9121
9143
  function Companion_11() {
9122
9144
  }
9123
9145
  protoOf(Companion_11).p3a = function (name) {
9124
- var tmp;
9125
- if (name == null) {
9126
- tmp = null;
9127
- } else {
9128
- // Inline function 'kotlin.text.lowercase' call
9129
- // Inline function 'kotlin.js.asDynamic' call
9130
- tmp = name.toLowerCase();
9131
- }
9132
- var tmp1_safe_receiver = tmp;
9133
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : substringAfterLast(tmp1_safe_receiver, _Char___init__impl__6a9atx(95));
9134
- var tmp_0;
9135
- if (tmp2_elvis_lhs == null) {
9136
- return DealRole_UNKNOWN_getInstance();
9137
- } else {
9138
- tmp_0 = tmp2_elvis_lhs;
9139
- }
9140
- var token = tmp_0;
9141
9146
  var tmp0 = get_entries_4();
9142
- var tmp$ret$2;
9147
+ var tmp$ret$0;
9143
9148
  $l$block: {
9144
9149
  // Inline function 'kotlin.collections.firstOrNull' call
9145
9150
  var _iterator__ex2g4s = tmp0.t();
9146
9151
  while (_iterator__ex2g4s.u()) {
9147
9152
  var element = _iterator__ex2g4s.v();
9148
- if (element.h3b_1 === token) {
9149
- tmp$ret$2 = element;
9153
+ if (element.h3b_1 === name) {
9154
+ tmp$ret$0 = element;
9150
9155
  break $l$block;
9151
9156
  }
9152
9157
  }
9153
- tmp$ret$2 = null;
9158
+ tmp$ret$0 = null;
9154
9159
  }
9155
- var tmp3_elvis_lhs = tmp$ret$2;
9156
- return tmp3_elvis_lhs == null ? DealRole_UNKNOWN_getInstance() : tmp3_elvis_lhs;
9160
+ var tmp0_elvis_lhs = tmp$ret$0;
9161
+ return tmp0_elvis_lhs == null ? WatchTarget_UNKNOWN_getInstance() : tmp0_elvis_lhs;
9157
9162
  };
9158
9163
  var Companion_instance_12;
9159
9164
  function Companion_getInstance_14() {
9160
9165
  return Companion_instance_12;
9161
9166
  }
9162
9167
  function values_4() {
9163
- return [DealRole_SELLER_getInstance(), DealRole_BUYER_getInstance(), DealRole_UNKNOWN_getInstance()];
9168
+ return [WatchTarget_GET_TRADE_OFFER_getInstance(), WatchTarget_GET_TRADE_STATUS_getInstance(), WatchTarget_GET_TRADE_HISTORY_getInstance(), WatchTarget_UNKNOWN_getInstance()];
9164
9169
  }
9165
9170
  function get_entries_4() {
9166
9171
  if ($ENTRIES_4 == null)
9167
9172
  $ENTRIES_4 = enumEntries(values_4());
9168
9173
  return $ENTRIES_4;
9169
9174
  }
9170
- var DealRole_entriesInitialized;
9171
- function DealRole_initEntries() {
9172
- if (DealRole_entriesInitialized)
9175
+ var WatchTarget_entriesInitialized;
9176
+ function WatchTarget_initEntries() {
9177
+ if (WatchTarget_entriesInitialized)
9173
9178
  return Unit_instance;
9174
- DealRole_entriesInitialized = true;
9175
- DealRole_SELLER_instance = new DealRole('SELLER', 0, 'seller');
9176
- DealRole_BUYER_instance = new DealRole('BUYER', 1, 'buyer');
9177
- DealRole_UNKNOWN_instance = new DealRole('UNKNOWN', 2, 'unknown');
9179
+ WatchTarget_entriesInitialized = true;
9180
+ WatchTarget_GET_TRADE_OFFER_instance = new WatchTarget('GET_TRADE_OFFER', 0, 'GetTradeOffer');
9181
+ WatchTarget_GET_TRADE_STATUS_instance = new WatchTarget('GET_TRADE_STATUS', 1, 'GetTradeStatus');
9182
+ WatchTarget_GET_TRADE_HISTORY_instance = new WatchTarget('GET_TRADE_HISTORY', 2, 'GetTradeHistory');
9183
+ WatchTarget_UNKNOWN_instance = new WatchTarget('UNKNOWN', 3, 'unknown');
9178
9184
  }
9179
9185
  var $ENTRIES_4;
9180
- function DealRole(name, ordinal, wireName) {
9186
+ function WatchTarget(name, ordinal, wireName) {
9181
9187
  Enum.call(this, name, ordinal);
9182
9188
  this.h3b_1 = wireName;
9183
9189
  }
@@ -9227,6 +9233,18 @@ function provesTransition(_this__u8e3s4, source, code) {
9227
9233
  return true;
9228
9234
  return _this__u8e3s4.i2t_1.d1(site);
9229
9235
  }
9236
+ function DealRole_SELLER_getInstance() {
9237
+ DealRole_initEntries();
9238
+ return DealRole_SELLER_instance;
9239
+ }
9240
+ function DealRole_BUYER_getInstance() {
9241
+ DealRole_initEntries();
9242
+ return DealRole_BUYER_instance;
9243
+ }
9244
+ function DealRole_UNKNOWN_getInstance() {
9245
+ DealRole_initEntries();
9246
+ return DealRole_UNKNOWN_instance;
9247
+ }
9230
9248
  function WatchTarget_GET_TRADE_OFFER_getInstance() {
9231
9249
  WatchTarget_initEntries();
9232
9250
  return WatchTarget_GET_TRADE_OFFER_instance;
@@ -9243,18 +9261,6 @@ function WatchTarget_UNKNOWN_getInstance() {
9243
9261
  WatchTarget_initEntries();
9244
9262
  return WatchTarget_UNKNOWN_instance;
9245
9263
  }
9246
- function DealRole_SELLER_getInstance() {
9247
- DealRole_initEntries();
9248
- return DealRole_SELLER_instance;
9249
- }
9250
- function DealRole_BUYER_getInstance() {
9251
- DealRole_initEntries();
9252
- return DealRole_BUYER_instance;
9253
- }
9254
- function DealRole_UNKNOWN_getInstance() {
9255
- DealRole_initEntries();
9256
- return DealRole_UNKNOWN_instance;
9257
- }
9258
9264
  function Companion_12() {
9259
9265
  Companion_instance_13 = this;
9260
9266
  var tmp = this;
@@ -18278,11 +18284,11 @@ function toDomain_6(_this__u8e3s4) {
18278
18284
  var _iterator__ex2g4s = this_0.t();
18279
18285
  while (_iterator__ex2g4s.u()) {
18280
18286
  var item = _iterator__ex2g4s.v();
18281
- var tmp$ret$7 = Companion_instance_11.p3a(item);
18287
+ var tmp$ret$7 = Companion_instance_12.p3a(item);
18282
18288
  destination.b1(tmp$ret$7);
18283
18289
  }
18284
18290
  var tmp_4 = toSet(destination);
18285
- var tmp_5 = Companion_instance_12.p3a(_this__u8e3s4.v3o_1);
18291
+ var tmp_5 = Companion_instance_11.p3a(_this__u8e3s4.v3o_1);
18286
18292
  var tmp2_safe_receiver = _this__u8e3s4.x3o_1;
18287
18293
  var tmp_6;
18288
18294
  if (tmp2_safe_receiver == null) {