@0xsequence/marketplace-sdk 0.8.6 → 0.8.8

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 (138) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/chunk-2PSNAIAT.js +1 -0
  3. package/dist/chunk-2PSNAIAT.js.map +1 -0
  4. package/dist/{chunk-WXKV5N4T.js → chunk-35WWD5V6.js} +3 -3
  5. package/dist/{chunk-ZSCZLHKX.js → chunk-4XLXOEXQ.js} +2 -2
  6. package/dist/{chunk-TGFX3TMV.js → chunk-7IYKUVC3.js} +314 -147
  7. package/dist/chunk-7IYKUVC3.js.map +1 -0
  8. package/dist/{chunk-BB2PTJHI.js → chunk-D7RVSZAQ.js} +131 -83
  9. package/dist/chunk-D7RVSZAQ.js.map +1 -0
  10. package/dist/chunk-DWTLVJAW.js +42 -0
  11. package/dist/chunk-DWTLVJAW.js.map +1 -0
  12. package/dist/{chunk-SJU6QZHM.js → chunk-EODKQL6Y.js} +2 -2
  13. package/dist/{chunk-6SEJI7YS.js → chunk-G3447GIP.js} +39 -20
  14. package/dist/chunk-G3447GIP.js.map +1 -0
  15. package/dist/{chunk-QMWMJVTX.js → chunk-HHYNOPPI.js} +2 -2
  16. package/dist/{chunk-ALICO7NG.js → chunk-KGM2WLSP.js} +15 -158
  17. package/dist/chunk-KGM2WLSP.js.map +1 -0
  18. package/dist/chunk-MAD64DLJ.js +81 -0
  19. package/dist/chunk-MAD64DLJ.js.map +1 -0
  20. package/dist/chunk-N7BPFK46.js +1 -0
  21. package/dist/chunk-N7BPFK46.js.map +1 -0
  22. package/dist/chunk-NX52D7NX.js +135 -0
  23. package/dist/chunk-NX52D7NX.js.map +1 -0
  24. package/dist/chunk-O34GCB47.js +32 -0
  25. package/dist/chunk-O34GCB47.js.map +1 -0
  26. package/dist/{chunk-LDZZUYG7.js → chunk-YALXP2PW.js} +3 -3
  27. package/dist/{chunk-V3NVAVHV.js → chunk-YBOFRP65.js} +2 -2
  28. package/dist/{chunk-BGY4WXER.js → chunk-YEGD7PWE.js} +3 -2
  29. package/dist/{chunk-BGY4WXER.js.map → chunk-YEGD7PWE.js.map} +1 -1
  30. package/dist/{create-config-qDML4ZNn.d.ts → create-config-DwrnzwpM.d.ts} +2 -2
  31. package/dist/{index-DtWR0b_l.d.ts → index-DGsVBflk.d.ts} +3 -12
  32. package/dist/index.css +7 -5
  33. package/dist/index.css.map +1 -1
  34. package/dist/index.d.ts +13 -4
  35. package/dist/index.js +14 -6
  36. package/dist/{lowestListing-W7P4EkC3.d.ts → lowestListing-BQHIuvNF.d.ts} +2 -2
  37. package/dist/{marketplace.gen-DS-MmGEB.d.ts → marketplace.gen-DQzWciwC.d.ts} +5 -4
  38. package/dist/marketplaceConfig-B4Fdsmxu.d.ts +17 -0
  39. package/dist/react/_internal/api/index.d.ts +3 -3
  40. package/dist/react/_internal/api/index.js +4 -3
  41. package/dist/react/_internal/databeat/index.d.ts +2 -1
  42. package/dist/react/_internal/databeat/index.js +13 -9
  43. package/dist/react/_internal/index.d.ts +6 -6
  44. package/dist/react/_internal/index.js +13 -10
  45. package/dist/react/_internal/wagmi/index.d.ts +6 -5
  46. package/dist/react/_internal/wagmi/index.js +2 -2
  47. package/dist/react/hooks/index.d.ts +9 -8
  48. package/dist/react/hooks/index.js +12 -8
  49. package/dist/react/hooks/options/index.d.ts +4 -4
  50. package/dist/react/hooks/options/index.js +7 -4
  51. package/dist/react/index.css +2650 -0
  52. package/dist/react/index.css.map +1 -1
  53. package/dist/react/index.d.ts +8 -8
  54. package/dist/react/index.js +19 -14
  55. package/dist/react/queries/index.d.ts +3 -3
  56. package/dist/react/queries/index.js +6 -3
  57. package/dist/react/ssr/index.d.ts +3 -3
  58. package/dist/react/ssr/index.js +6 -3
  59. package/dist/react/ssr/index.js.map +1 -1
  60. package/dist/react/ui/components/collectible-card/index.css +2650 -0
  61. package/dist/react/ui/components/collectible-card/index.css.map +1 -1
  62. package/dist/react/ui/components/collectible-card/index.d.ts +1 -1
  63. package/dist/react/ui/components/collectible-card/index.js +17 -12
  64. package/dist/react/ui/icons/index.js +8 -5
  65. package/dist/react/ui/index.css +2650 -0
  66. package/dist/react/ui/index.css.map +1 -1
  67. package/dist/react/ui/index.d.ts +2 -1
  68. package/dist/react/ui/index.js +17 -12
  69. package/dist/react/ui/modals/_internal/components/actionModal/index.js +13 -9
  70. package/dist/sdk-config-txlivEKe.d.ts +133 -0
  71. package/dist/{services-BOX67E7W.d.ts → services-BI_w8Eq4.d.ts} +4 -4
  72. package/dist/types/index.d.ts +5 -4
  73. package/dist/types/index.js +9 -6
  74. package/dist/{types-CJLhc2VZ.d.ts → types-isjvwapz.d.ts} +3 -3
  75. package/dist/utils/index.d.ts +1 -1
  76. package/dist/utils/index.js +6 -3
  77. package/package.json +3 -3
  78. package/src/index.ts +1 -0
  79. package/src/react/{hooks/options/__mocks__/marketplaceConfig.msw.ts → _internal/api/__mocks__/builder.msw.ts} +70 -63
  80. package/src/react/_internal/api/__mocks__/metadata.msw.ts +30 -10
  81. package/src/react/_internal/api/builder-api.ts +32 -0
  82. package/src/react/_internal/api/builder.gen.ts +215 -0
  83. package/src/react/_internal/api/marketplace.gen.ts +6 -6
  84. package/src/react/_internal/api/services.ts +9 -2
  85. package/src/react/_internal/databeat/types.ts +1 -0
  86. package/src/react/_internal/wagmi/__tests__/create-config.test.ts +16 -41
  87. package/src/react/_internal/wagmi/create-config.ts +3 -16
  88. package/src/react/_internal/wagmi/get-connectors.ts +31 -21
  89. package/src/react/_internal/wallet/__tests__/wallet.test.ts +30 -0
  90. package/src/react/_internal/wallet/wallet.ts +25 -2
  91. package/src/react/hooks/__tests__/__snapshots__/useMarketplaceConfig.test.tsx.snap +96 -0
  92. package/src/react/hooks/__tests__/useCollection.test.tsx +4 -5
  93. package/src/react/hooks/__tests__/useCurrencies.test.tsx +1 -1
  94. package/src/react/hooks/__tests__/useInventory.test.tsx +15 -16
  95. package/src/react/hooks/__tests__/useListCollections.test.tsx +18 -163
  96. package/src/react/hooks/__tests__/useMarketplaceConfig.test.tsx +10 -11
  97. package/src/react/hooks/options/index.ts +1 -1
  98. package/src/react/hooks/useAutoSelectFeeOption.tsx +1 -0
  99. package/src/react/hooks/useMarketplaceConfig.tsx +2 -2
  100. package/src/react/queries/marketplaceConfig.ts +101 -0
  101. package/src/react/ssr/__tests__/__snapshots__/create-ssr-client.test.ts.snap +1 -0
  102. package/src/react/ssr/create-ssr-client.ts +1 -1
  103. package/src/react/ui/components/collectible-card/CollectibleCard.tsx +2 -2
  104. package/src/react/ui/components/collectible-card/__tests__/CollectibleAsset.test.tsx +72 -42
  105. package/src/react/ui/components/collectible-card/{CollectibleAsset.tsx → collectible-asset/CollectibleAsset.tsx} +44 -44
  106. package/src/react/ui/components/collectible-card/collectible-asset/CollectibleAssetSkeleton.tsx +14 -0
  107. package/src/react/ui/components/collectible-card/collectible-asset/utils.ts +36 -0
  108. package/src/react/ui/modals/BuyModal/hooks/usePaymentModalParams.ts +6 -1
  109. package/src/react/ui/modals/BuyModal/store.ts +1 -0
  110. package/src/react/ui/modals/CreateListingModal/hooks/useTransactionSteps.tsx +20 -2
  111. package/src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx +17 -1
  112. package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +4 -0
  113. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.test.tsx +7 -1
  114. package/src/types/index.ts +7 -1
  115. package/src/types/sdk-config.ts +4 -9
  116. package/src/utils/fetchContentType.ts +101 -0
  117. package/src/utils/getMarketplaceDetails.ts +2 -1
  118. package/src/utils/getSequenceMarketRequestId.ts +32 -0
  119. package/test/mocks/wallet.ts +3 -1
  120. package/test/test-utils.tsx +1 -1
  121. package/tsconfig.tsbuildinfo +1 -1
  122. package/dist/builder-types-BY6eD6vD.d.ts +0 -82
  123. package/dist/chunk-6SEJI7YS.js.map +0 -1
  124. package/dist/chunk-ALICO7NG.js.map +0 -1
  125. package/dist/chunk-BB2PTJHI.js.map +0 -1
  126. package/dist/chunk-HGKWWZWY.js +0 -58
  127. package/dist/chunk-HGKWWZWY.js.map +0 -1
  128. package/dist/chunk-TGFX3TMV.js.map +0 -1
  129. package/dist/sdk-config-DIzJk_tI.d.ts +0 -26
  130. package/src/react/hooks/options/__tests__/marketplaceConfigOptions.test.tsx +0 -134
  131. package/src/react/hooks/options/marketplaceConfigOptions.ts +0 -71
  132. package/src/types/builder-types.ts +0 -88
  133. /package/dist/{chunk-WXKV5N4T.js.map → chunk-35WWD5V6.js.map} +0 -0
  134. /package/dist/{chunk-ZSCZLHKX.js.map → chunk-4XLXOEXQ.js.map} +0 -0
  135. /package/dist/{chunk-SJU6QZHM.js.map → chunk-EODKQL6Y.js.map} +0 -0
  136. /package/dist/{chunk-QMWMJVTX.js.map → chunk-HHYNOPPI.js.map} +0 -0
  137. /package/dist/{chunk-LDZZUYG7.js.map → chunk-YALXP2PW.js.map} +0 -0
  138. /package/dist/{chunk-V3NVAVHV.js.map → chunk-YBOFRP65.js.map} +0 -0
@@ -0,0 +1,135 @@
1
+ // src/utils/_internal/error/base.ts
2
+ var BaseError = class extends Error {
3
+ details;
4
+ shortMessage;
5
+ name = "MarketplaceSdkBaseError";
6
+ constructor(shortMessage, options = {}) {
7
+ super();
8
+ const details = "details" in options ? options.details : "";
9
+ this.message = [
10
+ shortMessage || "An error occurred.",
11
+ "",
12
+ ...details ? [`Details: ${details}`] : []
13
+ ].join("\n");
14
+ if ("cause" in options && options.cause) {
15
+ this.cause = options.cause;
16
+ }
17
+ this.details = details || "";
18
+ this.shortMessage = shortMessage;
19
+ }
20
+ };
21
+
22
+ // src/utils/_internal/error/transaction.ts
23
+ var TransactionError = class extends BaseError {
24
+ name = "TransactionError";
25
+ };
26
+ var ChainSwitchError = class extends TransactionError {
27
+ name = "ChainSwitchError";
28
+ constructor(currentChainId, targetChainId) {
29
+ super(
30
+ `Failed to switch network from ${currentChainId} to ${targetChainId}`,
31
+ {
32
+ details: "The user may have rejected the network switch or there might be a network connectivity issue."
33
+ }
34
+ );
35
+ }
36
+ };
37
+ var ChainSwitchUserRejectedError = class extends TransactionError {
38
+ name = "ChainSwitchUserRejectedError";
39
+ constructor() {
40
+ super("User rejected chain switch", {
41
+ details: "The user rejected the chain switch request."
42
+ });
43
+ }
44
+ };
45
+ var TransactionExecutionError = class extends TransactionError {
46
+ name = "TransactionExecutionError";
47
+ constructor(stepId, cause) {
48
+ super(`Failed to execute transaction step: ${stepId}`, {
49
+ details: cause?.message || "The transaction may have been rejected or failed during execution.",
50
+ cause
51
+ });
52
+ }
53
+ };
54
+ var TransactionSignatureError = class extends TransactionError {
55
+ name = "TransactionSignatureError";
56
+ constructor(stepId, cause) {
57
+ super(`Failed to sign transaction step: ${stepId}`, {
58
+ details: cause?.message || "The signature request may have been rejected by the user.",
59
+ cause
60
+ });
61
+ }
62
+ };
63
+ var NoWalletConnectedError = class extends TransactionError {
64
+ name = "NoWalletConnectedError";
65
+ constructor() {
66
+ super("No wallet connected", {
67
+ details: "Please connect your wallet before attempting this transaction."
68
+ });
69
+ }
70
+ };
71
+ var UserRejectedRequestError = class extends TransactionError {
72
+ name = "UserRejectedRequestError";
73
+ constructor() {
74
+ super("User rejected the request", {
75
+ details: "The user cancelled or rejected the transaction request."
76
+ });
77
+ }
78
+ };
79
+ var InvalidStepError = class extends TransactionError {
80
+ name = "InvalidStepError";
81
+ constructor(stepId, reason) {
82
+ super(`Invalid step configuration for ${stepId}`, {
83
+ details: reason
84
+ });
85
+ }
86
+ };
87
+ var TransactionConfirmationError = class extends TransactionError {
88
+ name = "TransactionConfirmationError";
89
+ constructor(hash, cause) {
90
+ super(`Failed to confirm transaction ${hash}`, {
91
+ details: cause?.message || "The transaction could not be confirmed on the network.",
92
+ cause
93
+ });
94
+ }
95
+ };
96
+ var InvalidContractTypeError = class extends TransactionError {
97
+ name = "InvalidContractTypeError";
98
+ constructor(contractType) {
99
+ super(`Invalid contract type: ${contractType}`, {
100
+ details: "The contract type must be either ERC721 or ERC1155."
101
+ });
102
+ }
103
+ };
104
+ var MissingConfigError = class extends TransactionError {
105
+ name = "MissingConfigError";
106
+ constructor(configName) {
107
+ super(`Missing required config: ${configName}`, {
108
+ details: "A required configuration parameter is missing."
109
+ });
110
+ }
111
+ };
112
+ var WalletInstanceNotFoundError = class extends TransactionError {
113
+ name = "WalletInstanceNotFoundError";
114
+ constructor() {
115
+ super("Wallet instance not found", {
116
+ details: "The wallet instance is undefined"
117
+ });
118
+ }
119
+ };
120
+
121
+ export {
122
+ BaseError,
123
+ ChainSwitchError,
124
+ ChainSwitchUserRejectedError,
125
+ TransactionExecutionError,
126
+ TransactionSignatureError,
127
+ NoWalletConnectedError,
128
+ UserRejectedRequestError,
129
+ InvalidStepError,
130
+ TransactionConfirmationError,
131
+ InvalidContractTypeError,
132
+ MissingConfigError,
133
+ WalletInstanceNotFoundError
134
+ };
135
+ //# sourceMappingURL=chunk-NX52D7NX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/_internal/error/base.ts","../src/utils/_internal/error/transaction.ts"],"sourcesContent":["export type ErrorType<name extends string = 'Error'> = Error & { name: name };\n\nexport type Compute<type> = { [key in keyof type]: type[key] } & unknown;\n\ntype BaseErrorOptions = Compute<\n\t{ details?: string | undefined } | { cause: BaseError | Error }\n>;\n\nexport class BaseError extends Error {\n\tdetails: string;\n\tshortMessage: string;\n\n\tname = 'MarketplaceSdkBaseError';\n\n\tconstructor(shortMessage: string, options: BaseErrorOptions = {}) {\n\t\tsuper();\n\n\t\tconst details = 'details' in options ? options.details : '';\n\t\tthis.message = [\n\t\t\tshortMessage || 'An error occurred.',\n\t\t\t'',\n\t\t\t...(details ? [`Details: ${details}`] : []),\n\t\t].join('\\n');\n\n\t\tif ('cause' in options && options.cause) {\n\t\t\tthis.cause = options.cause;\n\t\t}\n\n\t\tthis.details = details || '';\n\t\tthis.shortMessage = shortMessage;\n\t}\n}\n","import type { Address } from 'viem';\nimport { BaseError } from './base';\n\nexport type TransactionErrorType<name extends string = 'TransactionError'> =\n\tBaseError & { name: name };\n\nexport class TransactionError extends BaseError {\n\toverride name = 'TransactionError';\n}\n\nexport class ChainSwitchError extends TransactionError {\n\toverride name = 'ChainSwitchError';\n\tconstructor(currentChainId: number, targetChainId: number) {\n\t\tsuper(\n\t\t\t`Failed to switch network from ${currentChainId} to ${targetChainId}`,\n\t\t\t{\n\t\t\t\tdetails:\n\t\t\t\t\t'The user may have rejected the network switch or there might be a network connectivity issue.',\n\t\t\t},\n\t\t);\n\t}\n}\n\nexport class ChainSwitchUserRejectedError extends TransactionError {\n\toverride name = 'ChainSwitchUserRejectedError';\n\tconstructor() {\n\t\tsuper('User rejected chain switch', {\n\t\t\tdetails: 'The user rejected the chain switch request.',\n\t\t});\n\t}\n}\n\nexport class TransactionExecutionError extends TransactionError {\n\toverride name = 'TransactionExecutionError';\n\tconstructor(stepId: string, cause?: Error) {\n\t\tsuper(`Failed to execute transaction step: ${stepId}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'The transaction may have been rejected or failed during execution.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class TransactionSignatureError extends TransactionError {\n\toverride name = 'TransactionSignatureError';\n\tconstructor(stepId: string, cause?: Error) {\n\t\tsuper(`Failed to sign transaction step: ${stepId}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'The signature request may have been rejected by the user.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class NoWalletConnectedError extends TransactionError {\n\toverride name = 'NoWalletConnectedError';\n\tconstructor() {\n\t\tsuper('No wallet connected', {\n\t\t\tdetails: 'Please connect your wallet before attempting this transaction.',\n\t\t});\n\t}\n}\n\nexport class NoMarketplaceConfigError extends TransactionError {\n\toverride name = 'NoMarketplaceConfigError';\n\tconstructor() {\n\t\tsuper('Marketplace configuration not found', {\n\t\t\tdetails:\n\t\t\t\t'The marketplace configuration is missing or invalid. This could be due to an initialization error.',\n\t\t});\n\t}\n}\n\nexport class UserRejectedRequestError extends TransactionError {\n\toverride name = 'UserRejectedRequestError';\n\tconstructor() {\n\t\tsuper('User rejected the request', {\n\t\t\tdetails: 'The user cancelled or rejected the transaction request.',\n\t\t});\n\t}\n}\n\nexport class InsufficientFundsError extends TransactionError {\n\toverride name = 'InsufficientFundsError';\n\tconstructor(cause?: Error) {\n\t\tsuper('Insufficient funds for transaction', {\n\t\t\tdetails:\n\t\t\t\t'The wallet does not have enough funds to complete this transaction.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class SignatureExecutionError extends TransactionError {\n\toverride name = 'SignatureExecutionError';\n\tconstructor(signature: string, cause?: Error) {\n\t\tsuper(`Failed to execute signature: ${signature}`, {\n\t\t\tdetails: cause?.message || 'The execution of the signature failed.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class StepExecutionError extends TransactionError {\n\toverride name = 'StepExecutionError';\n\tconstructor(stepId: string, cause?: Error) {\n\t\tsuper(`Failed to execute step ${stepId})`, {\n\t\t\tdetails: cause?.message || 'The step execution failed unexpectedly.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class StepGenerationError extends TransactionError {\n\toverride name = 'StepGenerationError';\n\tconstructor(transactionType: string, cause?: Error) {\n\t\tsuper(`Failed to generate steps for ${transactionType}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message || 'Could not generate the required transaction steps.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class PaymentModalError extends TransactionError {\n\toverride name = 'PaymentModalError';\n\tconstructor(cause?: Error) {\n\t\tsuper('Payment modal operation failed', {\n\t\t\tdetails:\n\t\t\t\tcause?.message || 'The payment modal operation was unsuccessful.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class InvalidStepError extends TransactionError {\n\toverride name = 'InvalidStepError';\n\tconstructor(stepId: string, reason: string) {\n\t\tsuper(`Invalid step configuration for ${stepId}`, {\n\t\t\tdetails: reason,\n\t\t});\n\t}\n}\n\nexport class TransactionConfirmationError extends TransactionError {\n\toverride name = 'TransactionConfirmationError';\n\tconstructor(hash: string, cause?: Error) {\n\t\tsuper(`Failed to confirm transaction ${hash}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'The transaction could not be confirmed on the network.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class OrderNotFoundError extends TransactionError {\n\toverride name = 'OrderNotFoundError';\n\tconstructor(orderId: string) {\n\t\tsuper(`Order ${orderId} not found`, {\n\t\t\tdetails: 'The requested order could not be found in the marketplace.',\n\t\t});\n\t}\n}\n\nexport class MissingStepDataError extends TransactionError {\n\toverride name = 'MissingStepDataError';\n\tconstructor() {\n\t\tsuper('Step is missing required data', {\n\t\t\tdetails:\n\t\t\t\t'The transaction step is missing required \"to\" or \"signature\" data.',\n\t\t});\n\t}\n}\n\nexport class MissingSignatureDataError extends TransactionError {\n\toverride name = 'MissingSignatureDataError';\n\tconstructor() {\n\t\tsuper('Step is missing signature data', {\n\t\t\tdetails:\n\t\t\t\t'The signature step is missing required signature data configuration.',\n\t\t});\n\t}\n}\n\nexport class InvalidSignatureStepError extends TransactionError {\n\toverride name = 'InvalidSignatureStepError';\n\tconstructor(stepId: string) {\n\t\tsuper(`Invalid signature step type: ${stepId}`, {\n\t\t\tdetails: 'The signature step type is not supported.',\n\t\t});\n\t}\n}\n\nexport class MissingPostStepError extends TransactionError {\n\toverride name = 'MissingPostStepError';\n\tconstructor() {\n\t\tsuper('Missing post step configuration', {\n\t\t\tdetails:\n\t\t\t\t'The signature step is missing required post-step configuration.',\n\t\t});\n\t}\n}\n\nexport class UnexpectedStepsError extends TransactionError {\n\toverride name = 'UnexpectedStepsError';\n\tconstructor() {\n\t\tsuper('Unexpected steps found', {\n\t\t\tdetails: 'The transaction contains more steps than expected.',\n\t\t});\n\t}\n}\n\nexport class NoExecutionStepError extends TransactionError {\n\toverride name = 'NoExecutionStepError';\n\tconstructor() {\n\t\tsuper('No execution step found', {\n\t\t\tdetails: 'The transaction is missing the required execution step.',\n\t\t});\n\t}\n}\n\nexport class NoStepsFoundError extends TransactionError {\n\toverride name = 'NoStepsFoundError';\n\tconstructor() {\n\t\tsuper('No steps found', {\n\t\t\tdetails: 'The transaction contains no steps to execute.',\n\t\t});\n\t}\n}\n\nexport class UnknownTransactionTypeError extends TransactionError {\n\toverride name = 'UnknownTransactionTypeError';\n\tconstructor(type: string) {\n\t\tsuper(`Unknown transaction type: ${type}`, {\n\t\t\tdetails: 'The specified transaction type is not supported.',\n\t\t});\n\t}\n}\n\nexport class InvalidContractTypeError extends TransactionError {\n\toverride name = 'InvalidContractTypeError';\n\tconstructor(contractType: string | undefined) {\n\t\tsuper(`Invalid contract type: ${contractType}`, {\n\t\t\tdetails: 'The contract type must be either ERC721 or ERC1155.',\n\t\t});\n\t}\n}\n\nexport class CollectionNotFoundError extends TransactionError {\n\toverride name = 'CollectionNotFoundError';\n\tconstructor(collectionAddress: string) {\n\t\tsuper(`Collection not found: ${collectionAddress}`, {\n\t\t\tdetails:\n\t\t\t\t'The specified collection address could not be found in the marketplace configuration.',\n\t\t});\n\t}\n}\n\nexport class InvalidCurrencyOptionsError extends TransactionError {\n\toverride name = 'InvalidCurrencyOptionsError';\n\tconstructor(currencyOptions: Address[]) {\n\t\tsuper(`Invalid currency options: ${currencyOptions}`, {\n\t\t\tdetails:\n\t\t\t\t'The currency options must be an array of valid currency contract addresses.',\n\t\t});\n\t}\n}\n\nexport class ProjectNotFoundError extends TransactionError {\n\toverride name = 'ProjectNotFoundError';\n\tconstructor(projectId: string, url: string) {\n\t\tsuper('Project not found', {\n\t\t\tdetails: `Project id: ${projectId} not found at ${url}`,\n\t\t});\n\t}\n}\n\nexport class MarketplaceConfigFetchError extends TransactionError {\n\toverride name = 'MarketplaceConfigFetchError';\n\tconstructor(message: string) {\n\t\tsuper('Failed to fetch marketplace config', {\n\t\t\tdetails: message,\n\t\t});\n\t}\n}\n\nexport class MissingConfigError extends TransactionError {\n\toverride name = 'MissingConfigError';\n\tconstructor(configName: string) {\n\t\tsuper(`Missing required config: ${configName}`, {\n\t\t\tdetails: 'A required configuration parameter is missing.',\n\t\t});\n\t}\n}\n\nexport class TransactionValidationError extends TransactionError {\n\toverride name = 'TransactionValidationError';\n\tconstructor(reason: string) {\n\t\tsuper('Transaction validation failed', {\n\t\t\tdetails: reason,\n\t\t});\n\t}\n}\n\nexport class ChainIdUnavailableError extends TransactionError {\n\toverride name = 'ChainIdUnavailableError';\n\tconstructor() {\n\t\tsuper('Chain ID is not available', {\n\t\t\tdetails: 'Could not determine the current chain ID from the wallet.',\n\t\t});\n\t}\n}\n\nexport class TransactionReceiptError extends TransactionError {\n\toverride name = 'TransactionReceiptError';\n\tconstructor(hash: string, cause?: Error) {\n\t\tsuper(`Failed to get transaction receipt for ${hash}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'Could not retrieve the transaction receipt from the network.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class PaymentModalTransactionError extends TransactionError {\n\toverride name = 'PaymentModalTransactionError';\n\tconstructor(hash: string, cause?: Error) {\n\t\tsuper(`Payment modal transaction failed for ${hash}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'The transaction initiated from the payment modal failed.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class CheckoutOptionsError extends TransactionError {\n\toverride name = 'CheckoutOptionsError';\n\tconstructor(cause?: Error) {\n\t\tsuper('Failed to get checkout options', {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'Could not retrieve the checkout options from the marketplace.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class OrdersFetchError extends TransactionError {\n\toverride name = 'OrdersFetchError';\n\tconstructor(orderId: string, cause?: Error) {\n\t\tsuper(`Failed to fetch order ${orderId}`, {\n\t\t\tdetails:\n\t\t\t\tcause?.message ||\n\t\t\t\t'Could not retrieve the order details from the marketplace.',\n\t\t\tcause,\n\t\t});\n\t}\n}\n\nexport class WalletInstanceNotFoundError extends TransactionError {\n\toverride name = 'WalletInstanceNotFoundError';\n\tconstructor() {\n\t\tsuper('Wallet instance not found', {\n\t\t\tdetails: 'The wallet instance is undefined',\n\t\t});\n\t}\n}\n\nexport type TransactionErrorTypes =\n\t| ChainIdUnavailableError\n\t| TransactionReceiptError\n\t| PaymentModalTransactionError\n\t| CheckoutOptionsError\n\t| OrdersFetchError\n\t| TransactionConfirmationError\n\t| TransactionValidationError\n\t| MissingConfigError\n\t| MarketplaceConfigFetchError\n\t| ProjectNotFoundError\n\t| CollectionNotFoundError\n\t| InvalidCurrencyOptionsError\n\t| InvalidContractTypeError\n\t| UnknownTransactionTypeError\n\t| NoStepsFoundError\n\t| NoExecutionStepError\n\t| UnexpectedStepsError\n\t| MissingPostStepError\n\t| InvalidSignatureStepError\n\t| MissingSignatureDataError\n\t| MissingStepDataError\n\t| OrderNotFoundError\n\t| TransactionConfirmationError\n\t| InvalidStepError\n\t| PaymentModalError\n\t| StepGenerationError\n\t| StepExecutionError\n\t| UserRejectedRequestError\n\t| NoMarketplaceConfigError\n\t| InsufficientFundsError\n\t| ChainSwitchUserRejectedError\n\t| ChainSwitchError\n\t| TransactionSignatureError\n\t| TransactionExecutionError\n\t| NoWalletConnectedError\n\t| TransactionError\n\t| WalletInstanceNotFoundError;\n"],"mappings":";AAQO,IAAM,YAAN,cAAwB,MAAM;AAAA,EACpC;AAAA,EACA;AAAA,EAEA,OAAO;AAAA,EAEP,YAAY,cAAsB,UAA4B,CAAC,GAAG;AACjE,UAAM;AAEN,UAAM,UAAU,aAAa,UAAU,QAAQ,UAAU;AACzD,SAAK,UAAU;AAAA,MACd,gBAAgB;AAAA,MAChB;AAAA,MACA,GAAI,UAAU,CAAC,YAAY,OAAO,EAAE,IAAI,CAAC;AAAA,IAC1C,EAAE,KAAK,IAAI;AAEX,QAAI,WAAW,WAAW,QAAQ,OAAO;AACxC,WAAK,QAAQ,QAAQ;AAAA,IACtB;AAE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AAI;AAAA,MACjD,SAAS;AAAA,IACV,CAAC;AAAA,EACF;AACD;AAEO,IAAM,+BAAN,cAA2C,iBAAiB;AAAA,EACzD,OAAO;AAAA,EAChB,YAAY,MAAc,OAAe;AACxC,UAAM,iCAAiC,IAAI,IAAI;AAAA,MAC9C,SACC,OAAO,WACP;AAAA,MACD;AAAA,IACD,CAAC;AAAA,EACF;AACD;AAsFO,IAAM,2BAAN,cAAuC,iBAAiB;AAAA,EACrD,OAAO;AAAA,EAChB,YAAY,cAAkC;AAC7C,UAAM,0BAA0B,YAAY,IAAI;AAAA,MAC/C,SAAS;AAAA,IACV,CAAC;AAAA,EACF;AACD;AAwCO,IAAM,qBAAN,cAAiC,iBAAiB;AAAA,EAC/C,OAAO;AAAA,EAChB,YAAY,YAAoB;AAC/B,UAAM,4BAA4B,UAAU,IAAI;AAAA,MAC/C,SAAS;AAAA,IACV,CAAC;AAAA,EACF;AACD;AAoEO,IAAM,8BAAN,cAA0C,iBAAiB;AAAA,EACxD,OAAO;AAAA,EAChB,cAAc;AACb,UAAM,6BAA6B;AAAA,MAClC,SAAS;AAAA,IACV,CAAC;AAAA,EACF;AACD;","names":[]}
@@ -0,0 +1,32 @@
1
+ import {
2
+ API
3
+ } from "./chunk-D7RVSZAQ.js";
4
+
5
+ // src/react/_internal/api/builder-api.ts
6
+ var BuilderAPI = class extends API {
7
+ constructor(hostname, projectAccessKey, jwtAuth) {
8
+ super(hostname.endsWith("/") ? hostname.slice(0, -1) : hostname, fetch);
9
+ this.projectAccessKey = projectAccessKey;
10
+ this.jwtAuth = jwtAuth;
11
+ this.fetch = this._fetch;
12
+ }
13
+ _fetch = (input, init) => {
14
+ const headers = {};
15
+ const jwtAuth = this.jwtAuth;
16
+ const projectAccessKey = this.projectAccessKey;
17
+ if (jwtAuth && jwtAuth.length > 0) {
18
+ headers.Authorization = `BEARER ${jwtAuth}`;
19
+ }
20
+ if (projectAccessKey && projectAccessKey.length > 0) {
21
+ headers["X-Access-Key"] = projectAccessKey;
22
+ }
23
+ const requestInit = init || {};
24
+ requestInit.headers = { ...init?.headers, ...headers };
25
+ return fetch(input, requestInit);
26
+ };
27
+ };
28
+
29
+ export {
30
+ BuilderAPI
31
+ };
32
+ //# sourceMappingURL=chunk-O34GCB47.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react/_internal/api/builder-api.ts"],"sourcesContent":["import { API } from './builder.gen';\n\nexport class BuilderAPI extends API {\n\tconstructor(\n\t\thostname: string,\n\t\tpublic projectAccessKey?: string,\n\t\tpublic jwtAuth?: string,\n\t) {\n\t\tsuper(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);\n\t\tthis.fetch = this._fetch;\n\t}\n\n\t_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {\n\t\tconst headers: Record<string, string> = {};\n\n\t\tconst jwtAuth = this.jwtAuth;\n\t\tconst projectAccessKey = this.projectAccessKey;\n\n\t\tif (jwtAuth && jwtAuth.length > 0) {\n\t\t\theaders.Authorization = `BEARER ${jwtAuth}`;\n\t\t}\n\n\t\tif (projectAccessKey && projectAccessKey.length > 0) {\n\t\t\theaders['X-Access-Key'] = projectAccessKey;\n\t\t}\n\n\t\tconst requestInit = init || {};\n\t\trequestInit.headers = { ...init?.headers, ...headers };\n\n\t\treturn fetch(input, requestInit);\n\t};\n}\n"],"mappings":";;;;;AAEO,IAAM,aAAN,cAAyB,IAAI;AAAA,EACnC,YACC,UACO,kBACA,SACN;AACD,UAAM,SAAS,SAAS,GAAG,IAAI,SAAS,MAAM,GAAG,EAAE,IAAI,UAAU,KAAK;AAH/D;AACA;AAGP,SAAK,QAAQ,KAAK;AAAA,EACnB;AAAA,EAEA,SAAS,CAAC,OAAoB,SAA0C;AACvE,UAAM,UAAkC,CAAC;AAEzC,UAAM,UAAU,KAAK;AACrB,UAAM,mBAAmB,KAAK;AAE9B,QAAI,WAAW,QAAQ,SAAS,GAAG;AAClC,cAAQ,gBAAgB,UAAU,OAAO;AAAA,IAC1C;AAEA,QAAI,oBAAoB,iBAAiB,SAAS,GAAG;AACpD,cAAQ,cAAc,IAAI;AAAA,IAC3B;AAEA,UAAM,cAAc,QAAQ,CAAC;AAC7B,gBAAY,UAAU,EAAE,GAAG,MAAM,SAAS,GAAG,QAAQ;AAErD,WAAO,MAAM,OAAO,WAAW;AAAA,EAChC;AACD;","names":[]}
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  AddressSchema,
3
3
  QueryArgSchema
4
- } from "./chunk-BB2PTJHI.js";
4
+ } from "./chunk-DWTLVJAW.js";
5
5
  import {
6
6
  collectionKeys,
7
7
  getMetadataClient
8
- } from "./chunk-ALICO7NG.js";
8
+ } from "./chunk-KGM2WLSP.js";
9
9
 
10
10
  // src/react/hooks/options/collectionOptions.ts
11
11
  import { queryOptions } from "@tanstack/react-query";
@@ -35,4 +35,4 @@ export {
35
35
  fetchCollection,
36
36
  collectionOptions
37
37
  };
38
- //# sourceMappingURL=chunk-LDZZUYG7.js.map
38
+ //# sourceMappingURL=chunk-YALXP2PW.js.map
@@ -5,7 +5,7 @@ import {
5
5
  MODAL_OVERLAY_PROPS,
6
6
  useSwitchChainModal,
7
7
  useWallet
8
- } from "./chunk-6SEJI7YS.js";
8
+ } from "./chunk-G3447GIP.js";
9
9
 
10
10
  // src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx
11
11
  import { Button, Modal, Spinner, Text } from "@0xsequence/design-system";
@@ -125,4 +125,4 @@ export {
125
125
  openModal,
126
126
  closeModal
127
127
  };
128
- //# sourceMappingURL=chunk-V3NVAVHV.js.map
128
+ //# sourceMappingURL=chunk-YBOFRP65.js.map
@@ -137,7 +137,8 @@ var KIND_TO_MARKETPLACE = {
137
137
  ["mintify" /* mintify */]: "mintify",
138
138
  ["looks_rare" /* looks_rare */]: "looksrare",
139
139
  ["x2y2" /* x2y2 */]: "x2y2",
140
- ["blur" /* blur */]: "blur"
140
+ ["blur" /* blur */]: "blur",
141
+ ["magic_eden" /* magic_eden */]: "magiceden"
141
142
  };
142
143
  function getMarketplaceDetails({
143
144
  originName,
@@ -203,4 +204,4 @@ export {
203
204
  networkToWagmiChain,
204
205
  cn
205
206
  };
206
- //# sourceMappingURL=chunk-BGY4WXER.js.map
207
+ //# sourceMappingURL=chunk-YEGD7PWE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/address.ts","../src/utils/network.ts","../src/utils/price.ts","../src/utils/getMarketplaceDetails.ts","../src/utils/networkconfigToWagmiChain.ts","../src/utils/cn.ts"],"sourcesContent":["export const truncateMiddle = (\n\taddress: string,\n\tminPrefix = 20,\n\tminSuffix = 3,\n): string => {\n\tif (minPrefix + minSuffix >= 40) {\n\t\treturn address;\n\t}\n\treturn `${address.substring(0, 2 + minPrefix)}…${address.substring(address.length - minSuffix)}`;\n};\n\nexport const truncateEnd = (text: string | undefined, truncateAt: number) => {\n\tif (!text) return '';\n\n\tlet finalText = text;\n\n\tif (text.length >= truncateAt) {\n\t\tfinalText = `${text.slice(0, truncateAt)}...`;\n\t}\n\n\treturn finalText;\n};\n\nexport const compareAddress = (a = '', b = '') => {\n\treturn a.toLowerCase() === b.toLowerCase();\n};\n","import { networks } from '@0xsequence/network';\n\nexport const getPresentableChainName = (chainId: number) => {\n\treturn networks[chainId as keyof typeof networks]?.title ?? 'Unknown Network';\n};\n","import * as dn from 'dnum';\nimport { formatUnits } from 'viem';\n\ntype CalculatePriceDifferencePercentageArgs = {\n\tinputPriceRaw: bigint;\n\tbasePriceRaw: bigint;\n\tdecimals: number;\n};\n\n/**\n * Calculates the percentage difference between two prices\n * @param args - Object containing input price, base price, and decimals\n * @returns The percentage difference as a string with 2 decimal places\n * @example\n * ```ts\n * const diff = calculatePriceDifferencePercentage({\n * inputPriceRaw: 1000000n,\n * basePriceRaw: 900000n,\n * decimals: 6\n * }); // Returns \"11.11\"\n * ```\n */\nexport const calculatePriceDifferencePercentage = ({\n\tinputPriceRaw,\n\tbasePriceRaw,\n\tdecimals,\n}: CalculatePriceDifferencePercentageArgs) => {\n\tconst inputPrice = Number(formatUnits(inputPriceRaw, decimals));\n\tconst basePrice = Number(formatUnits(basePriceRaw, decimals));\n\tconst difference = inputPrice - basePrice;\n\tconst percentageDifference = (difference / basePrice) * 100;\n\n\treturn percentageDifference.toFixed(2);\n};\n\n/**\n * Formats a raw price amount with the specified number of decimal places\n * @param amount - The raw price amount as a bigint\n * @param decimals - Number of decimal places to format to\n * @returns Formatted price string with proper decimal and thousands separators\n * @example\n * ```ts\n * const formatted = formatPrice(1000000n, 6); // Returns \"1.000000\"\n * ```\n */\nexport const formatPrice = (amount: bigint, decimals: number): string => {\n\tconst formattedUnits = Number(formatUnits(amount, decimals));\n\treturn formattedUnits.toLocaleString('en-US', {\n\t\tminimumFractionDigits: 0,\n\t\tmaximumFractionDigits: decimals,\n\t});\n};\n\n/**\n * Calculates the final earnings amount after applying multiple fee percentages\n * @param amount - The raw amount as a bigint (e.g., from a blockchain transaction)\n * @param decimals - The number of decimal places for the currency (e.g., 18 for ETH, 6 for USDC)\n * @param fees - Array of fee percentages to apply (e.g., [2.5, 1.0] for 2.5% and 1% fees)\n * @returns Formatted string representing the final earnings after all fees are applied\n * @throws Will return '0' if there's an error in calculation\n * @example\n * ```ts\n * const earnings = calculateEarningsAfterFees(\n * 1000000000000000000n, // 1 ETH\n * 18, // ETH decimals\n * [2.5, 1.0] // 2.5% and 1% fees\n * ); // Returns \"0.96525\" (1 ETH after 2.5% and 1% fees)\n * ```\n */\nexport const calculateEarningsAfterFees = (\n\tamount: bigint,\n\tdecimals: number,\n\tfees: number[],\n): string => {\n\ttry {\n\t\tconst decimalAmount = Number(formatUnits(amount, decimals));\n\t\tlet earnings = dn.from(decimalAmount.toString(), decimals);\n\n\t\tfor (const fee of fees) {\n\t\t\tif (fee > 0) {\n\t\t\t\tconst feeMultiplier = dn.from((1 - fee / 100).toString(), decimals);\n\t\t\t\tearnings = dn.multiply(earnings, feeMultiplier);\n\t\t\t}\n\t\t}\n\n\t\treturn dn.format(earnings, {\n\t\t\tdigits: decimals,\n\t\t\ttrailingZeros: false,\n\t\t\tlocale: 'en-US',\n\t\t});\n\t} catch (error) {\n\t\tconsole.error('Error calculating earnings after fees:', error);\n\t\treturn '0';\n\t}\n};\n\n/**\n * Formats a price amount with fee applied\n * @param amount - The raw price amount as a bigint\n * @param decimals - Number of decimal places for the currency\n * @param feePercentage - Fee percentage to apply (e.g., 3.5 for 3.5%)\n * @returns Formatted price string with fee applied and proper decimal/thousands separators\n * @example\n * ```ts\n * const priceWithFee = formatPriceWithFee(1000000n, 6, 3.5); // Returns \"1.035\"\n * ```\n */\nexport const formatPriceWithFee = (\n\tamount: bigint,\n\tdecimals: number,\n\tfeePercentage: number,\n): string => {\n\ttry {\n\t\tconst decimalAmount = Number(formatUnits(amount, decimals));\n\t\tconst price = dn.from(decimalAmount.toString(), decimals);\n\t\tconst feeMultiplier = dn.from(\n\t\t\t(1 + feePercentage / 100).toString(),\n\t\t\tdecimals,\n\t\t);\n\t\tconst totalPrice = dn.multiply(price, feeMultiplier);\n\n\t\treturn dn.format(totalPrice, {\n\t\t\tdigits: decimals,\n\t\t\ttrailingZeros: false,\n\t\t\tlocale: 'en-US',\n\t\t});\n\t} catch (error) {\n\t\tconsole.error('Error formatting price with fee:', error);\n\t\treturn '0';\n\t}\n};\n","import type { Image } from '@0xsequence/design-system';\nimport type { ComponentType } from 'react';\nimport {\n\tAlienSwapLogo,\n\tBlurLogo,\n\tLooksRareLogo,\n\tMagicEdenLogo,\n\tMintifyLogo,\n\tOpenSeaLogo,\n\tSequenceLogo,\n\tX2y2Logo,\n} from '../react/ui/components/marketplace-logos';\nimport { MarketplaceKind } from '../types';\n\ninterface Marketplace {\n\tlogo: ComponentType<React.ComponentProps<typeof Image>>;\n\tdisplayName: string;\n}\n\nconst MARKETPLACES: Record<string, Marketplace> = {\n\tsequence: {\n\t\tlogo: SequenceLogo,\n\t\tdisplayName: 'Sequence',\n\t},\n\topensea: {\n\t\tlogo: OpenSeaLogo,\n\t\tdisplayName: 'OpenSea',\n\t},\n\tmagiceden: {\n\t\tlogo: MagicEdenLogo,\n\t\tdisplayName: 'Magic Eden',\n\t},\n\tmintify: {\n\t\tlogo: MintifyLogo,\n\t\tdisplayName: 'Mintify',\n\t},\n\tlooksrare: {\n\t\tlogo: LooksRareLogo,\n\t\tdisplayName: 'Looks Rare',\n\t},\n\tx2y2: {\n\t\tlogo: X2y2Logo,\n\t\tdisplayName: 'X2Y2',\n\t},\n\tblur: {\n\t\tlogo: BlurLogo,\n\t\tdisplayName: 'Blur',\n\t},\n\talienswap: {\n\t\tlogo: AlienSwapLogo,\n\t\tdisplayName: 'AlienSwap',\n\t},\n} as const;\n\nconst KIND_TO_MARKETPLACE: Partial<\n\tRecord<MarketplaceKind, keyof typeof MARKETPLACES>\n> = {\n\t[MarketplaceKind.sequence_marketplace_v1]: 'sequence',\n\t[MarketplaceKind.sequence_marketplace_v2]: 'sequence',\n\t[MarketplaceKind.opensea]: 'opensea',\n\t[MarketplaceKind.mintify]: 'mintify',\n\t[MarketplaceKind.looks_rare]: 'looksrare',\n\t[MarketplaceKind.x2y2]: 'x2y2',\n\t[MarketplaceKind.blur]: 'blur',\n};\n\ntype MarketplaceDetailsProp = {\n\toriginName: string;\n\tkind: MarketplaceKind;\n};\n\n// TODO: add suport for more marketplaces and improve detection of marketplace\nexport function getMarketplaceDetails({\n\toriginName,\n\tkind,\n}: MarketplaceDetailsProp) {\n\tif (\n\t\tkind === MarketplaceKind.sequence_marketplace_v1 ||\n\t\tkind === MarketplaceKind.sequence_marketplace_v2\n\t) {\n\t\treturn MARKETPLACES.sequence;\n\t}\n\n\tlet name = originName.toLowerCase();\n\n\ttry {\n\t\t//Check if the name can be parsed as a url\n\t\tnew URL(name);\n\t\t// if it can we are naively trying to extract the root domain\n\t\tname = getRootDomain(name) || name;\n\t} catch {}\n\n\tname = name.replace(/ /g, '');\n\n\tconst details = MARKETPLACES[name];\n\n\tif (details) {\n\t\treturn details;\n\t}\n\n\tif (KIND_TO_MARKETPLACE[kind]) {\n\t\treturn MARKETPLACES[KIND_TO_MARKETPLACE[kind]];\n\t}\n}\n\nfunction getRootDomain(url: string) {\n\tconst domain = url.replace(/^(https?:\\/\\/)?(www\\.)?/, '');\n\tconst parts = domain.split('.');\n\treturn parts[parts.length - 2] || parts[0];\n}\n","import type { NetworkConfig } from '@0xsequence/network';\nimport type { Chain } from 'viem';\n\nexport const networkToWagmiChain = (network: NetworkConfig): Chain => ({\n\t...network,\n\tid: Number(network.chainId),\n\tname: network.name,\n\tnativeCurrency: { ...network.nativeToken },\n\trpcUrls: {\n\t\tdefault: {\n\t\t\thttp: [network.rpcUrl],\n\t\t},\n\t\tpublic: {\n\t\t\thttp: [network.rpcUrl],\n\t\t},\n\t},\n});\n","import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n"],"mappings":";;;;;;;;;;;;AAAO,IAAM,iBAAiB,CAC7B,SACA,YAAY,IACZ,YAAY,MACA;AACZ,MAAI,YAAY,aAAa,IAAI;AAChC,WAAO;AAAA,EACR;AACA,SAAO,GAAG,QAAQ,UAAU,GAAG,IAAI,SAAS,CAAC,SAAI,QAAQ,UAAU,QAAQ,SAAS,SAAS,CAAC;AAC/F;AAEO,IAAM,cAAc,CAAC,MAA0B,eAAuB;AAC5E,MAAI,CAAC,KAAM,QAAO;AAElB,MAAI,YAAY;AAEhB,MAAI,KAAK,UAAU,YAAY;AAC9B,gBAAY,GAAG,KAAK,MAAM,GAAG,UAAU,CAAC;AAAA,EACzC;AAEA,SAAO;AACR;AAEO,IAAM,iBAAiB,CAAC,IAAI,IAAI,IAAI,OAAO;AACjD,SAAO,EAAE,YAAY,MAAM,EAAE,YAAY;AAC1C;;;ACzBA,SAAS,gBAAgB;AAElB,IAAM,0BAA0B,CAAC,YAAoB;AAC3D,SAAO,SAAS,OAAgC,GAAG,SAAS;AAC7D;;;ACJA,YAAY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B,QAAM,UAAU,aAAa,IAAI;AAEjC,MAAI,SAAS;AACZ,WAAO;AAAA,EACR;AAEA,MAAI,oBAAoB,IAAI,GAAG;AAC9B,WAAO,aAAa,oBAAoB,IAAI,CAAC;AAAA,EAC9C;AACD;AAEA,SAAS,cAAc,KAAa;AACnC,QAAM,SAAS,IAAI,QAAQ,2BAA2B,EAAE;AACxD,QAAM,QAAQ,OAAO,MAAM,GAAG;AAC9B,SAAO,MAAM,MAAM,SAAS,CAAC,KAAK,MAAM,CAAC;AAC1C;;;AC1GO,IAAM,sBAAsB,CAAC,aAAmC;AAAA,EACtE,GAAG;AAAA,EACH,IAAI,OAAO,QAAQ,OAAO;AAAA,EAC1B,MAAM,QAAQ;AAAA,EACd,gBAAgB,EAAE,GAAG,QAAQ,YAAY;AAAA,EACzC,SAAS;AAAA,IACR,SAAS;AAAA,MACR,MAAM,CAAC,QAAQ,MAAM;AAAA,IACtB;AAAA,IACA,QAAQ;AAAA,MACP,MAAM,CAAC,QAAQ,MAAM;AAAA,IACtB;AAAA,EACD;AACD;;;AChBA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC3C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC5B;","names":[]}
1
+ {"version":3,"sources":["../src/utils/address.ts","../src/utils/network.ts","../src/utils/price.ts","../src/utils/getMarketplaceDetails.ts","../src/utils/networkconfigToWagmiChain.ts","../src/utils/cn.ts"],"sourcesContent":["export const truncateMiddle = (\n\taddress: string,\n\tminPrefix = 20,\n\tminSuffix = 3,\n): string => {\n\tif (minPrefix + minSuffix >= 40) {\n\t\treturn address;\n\t}\n\treturn `${address.substring(0, 2 + minPrefix)}…${address.substring(address.length - minSuffix)}`;\n};\n\nexport const truncateEnd = (text: string | undefined, truncateAt: number) => {\n\tif (!text) return '';\n\n\tlet finalText = text;\n\n\tif (text.length >= truncateAt) {\n\t\tfinalText = `${text.slice(0, truncateAt)}...`;\n\t}\n\n\treturn finalText;\n};\n\nexport const compareAddress = (a = '', b = '') => {\n\treturn a.toLowerCase() === b.toLowerCase();\n};\n","import { networks } from '@0xsequence/network';\n\nexport const getPresentableChainName = (chainId: number) => {\n\treturn networks[chainId as keyof typeof networks]?.title ?? 'Unknown Network';\n};\n","import * as dn from 'dnum';\nimport { formatUnits } from 'viem';\n\ntype CalculatePriceDifferencePercentageArgs = {\n\tinputPriceRaw: bigint;\n\tbasePriceRaw: bigint;\n\tdecimals: number;\n};\n\n/**\n * Calculates the percentage difference between two prices\n * @param args - Object containing input price, base price, and decimals\n * @returns The percentage difference as a string with 2 decimal places\n * @example\n * ```ts\n * const diff = calculatePriceDifferencePercentage({\n * inputPriceRaw: 1000000n,\n * basePriceRaw: 900000n,\n * decimals: 6\n * }); // Returns \"11.11\"\n * ```\n */\nexport const calculatePriceDifferencePercentage = ({\n\tinputPriceRaw,\n\tbasePriceRaw,\n\tdecimals,\n}: CalculatePriceDifferencePercentageArgs) => {\n\tconst inputPrice = Number(formatUnits(inputPriceRaw, decimals));\n\tconst basePrice = Number(formatUnits(basePriceRaw, decimals));\n\tconst difference = inputPrice - basePrice;\n\tconst percentageDifference = (difference / basePrice) * 100;\n\n\treturn percentageDifference.toFixed(2);\n};\n\n/**\n * Formats a raw price amount with the specified number of decimal places\n * @param amount - The raw price amount as a bigint\n * @param decimals - Number of decimal places to format to\n * @returns Formatted price string with proper decimal and thousands separators\n * @example\n * ```ts\n * const formatted = formatPrice(1000000n, 6); // Returns \"1.000000\"\n * ```\n */\nexport const formatPrice = (amount: bigint, decimals: number): string => {\n\tconst formattedUnits = Number(formatUnits(amount, decimals));\n\treturn formattedUnits.toLocaleString('en-US', {\n\t\tminimumFractionDigits: 0,\n\t\tmaximumFractionDigits: decimals,\n\t});\n};\n\n/**\n * Calculates the final earnings amount after applying multiple fee percentages\n * @param amount - The raw amount as a bigint (e.g., from a blockchain transaction)\n * @param decimals - The number of decimal places for the currency (e.g., 18 for ETH, 6 for USDC)\n * @param fees - Array of fee percentages to apply (e.g., [2.5, 1.0] for 2.5% and 1% fees)\n * @returns Formatted string representing the final earnings after all fees are applied\n * @throws Will return '0' if there's an error in calculation\n * @example\n * ```ts\n * const earnings = calculateEarningsAfterFees(\n * 1000000000000000000n, // 1 ETH\n * 18, // ETH decimals\n * [2.5, 1.0] // 2.5% and 1% fees\n * ); // Returns \"0.96525\" (1 ETH after 2.5% and 1% fees)\n * ```\n */\nexport const calculateEarningsAfterFees = (\n\tamount: bigint,\n\tdecimals: number,\n\tfees: number[],\n): string => {\n\ttry {\n\t\tconst decimalAmount = Number(formatUnits(amount, decimals));\n\t\tlet earnings = dn.from(decimalAmount.toString(), decimals);\n\n\t\tfor (const fee of fees) {\n\t\t\tif (fee > 0) {\n\t\t\t\tconst feeMultiplier = dn.from((1 - fee / 100).toString(), decimals);\n\t\t\t\tearnings = dn.multiply(earnings, feeMultiplier);\n\t\t\t}\n\t\t}\n\n\t\treturn dn.format(earnings, {\n\t\t\tdigits: decimals,\n\t\t\ttrailingZeros: false,\n\t\t\tlocale: 'en-US',\n\t\t});\n\t} catch (error) {\n\t\tconsole.error('Error calculating earnings after fees:', error);\n\t\treturn '0';\n\t}\n};\n\n/**\n * Formats a price amount with fee applied\n * @param amount - The raw price amount as a bigint\n * @param decimals - Number of decimal places for the currency\n * @param feePercentage - Fee percentage to apply (e.g., 3.5 for 3.5%)\n * @returns Formatted price string with fee applied and proper decimal/thousands separators\n * @example\n * ```ts\n * const priceWithFee = formatPriceWithFee(1000000n, 6, 3.5); // Returns \"1.035\"\n * ```\n */\nexport const formatPriceWithFee = (\n\tamount: bigint,\n\tdecimals: number,\n\tfeePercentage: number,\n): string => {\n\ttry {\n\t\tconst decimalAmount = Number(formatUnits(amount, decimals));\n\t\tconst price = dn.from(decimalAmount.toString(), decimals);\n\t\tconst feeMultiplier = dn.from(\n\t\t\t(1 + feePercentage / 100).toString(),\n\t\t\tdecimals,\n\t\t);\n\t\tconst totalPrice = dn.multiply(price, feeMultiplier);\n\n\t\treturn dn.format(totalPrice, {\n\t\t\tdigits: decimals,\n\t\t\ttrailingZeros: false,\n\t\t\tlocale: 'en-US',\n\t\t});\n\t} catch (error) {\n\t\tconsole.error('Error formatting price with fee:', error);\n\t\treturn '0';\n\t}\n};\n","import type { Image } from '@0xsequence/design-system';\nimport type { ComponentType } from 'react';\nimport {\n\tAlienSwapLogo,\n\tBlurLogo,\n\tLooksRareLogo,\n\tMagicEdenLogo,\n\tMintifyLogo,\n\tOpenSeaLogo,\n\tSequenceLogo,\n\tX2y2Logo,\n} from '../react/ui/components/marketplace-logos';\nimport { MarketplaceKind } from '../types';\n\ninterface Marketplace {\n\tlogo: ComponentType<React.ComponentProps<typeof Image>>;\n\tdisplayName: string;\n}\n\nconst MARKETPLACES: Record<string, Marketplace> = {\n\tsequence: {\n\t\tlogo: SequenceLogo,\n\t\tdisplayName: 'Sequence',\n\t},\n\topensea: {\n\t\tlogo: OpenSeaLogo,\n\t\tdisplayName: 'OpenSea',\n\t},\n\tmagiceden: {\n\t\tlogo: MagicEdenLogo,\n\t\tdisplayName: 'Magic Eden',\n\t},\n\tmintify: {\n\t\tlogo: MintifyLogo,\n\t\tdisplayName: 'Mintify',\n\t},\n\tlooksrare: {\n\t\tlogo: LooksRareLogo,\n\t\tdisplayName: 'Looks Rare',\n\t},\n\tx2y2: {\n\t\tlogo: X2y2Logo,\n\t\tdisplayName: 'X2Y2',\n\t},\n\tblur: {\n\t\tlogo: BlurLogo,\n\t\tdisplayName: 'Blur',\n\t},\n\talienswap: {\n\t\tlogo: AlienSwapLogo,\n\t\tdisplayName: 'AlienSwap',\n\t},\n} as const;\n\nconst KIND_TO_MARKETPLACE: Partial<\n\tRecord<MarketplaceKind, keyof typeof MARKETPLACES>\n> = {\n\t[MarketplaceKind.sequence_marketplace_v1]: 'sequence',\n\t[MarketplaceKind.sequence_marketplace_v2]: 'sequence',\n\t[MarketplaceKind.opensea]: 'opensea',\n\t[MarketplaceKind.mintify]: 'mintify',\n\t[MarketplaceKind.looks_rare]: 'looksrare',\n\t[MarketplaceKind.x2y2]: 'x2y2',\n\t[MarketplaceKind.blur]: 'blur',\n\t[MarketplaceKind.magic_eden]: 'magiceden',\n};\n\ntype MarketplaceDetailsProp = {\n\toriginName: string;\n\tkind: MarketplaceKind;\n};\n\n// TODO: add support for more marketplaces and improve detection of marketplace\nexport function getMarketplaceDetails({\n\toriginName,\n\tkind,\n}: MarketplaceDetailsProp) {\n\tif (\n\t\tkind === MarketplaceKind.sequence_marketplace_v1 ||\n\t\tkind === MarketplaceKind.sequence_marketplace_v2\n\t) {\n\t\treturn MARKETPLACES.sequence;\n\t}\n\n\tlet name = originName.toLowerCase();\n\n\ttry {\n\t\t//Check if the name can be parsed as a url\n\t\tnew URL(name);\n\t\t// if it can we are naively trying to extract the root domain\n\t\tname = getRootDomain(name) || name;\n\t} catch {}\n\n\tname = name.replace(/ /g, '');\n\n\tconst details = MARKETPLACES[name];\n\n\tif (details) {\n\t\treturn details;\n\t}\n\n\tif (KIND_TO_MARKETPLACE[kind]) {\n\t\treturn MARKETPLACES[KIND_TO_MARKETPLACE[kind]];\n\t}\n}\n\nfunction getRootDomain(url: string) {\n\tconst domain = url.replace(/^(https?:\\/\\/)?(www\\.)?/, '');\n\tconst parts = domain.split('.');\n\treturn parts[parts.length - 2] || parts[0];\n}\n","import type { NetworkConfig } from '@0xsequence/network';\nimport type { Chain } from 'viem';\n\nexport const networkToWagmiChain = (network: NetworkConfig): Chain => ({\n\t...network,\n\tid: Number(network.chainId),\n\tname: network.name,\n\tnativeCurrency: { ...network.nativeToken },\n\trpcUrls: {\n\t\tdefault: {\n\t\t\thttp: [network.rpcUrl],\n\t\t},\n\t\tpublic: {\n\t\t\thttp: [network.rpcUrl],\n\t\t},\n\t},\n});\n","import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n"],"mappings":";;;;;;;;;;;;AAAO,IAAM,i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Q;AAAA,MACP,MAAM,CAAC,QAAQ,MAAM;AAAA,IACtB;AAAA,EACD;AACD;;;AChBA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC3C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC5B;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import * as wagmi from 'wagmi';
2
2
  import { Chain, Transport } from 'viem';
3
- import { S as SdkConfig } from './sdk-config-DIzJk_tI.js';
4
- import { g as MarketplaceConfig } from './builder-types-BY6eD6vD.js';
3
+ import { S as SdkConfig } from './sdk-config-txlivEKe.js';
4
+ import { M as MarketplaceConfig } from './marketplaceConfig-B4Fdsmxu.js';
5
5
 
6
6
  declare const createWagmiConfig: (marketplaceConfig: MarketplaceConfig, sdkConfig: SdkConfig, ssr?: boolean) => wagmi.Config<[Chain, ...Chain[]], Record<number, Transport>, wagmi.CreateConnectorFn[]>;
7
7
 
@@ -1,8 +1,8 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import * as _0xsequence_metadata from '@0xsequence/metadata';
3
3
  import { z } from 'zod';
4
- import { S as SdkConfig } from './sdk-config-DIzJk_tI.js';
5
- import { g as MarketplaceConfig } from './builder-types-BY6eD6vD.js';
4
+ import { S as SdkConfig } from './sdk-config-txlivEKe.js';
5
+ import './marketplaceConfig-B4Fdsmxu.js';
6
6
 
7
7
  declare const UseCollectionSchema: z.ZodObject<{
8
8
  chainId: z.ZodNumber;
@@ -59,13 +59,4 @@ type UseCollectionArgs = z.input<typeof UseCollectionSchema>;
59
59
  type UseCollectionReturn = Awaited<ReturnType<typeof fetchCollection>>;
60
60
  declare const useCollection: (args: UseCollectionArgs) => _tanstack_react_query.UseQueryResult<_0xsequence_metadata.ContractInfo, Error>;
61
61
 
62
- declare const marketplaceConfigOptions: (config: Pick<SdkConfig, "projectId"> | SdkConfig) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<MarketplaceConfig, Error, MarketplaceConfig, string[]>, "queryFn"> & {
63
- queryFn?: _tanstack_react_query.QueryFunction<MarketplaceConfig, string[], never> | undefined;
64
- } & {
65
- queryKey: string[] & {
66
- [dataTagSymbol]: MarketplaceConfig;
67
- [dataTagErrorSymbol]: Error;
68
- };
69
- };
70
-
71
- export { type UseCollectionArgs as U, type UseCollectionReturn as a, collectionOptions as c, fetchCollection as f, marketplaceConfigOptions as m, useCollection as u };
62
+ export { type UseCollectionArgs as U, type UseCollectionReturn as a, collectionOptions as c, fetchCollection as f, useCollection as u };
package/dist/index.css CHANGED
@@ -81,7 +81,6 @@
81
81
  --color-text-80: hsla(0, 0%, 100%, 0.8);
82
82
  --color-text-100: hsla(0, 0%, 100%, 1);
83
83
  --spacing-card-width: clamp(175px, 100%, 280px);
84
- --spacing-action-offset: 44px;
85
84
  --scale-hover: 1.165;
86
85
  --animate-shimmer: shimmer 1.5s infinite;
87
86
  --animate-bell-ring: bellRing 0.4s ease-in-out;
@@ -322,8 +321,8 @@
322
321
  .-bottom-5 {
323
322
  bottom: calc(var(--spacing) * -5);
324
323
  }
325
- .-bottom-action-offset {
326
- bottom: calc(var(--spacing-action-offset) * -1);
324
+ .-bottom-16 {
325
+ bottom: calc(var(--spacing) * -16);
327
326
  }
328
327
  .bottom-0 {
329
328
  bottom: calc(var(--spacing) * 0);
@@ -670,6 +669,9 @@
670
669
  .grow {
671
670
  flex-grow: 1;
672
671
  }
672
+ .origin-bottom {
673
+ transform-origin: bottom;
674
+ }
673
675
  .origin-top {
674
676
  transform-origin: top;
675
677
  }
@@ -1456,10 +1458,10 @@
1456
1458
  .ring-inset {
1457
1459
  --tw-ring-inset: inset;
1458
1460
  }
1459
- .group-hover\:translate-y-\[-44px\] {
1461
+ .group-hover\:translate-y-\[-64px\] {
1460
1462
  &:is(:where(.group):hover *) {
1461
1463
  @media (hover: hover) {
1462
- --tw-translate-y: -44px;
1464
+ --tw-translate-y: -64px;
1463
1465
  translate: var(--tw-translate-x) var(--tw-translate-y);
1464
1466
  }
1465
1467
  }