@bosonprotocol/core-sdk 1.16.0-alpha.18 → 1.16.0-alpha.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.
Files changed (74) hide show
  1. package/README.md +104 -3
  2. package/dist/cjs/core-sdk.d.ts +1 -32
  3. package/dist/cjs/core-sdk.d.ts.map +1 -1
  4. package/dist/cjs/core-sdk.js +1 -66
  5. package/dist/cjs/core-sdk.js.map +1 -1
  6. package/dist/cjs/exchanges/handler.d.ts +0 -3
  7. package/dist/cjs/exchanges/handler.d.ts.map +1 -1
  8. package/dist/cjs/exchanges/handler.js +11 -34
  9. package/dist/cjs/exchanges/handler.js.map +1 -1
  10. package/dist/cjs/exchanges/interface.d.ts +0 -1
  11. package/dist/cjs/exchanges/interface.d.ts.map +1 -1
  12. package/dist/cjs/exchanges/interface.js +1 -7
  13. package/dist/cjs/exchanges/interface.js.map +1 -1
  14. package/dist/cjs/index.d.ts +1 -1
  15. package/dist/cjs/index.d.ts.map +1 -1
  16. package/dist/cjs/index.js.map +1 -1
  17. package/dist/cjs/meta-tx/handler.d.ts +1 -20
  18. package/dist/cjs/meta-tx/handler.d.ts.map +1 -1
  19. package/dist/cjs/meta-tx/handler.js +1 -61
  20. package/dist/cjs/meta-tx/handler.js.map +1 -1
  21. package/dist/cjs/subgraph.d.ts +133 -196
  22. package/dist/cjs/subgraph.d.ts.map +1 -1
  23. package/dist/cjs/subgraph.js +25 -25
  24. package/dist/cjs/subgraph.js.map +1 -1
  25. package/dist/esm/core-sdk.d.ts +1 -32
  26. package/dist/esm/core-sdk.d.ts.map +1 -1
  27. package/dist/esm/core-sdk.js +1 -65
  28. package/dist/esm/core-sdk.js.map +1 -1
  29. package/dist/esm/exchanges/handler.d.ts +0 -3
  30. package/dist/esm/exchanges/handler.d.ts.map +1 -1
  31. package/dist/esm/exchanges/handler.js +12 -32
  32. package/dist/esm/exchanges/handler.js.map +1 -1
  33. package/dist/esm/exchanges/interface.d.ts +0 -1
  34. package/dist/esm/exchanges/interface.d.ts.map +1 -1
  35. package/dist/esm/exchanges/interface.js +0 -5
  36. package/dist/esm/exchanges/interface.js.map +1 -1
  37. package/dist/esm/index.d.ts +1 -1
  38. package/dist/esm/index.d.ts.map +1 -1
  39. package/dist/esm/index.js.map +1 -1
  40. package/dist/esm/meta-tx/handler.d.ts +1 -20
  41. package/dist/esm/meta-tx/handler.d.ts.map +1 -1
  42. package/dist/esm/meta-tx/handler.js +0 -56
  43. package/dist/esm/meta-tx/handler.js.map +1 -1
  44. package/dist/esm/subgraph.d.ts +133 -196
  45. package/dist/esm/subgraph.d.ts.map +1 -1
  46. package/dist/esm/subgraph.js +24 -24
  47. package/dist/esm/subgraph.js.map +1 -1
  48. package/package.json +3 -3
  49. package/src/core-sdk.ts +2 -101
  50. package/src/disputes/queries.graphql +9 -9
  51. package/src/exchanges/handler.ts +20 -50
  52. package/src/exchanges/interface.ts +0 -6
  53. package/src/exchanges/queries.graphql +3 -3
  54. package/src/index.ts +1 -6
  55. package/src/meta-tx/handler.ts +2 -84
  56. package/src/subgraph.ts +151 -219
  57. package/dist/cjs/meta-tx/biconomy.d.ts +0 -45
  58. package/dist/cjs/meta-tx/biconomy.d.ts.map +0 -1
  59. package/dist/cjs/meta-tx/biconomy.js +0 -76
  60. package/dist/cjs/meta-tx/biconomy.js.map +0 -1
  61. package/dist/cjs/utils/errors.d.ts +0 -5
  62. package/dist/cjs/utils/errors.d.ts.map +0 -1
  63. package/dist/cjs/utils/errors.js +0 -11
  64. package/dist/cjs/utils/errors.js.map +0 -1
  65. package/dist/esm/meta-tx/biconomy.d.ts +0 -45
  66. package/dist/esm/meta-tx/biconomy.d.ts.map +0 -1
  67. package/dist/esm/meta-tx/biconomy.js +0 -60
  68. package/dist/esm/meta-tx/biconomy.js.map +0 -1
  69. package/dist/esm/utils/errors.d.ts +0 -5
  70. package/dist/esm/utils/errors.d.ts.map +0 -1
  71. package/dist/esm/utils/errors.js +0 -8
  72. package/dist/esm/utils/errors.js.map +0 -1
  73. package/src/meta-tx/biconomy.ts +0 -129
  74. package/src/utils/errors.ts +0 -5
package/src/subgraph.ts CHANGED
@@ -6374,21 +6374,6 @@ export type GetSellerByIdQueryQuery = {
6374
6374
  completedDate?: string | null;
6375
6375
  disputedDate?: string | null;
6376
6376
  expired: boolean;
6377
- dispute?: {
6378
- __typename?: "Dispute";
6379
- id: string;
6380
- exchangeId: string;
6381
- state: DisputeState;
6382
- buyerPercent: string;
6383
- disputedDate: string;
6384
- escalatedDate?: string | null;
6385
- finalizedDate?: string | null;
6386
- retractedDate?: string | null;
6387
- resolvedDate?: string | null;
6388
- decidedDate?: string | null;
6389
- refusedDate?: string | null;
6390
- timeout: string;
6391
- } | null;
6392
6377
  }>;
6393
6378
  } | null;
6394
6379
  };
@@ -6711,21 +6696,6 @@ export type GetSellersQueryQuery = {
6711
6696
  completedDate?: string | null;
6712
6697
  disputedDate?: string | null;
6713
6698
  expired: boolean;
6714
- dispute?: {
6715
- __typename?: "Dispute";
6716
- id: string;
6717
- exchangeId: string;
6718
- state: DisputeState;
6719
- buyerPercent: string;
6720
- disputedDate: string;
6721
- escalatedDate?: string | null;
6722
- finalizedDate?: string | null;
6723
- retractedDate?: string | null;
6724
- resolvedDate?: string | null;
6725
- decidedDate?: string | null;
6726
- refusedDate?: string | null;
6727
- timeout: string;
6728
- } | null;
6729
6699
  }>;
6730
6700
  }>;
6731
6701
  };
@@ -6781,21 +6751,6 @@ export type GetBuyerByIdQueryQuery = {
6781
6751
  completedDate?: string | null;
6782
6752
  disputedDate?: string | null;
6783
6753
  expired: boolean;
6784
- dispute?: {
6785
- __typename?: "Dispute";
6786
- id: string;
6787
- exchangeId: string;
6788
- state: DisputeState;
6789
- buyerPercent: string;
6790
- disputedDate: string;
6791
- escalatedDate?: string | null;
6792
- finalizedDate?: string | null;
6793
- retractedDate?: string | null;
6794
- resolvedDate?: string | null;
6795
- decidedDate?: string | null;
6796
- refusedDate?: string | null;
6797
- timeout: string;
6798
- } | null;
6799
6754
  }>;
6800
6755
  } | null;
6801
6756
  };
@@ -6861,21 +6816,6 @@ export type GetBuyersQueryQuery = {
6861
6816
  completedDate?: string | null;
6862
6817
  disputedDate?: string | null;
6863
6818
  expired: boolean;
6864
- dispute?: {
6865
- __typename?: "Dispute";
6866
- id: string;
6867
- exchangeId: string;
6868
- state: DisputeState;
6869
- buyerPercent: string;
6870
- disputedDate: string;
6871
- escalatedDate?: string | null;
6872
- finalizedDate?: string | null;
6873
- retractedDate?: string | null;
6874
- resolvedDate?: string | null;
6875
- decidedDate?: string | null;
6876
- refusedDate?: string | null;
6877
- timeout: string;
6878
- } | null;
6879
6819
  }>;
6880
6820
  }>;
6881
6821
  };
@@ -7754,21 +7694,6 @@ export type SellerFieldsFragment = {
7754
7694
  completedDate?: string | null;
7755
7695
  disputedDate?: string | null;
7756
7696
  expired: boolean;
7757
- dispute?: {
7758
- __typename?: "Dispute";
7759
- id: string;
7760
- exchangeId: string;
7761
- state: DisputeState;
7762
- buyerPercent: string;
7763
- disputedDate: string;
7764
- escalatedDate?: string | null;
7765
- finalizedDate?: string | null;
7766
- retractedDate?: string | null;
7767
- resolvedDate?: string | null;
7768
- decidedDate?: string | null;
7769
- refusedDate?: string | null;
7770
- timeout: string;
7771
- } | null;
7772
7697
  }>;
7773
7698
  };
7774
7699
 
@@ -7818,21 +7743,6 @@ export type BuyerFieldsFragment = {
7818
7743
  completedDate?: string | null;
7819
7744
  disputedDate?: string | null;
7820
7745
  expired: boolean;
7821
- dispute?: {
7822
- __typename?: "Dispute";
7823
- id: string;
7824
- exchangeId: string;
7825
- state: DisputeState;
7826
- buyerPercent: string;
7827
- disputedDate: string;
7828
- escalatedDate?: string | null;
7829
- finalizedDate?: string | null;
7830
- retractedDate?: string | null;
7831
- resolvedDate?: string | null;
7832
- decidedDate?: string | null;
7833
- refusedDate?: string | null;
7834
- timeout: string;
7835
- } | null;
7836
7746
  }>;
7837
7747
  };
7838
7748
 
@@ -8211,21 +8121,6 @@ export type GetDisputeByIdQueryQuery = {
8211
8121
  completedDate?: string | null;
8212
8122
  disputedDate?: string | null;
8213
8123
  expired: boolean;
8214
- dispute?: {
8215
- __typename?: "Dispute";
8216
- id: string;
8217
- exchangeId: string;
8218
- state: DisputeState;
8219
- buyerPercent: string;
8220
- disputedDate: string;
8221
- escalatedDate?: string | null;
8222
- finalizedDate?: string | null;
8223
- retractedDate?: string | null;
8224
- resolvedDate?: string | null;
8225
- decidedDate?: string | null;
8226
- refusedDate?: string | null;
8227
- timeout: string;
8228
- } | null;
8229
8124
  };
8230
8125
  seller: {
8231
8126
  __typename?: "Seller";
@@ -8286,21 +8181,6 @@ export type GetDisputesQueryQuery = {
8286
8181
  completedDate?: string | null;
8287
8182
  disputedDate?: string | null;
8288
8183
  expired: boolean;
8289
- dispute?: {
8290
- __typename?: "Dispute";
8291
- id: string;
8292
- exchangeId: string;
8293
- state: DisputeState;
8294
- buyerPercent: string;
8295
- disputedDate: string;
8296
- escalatedDate?: string | null;
8297
- finalizedDate?: string | null;
8298
- retractedDate?: string | null;
8299
- resolvedDate?: string | null;
8300
- decidedDate?: string | null;
8301
- refusedDate?: string | null;
8302
- timeout: string;
8303
- } | null;
8304
8184
  };
8305
8185
  seller: {
8306
8186
  __typename?: "Seller";
@@ -8351,21 +8231,6 @@ export type DisputeFieldsFragment = {
8351
8231
  completedDate?: string | null;
8352
8232
  disputedDate?: string | null;
8353
8233
  expired: boolean;
8354
- dispute?: {
8355
- __typename?: "Dispute";
8356
- id: string;
8357
- exchangeId: string;
8358
- state: DisputeState;
8359
- buyerPercent: string;
8360
- disputedDate: string;
8361
- escalatedDate?: string | null;
8362
- finalizedDate?: string | null;
8363
- retractedDate?: string | null;
8364
- resolvedDate?: string | null;
8365
- decidedDate?: string | null;
8366
- refusedDate?: string | null;
8367
- timeout: string;
8368
- } | null;
8369
8234
  };
8370
8235
  seller: {
8371
8236
  __typename?: "Seller";
@@ -8396,6 +8261,34 @@ export type BaseDisputeFieldsFragment = {
8396
8261
  decidedDate?: string | null;
8397
8262
  refusedDate?: string | null;
8398
8263
  timeout: string;
8264
+ exchange: {
8265
+ __typename?: "Exchange";
8266
+ id: string;
8267
+ disputed: boolean;
8268
+ state: ExchangeState;
8269
+ committedDate: string;
8270
+ finalizedDate?: string | null;
8271
+ validUntilDate: string;
8272
+ redeemedDate?: string | null;
8273
+ revokedDate?: string | null;
8274
+ cancelledDate?: string | null;
8275
+ completedDate?: string | null;
8276
+ disputedDate?: string | null;
8277
+ expired: boolean;
8278
+ };
8279
+ seller: {
8280
+ __typename?: "Seller";
8281
+ id: string;
8282
+ operator: string;
8283
+ admin: string;
8284
+ clerk: string;
8285
+ treasury: string;
8286
+ authTokenId: string;
8287
+ authTokenType: number;
8288
+ voucherCloneAddress: string;
8289
+ active: boolean;
8290
+ };
8291
+ buyer: { __typename?: "Buyer"; id: string; wallet: string; active: boolean };
8399
8292
  };
8400
8293
 
8401
8294
  export type GetExchangeTokenByIdQueryQueryVariables = Exact<{
@@ -9551,6 +9444,39 @@ export type GetExchangeByIdQueryQuery = {
9551
9444
  decidedDate?: string | null;
9552
9445
  refusedDate?: string | null;
9553
9446
  timeout: string;
9447
+ exchange: {
9448
+ __typename?: "Exchange";
9449
+ id: string;
9450
+ disputed: boolean;
9451
+ state: ExchangeState;
9452
+ committedDate: string;
9453
+ finalizedDate?: string | null;
9454
+ validUntilDate: string;
9455
+ redeemedDate?: string | null;
9456
+ revokedDate?: string | null;
9457
+ cancelledDate?: string | null;
9458
+ completedDate?: string | null;
9459
+ disputedDate?: string | null;
9460
+ expired: boolean;
9461
+ };
9462
+ seller: {
9463
+ __typename?: "Seller";
9464
+ id: string;
9465
+ operator: string;
9466
+ admin: string;
9467
+ clerk: string;
9468
+ treasury: string;
9469
+ authTokenId: string;
9470
+ authTokenType: number;
9471
+ voucherCloneAddress: string;
9472
+ active: boolean;
9473
+ };
9474
+ buyer: {
9475
+ __typename?: "Buyer";
9476
+ id: string;
9477
+ wallet: string;
9478
+ active: boolean;
9479
+ };
9554
9480
  } | null;
9555
9481
  } | null;
9556
9482
  };
@@ -9862,6 +9788,39 @@ export type GetExchangesQueryQuery = {
9862
9788
  decidedDate?: string | null;
9863
9789
  refusedDate?: string | null;
9864
9790
  timeout: string;
9791
+ exchange: {
9792
+ __typename?: "Exchange";
9793
+ id: string;
9794
+ disputed: boolean;
9795
+ state: ExchangeState;
9796
+ committedDate: string;
9797
+ finalizedDate?: string | null;
9798
+ validUntilDate: string;
9799
+ redeemedDate?: string | null;
9800
+ revokedDate?: string | null;
9801
+ cancelledDate?: string | null;
9802
+ completedDate?: string | null;
9803
+ disputedDate?: string | null;
9804
+ expired: boolean;
9805
+ };
9806
+ seller: {
9807
+ __typename?: "Seller";
9808
+ id: string;
9809
+ operator: string;
9810
+ admin: string;
9811
+ clerk: string;
9812
+ treasury: string;
9813
+ authTokenId: string;
9814
+ authTokenType: number;
9815
+ voucherCloneAddress: string;
9816
+ active: boolean;
9817
+ };
9818
+ buyer: {
9819
+ __typename?: "Buyer";
9820
+ id: string;
9821
+ wallet: string;
9822
+ active: boolean;
9823
+ };
9865
9824
  } | null;
9866
9825
  }>;
9867
9826
  };
@@ -10154,6 +10113,39 @@ export type ExchangeFieldsFragment = {
10154
10113
  decidedDate?: string | null;
10155
10114
  refusedDate?: string | null;
10156
10115
  timeout: string;
10116
+ exchange: {
10117
+ __typename?: "Exchange";
10118
+ id: string;
10119
+ disputed: boolean;
10120
+ state: ExchangeState;
10121
+ committedDate: string;
10122
+ finalizedDate?: string | null;
10123
+ validUntilDate: string;
10124
+ redeemedDate?: string | null;
10125
+ revokedDate?: string | null;
10126
+ cancelledDate?: string | null;
10127
+ completedDate?: string | null;
10128
+ disputedDate?: string | null;
10129
+ expired: boolean;
10130
+ };
10131
+ seller: {
10132
+ __typename?: "Seller";
10133
+ id: string;
10134
+ operator: string;
10135
+ admin: string;
10136
+ clerk: string;
10137
+ treasury: string;
10138
+ authTokenId: string;
10139
+ authTokenType: number;
10140
+ voucherCloneAddress: string;
10141
+ active: boolean;
10142
+ };
10143
+ buyer: {
10144
+ __typename?: "Buyer";
10145
+ id: string;
10146
+ wallet: string;
10147
+ active: boolean;
10148
+ };
10157
10149
  } | null;
10158
10150
  };
10159
10151
 
@@ -10171,21 +10163,6 @@ export type BaseExchangeFieldsFragment = {
10171
10163
  completedDate?: string | null;
10172
10164
  disputedDate?: string | null;
10173
10165
  expired: boolean;
10174
- dispute?: {
10175
- __typename?: "Dispute";
10176
- id: string;
10177
- exchangeId: string;
10178
- state: DisputeState;
10179
- buyerPercent: string;
10180
- disputedDate: string;
10181
- escalatedDate?: string | null;
10182
- finalizedDate?: string | null;
10183
- retractedDate?: string | null;
10184
- resolvedDate?: string | null;
10185
- decidedDate?: string | null;
10186
- refusedDate?: string | null;
10187
- timeout: string;
10188
- } | null;
10189
10166
  };
10190
10167
 
10191
10168
  export type GetFundsByIdQueryVariables = Exact<{
@@ -13447,21 +13424,6 @@ export type GetOfferByIdQueryQuery = {
13447
13424
  completedDate?: string | null;
13448
13425
  disputedDate?: string | null;
13449
13426
  expired: boolean;
13450
- dispute?: {
13451
- __typename?: "Dispute";
13452
- id: string;
13453
- exchangeId: string;
13454
- state: DisputeState;
13455
- buyerPercent: string;
13456
- disputedDate: string;
13457
- escalatedDate?: string | null;
13458
- finalizedDate?: string | null;
13459
- retractedDate?: string | null;
13460
- resolvedDate?: string | null;
13461
- decidedDate?: string | null;
13462
- refusedDate?: string | null;
13463
- timeout: string;
13464
- } | null;
13465
13427
  }>;
13466
13428
  seller: {
13467
13429
  __typename?: "Seller";
@@ -13742,21 +13704,6 @@ export type GetOffersQueryQuery = {
13742
13704
  completedDate?: string | null;
13743
13705
  disputedDate?: string | null;
13744
13706
  expired: boolean;
13745
- dispute?: {
13746
- __typename?: "Dispute";
13747
- id: string;
13748
- exchangeId: string;
13749
- state: DisputeState;
13750
- buyerPercent: string;
13751
- disputedDate: string;
13752
- escalatedDate?: string | null;
13753
- finalizedDate?: string | null;
13754
- retractedDate?: string | null;
13755
- resolvedDate?: string | null;
13756
- decidedDate?: string | null;
13757
- refusedDate?: string | null;
13758
- timeout: string;
13759
- } | null;
13760
13707
  }>;
13761
13708
  seller: {
13762
13709
  __typename?: "Seller";
@@ -14021,21 +13968,6 @@ export type OfferFieldsFragment = {
14021
13968
  completedDate?: string | null;
14022
13969
  disputedDate?: string | null;
14023
13970
  expired: boolean;
14024
- dispute?: {
14025
- __typename?: "Dispute";
14026
- id: string;
14027
- exchangeId: string;
14028
- state: DisputeState;
14029
- buyerPercent: string;
14030
- disputedDate: string;
14031
- escalatedDate?: string | null;
14032
- finalizedDate?: string | null;
14033
- retractedDate?: string | null;
14034
- resolvedDate?: string | null;
14035
- decidedDate?: string | null;
14036
- refusedDate?: string | null;
14037
- timeout: string;
14038
- } | null;
14039
13971
  }>;
14040
13972
  seller: {
14041
13973
  __typename?: "Seller";
@@ -14836,22 +14768,6 @@ export const BaseOfferFieldsFragmentDoc = gql`
14836
14768
  ${BaseProductV1ExchangePolicyFieldsFragmentDoc}
14837
14769
  ${BaseProductV1ShippingOptionFieldsFragmentDoc}
14838
14770
  `;
14839
- export const BaseDisputeFieldsFragmentDoc = gql`
14840
- fragment BaseDisputeFields on Dispute {
14841
- id
14842
- exchangeId
14843
- state
14844
- buyerPercent
14845
- disputedDate
14846
- escalatedDate
14847
- finalizedDate
14848
- retractedDate
14849
- resolvedDate
14850
- decidedDate
14851
- refusedDate
14852
- timeout
14853
- }
14854
- `;
14855
14771
  export const BaseExchangeFieldsFragmentDoc = gql`
14856
14772
  fragment BaseExchangeFields on Exchange {
14857
14773
  id
@@ -14866,11 +14782,7 @@ export const BaseExchangeFieldsFragmentDoc = gql`
14866
14782
  completedDate
14867
14783
  disputedDate
14868
14784
  expired
14869
- dispute {
14870
- ...BaseDisputeFields
14871
- }
14872
14785
  }
14873
- ${BaseDisputeFieldsFragmentDoc}
14874
14786
  `;
14875
14787
  export const SellerFieldsFragmentDoc = gql`
14876
14788
  fragment SellerFields on Seller {
@@ -14957,9 +14869,20 @@ export const DisputeResolverFieldsFragmentDoc = gql`
14957
14869
  ${BaseDisputeResolverFieldsFragmentDoc}
14958
14870
  ${BaseOfferFieldsFragmentDoc}
14959
14871
  `;
14960
- export const DisputeFieldsFragmentDoc = gql`
14961
- fragment DisputeFields on Dispute {
14962
- ...BaseDisputeFields
14872
+ export const BaseDisputeFieldsFragmentDoc = gql`
14873
+ fragment BaseDisputeFields on Dispute {
14874
+ id
14875
+ exchangeId
14876
+ state
14877
+ buyerPercent
14878
+ disputedDate
14879
+ escalatedDate
14880
+ finalizedDate
14881
+ retractedDate
14882
+ resolvedDate
14883
+ decidedDate
14884
+ refusedDate
14885
+ timeout
14963
14886
  exchange {
14964
14887
  ...BaseExchangeFields
14965
14888
  }
@@ -14970,11 +14893,16 @@ export const DisputeFieldsFragmentDoc = gql`
14970
14893
  ...BaseBuyerFields
14971
14894
  }
14972
14895
  }
14973
- ${BaseDisputeFieldsFragmentDoc}
14974
14896
  ${BaseExchangeFieldsFragmentDoc}
14975
14897
  ${BaseSellerFieldsFragmentDoc}
14976
14898
  ${BaseBuyerFieldsFragmentDoc}
14977
14899
  `;
14900
+ export const DisputeFieldsFragmentDoc = gql`
14901
+ fragment DisputeFields on Dispute {
14902
+ ...BaseDisputeFields
14903
+ }
14904
+ ${BaseDisputeFieldsFragmentDoc}
14905
+ `;
14978
14906
  export const ExchangeTokenFieldsFragmentDoc = gql`
14979
14907
  fragment ExchangeTokenFields on ExchangeToken {
14980
14908
  ...BaseExchangeTokenFields
@@ -15013,11 +14941,15 @@ export const ExchangeFieldsFragmentDoc = gql`
15013
14941
  offer {
15014
14942
  ...BaseOfferFields
15015
14943
  }
14944
+ dispute {
14945
+ ...BaseDisputeFields
14946
+ }
15016
14947
  }
15017
14948
  ${BaseExchangeFieldsFragmentDoc}
15018
14949
  ${BaseBuyerFieldsFragmentDoc}
15019
14950
  ${BaseSellerFieldsFragmentDoc}
15020
14951
  ${BaseOfferFieldsFragmentDoc}
14952
+ ${BaseDisputeFieldsFragmentDoc}
15021
14953
  `;
15022
14954
  export const BaseBaseMetadataEntityFieldsFragmentDoc = gql`
15023
14955
  fragment BaseBaseMetadataEntityFields on BaseMetadataEntity {
@@ -1,45 +0,0 @@
1
- export declare type RelayTransactionResponse = {
2
- txHash: string;
3
- log: string;
4
- retryDuration: number;
5
- flag: number;
6
- };
7
- export declare type RelayTransactionArgs = {
8
- to: string;
9
- params: unknown[];
10
- from: string;
11
- };
12
- export declare type RelayOverrides = {
13
- relayerUrl: string;
14
- apiKey: string;
15
- apiId: string;
16
- };
17
- export declare type GetRetriedHashesResponse = {
18
- code: number;
19
- message: string;
20
- data: {
21
- oldHash: string;
22
- newHash: string;
23
- oldGasPrice: string;
24
- newGasPrice: string;
25
- timestamp: number;
26
- retryCount: number;
27
- relayerAddress: string;
28
- newStatus: string;
29
- };
30
- events?: unknown[];
31
- };
32
- export declare type GetRetriedHashesArgs = {
33
- networkId: number;
34
- transactionHash: string;
35
- };
36
- export declare class Biconomy {
37
- private _relayerUrl;
38
- private _apiKey;
39
- private _apiId;
40
- constructor(_relayerUrl: string, _apiKey: string, _apiId: string);
41
- relayTransaction(args: RelayTransactionArgs, overrides?: Partial<RelayOverrides>): Promise<RelayTransactionResponse>;
42
- getResubmitted(args: GetRetriedHashesArgs, overrides?: Partial<RelayOverrides>): Promise<GetRetriedHashesResponse>;
43
- wait(args: GetRetriedHashesArgs, overrides?: Partial<RelayOverrides>): Promise<GetRetriedHashesResponse>;
44
- }
45
- //# sourceMappingURL=biconomy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"biconomy.d.ts","sourceRoot":"","sources":["../../../src/meta-tx/biconomy.ts"],"names":[],"mappings":"AAIA,oBAAY,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,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C,cAAc,CAAM,GACtC,OAAO,CAAC,wBAAwB,CAAC;CAiBrC"}
@@ -1,76 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Biconomy = void 0;
16
- const cross_fetch_1 = __importDefault(require("cross-fetch"));
17
- const errors_1 = require("../utils/errors");
18
- class Biconomy {
19
- constructor(_relayerUrl, _apiKey, _apiId) {
20
- this._relayerUrl = _relayerUrl;
21
- this._apiKey = _apiKey;
22
- this._apiId = _apiId;
23
- }
24
- relayTransaction(args, overrides = {}) {
25
- return __awaiter(this, void 0, void 0, function* () {
26
- const url = `${overrides.relayerUrl || this._relayerUrl}/api/v2/meta-tx/native`;
27
- const response = yield (0, cross_fetch_1.default)(url, {
28
- method: "POST",
29
- headers: {
30
- "x-api-key": overrides.apiKey || this._apiKey,
31
- "content-type": "application/json;charset=UTF-8",
32
- "Access-Control-Allow-Origin": "*"
33
- },
34
- body: JSON.stringify(Object.assign(Object.assign({}, args), { apiId: overrides.apiId || this._apiId }))
35
- });
36
- if (!response.ok) {
37
- throw new errors_1.ApiError(response.status, `Failed to relay tx: ${response.statusText}`);
38
- }
39
- return response.json();
40
- });
41
- }
42
- getResubmitted(args, overrides = {}) {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- const url = `${overrides.relayerUrl || this._relayerUrl}/api/v1/meta-tx/resubmitted?networkId=${args.networkId}&transactionHash=${args.transactionHash}`;
45
- const response = yield (0, cross_fetch_1.default)(url, {
46
- method: "GET",
47
- headers: {
48
- "content-type": "application/json;charset=UTF-8",
49
- "Access-Control-Allow-Origin": "*"
50
- }
51
- });
52
- if (!response.ok) {
53
- throw new errors_1.ApiError(response.status, `Failed to get resubmitted tx: ${response.statusText}`);
54
- }
55
- return response.json();
56
- });
57
- }
58
- wait(args, overrides = {}) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- let pending = true;
61
- let resubmittedResponse;
62
- while (pending) {
63
- resubmittedResponse = yield this.getResubmitted(args, overrides);
64
- pending = resubmittedResponse.data.newStatus === "PENDING";
65
- if (pending) {
66
- yield new Promise((resolve) => {
67
- setTimeout(resolve, 1000);
68
- });
69
- }
70
- }
71
- return resubmittedResponse;
72
- });
73
- }
74
- }
75
- exports.Biconomy = Biconomy;
76
- //# sourceMappingURL=biconomy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"biconomy.js","sourceRoot":"","sources":["../../../src/meta-tx/biconomy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8DAAgC;AAEhC,4CAA2C;AA0C3C,MAAa,QAAQ;IACnB,YACU,WAAmB,EACnB,OAAe,EACf,MAAc;QAFd,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAAM,CAAQ;IACrB,CAAC;IAES,gBAAgB,CAC3B,IAA0B,EAC1B,YAAqC,EAAE;;YAEvC,MAAM,GAAG,GAAG,GACV,SAAS,CAAC,UAAU,IAAI,IAAI,CAAC,WAC/B,wBAAwB,CAAC;YACzB,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAK,EAAC,GAAG,EAAE;gBAChC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,WAAW,EAAE,SAAS,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO;oBAC7C,cAAc,EAAE,gCAA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AAK,SAAS,CAAC;gBAC3D,IAAI,OAAO,EAAE;oBACX,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;wBAC5B,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;oBAC5B,CAAC,CAAC,CAAC;iBACJ;aACF;YAED,OAAO,mBAAmB,CAAC;QAC7B,CAAC;KAAA;CACF;AApFD,4BAoFC"}
@@ -1,5 +0,0 @@
1
- export declare class ApiError extends Error {
2
- status: number;
3
- constructor(status: number, message: string);
4
- }
5
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACd,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAGnD"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApiError = void 0;
4
- class ApiError extends Error {
5
- constructor(status, message) {
6
- super(message);
7
- this.status = status;
8
- }
9
- }
10
- exports.ApiError = ApiError;
11
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/utils/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAS,SAAQ,KAAK;IACjC,YAAmB,MAAc,EAAE,OAAe;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,WAAM,GAAN,MAAM,CAAQ;IAEjC,CAAC;CACF;AAJD,4BAIC"}