project-cpu-mcp 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +7 -3
- package/dist/api/client.js.map +1 -1
- package/dist/api/types.d.ts +12 -1
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/types.js +2 -0
- package/dist/api/types.js.map +1 -1
- package/dist/contracts/approval.constants.d.ts +4 -0
- package/dist/contracts/approval.constants.d.ts.map +1 -0
- package/dist/contracts/approval.constants.js +4 -0
- package/dist/contracts/approval.constants.js.map +1 -0
- package/dist/contracts/approval.types.d.ts +9 -0
- package/dist/contracts/approval.types.d.ts.map +1 -0
- package/dist/contracts/approval.types.js +2 -0
- package/dist/contracts/approval.types.js.map +1 -0
- package/dist/contracts/approval.utils.d.ts +4 -0
- package/dist/contracts/approval.utils.d.ts.map +1 -0
- package/dist/contracts/approval.utils.js +41 -0
- package/dist/contracts/approval.utils.js.map +1 -0
- package/dist/contracts/erc721.abi.d.ts +27 -0
- package/dist/contracts/erc721.abi.d.ts.map +1 -0
- package/dist/contracts/erc721.abi.js +6 -0
- package/dist/contracts/erc721.abi.js.map +1 -0
- package/dist/contracts/seaport-events.abi.d.ts +95 -0
- package/dist/contracts/seaport-events.abi.d.ts.map +1 -0
- package/dist/contracts/seaport-events.abi.js +52 -0
- package/dist/contracts/seaport-events.abi.js.map +1 -0
- package/dist/contracts/seaport-spender.reader.d.ts +9 -0
- package/dist/contracts/seaport-spender.reader.d.ts.map +1 -0
- package/dist/contracts/seaport-spender.reader.js +101 -0
- package/dist/contracts/seaport-spender.reader.js.map +1 -0
- package/dist/contracts/seaport.constants.d.ts +136 -0
- package/dist/contracts/seaport.constants.d.ts.map +1 -0
- package/dist/contracts/seaport.constants.js +57 -0
- package/dist/contracts/seaport.constants.js.map +1 -0
- package/dist/contracts/seaport.types.d.ts +34 -0
- package/dist/contracts/seaport.types.d.ts.map +1 -0
- package/dist/contracts/seaport.types.js +24 -0
- package/dist/contracts/seaport.types.js.map +1 -0
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/logger/constants.d.ts.map +1 -1
- package/dist/logger/constants.js +2 -0
- package/dist/logger/constants.js.map +1 -1
- package/dist/paybox/auth/types.d.ts +2 -2
- package/dist/paybox/auth/types.d.ts.map +1 -1
- package/dist/paybox/sdk/adapter.d.ts +2 -1
- package/dist/paybox/sdk/adapter.d.ts.map +1 -1
- package/dist/paybox/sdk/adapter.js +24 -0
- package/dist/paybox/sdk/adapter.js.map +1 -1
- package/dist/paybox/types.d.ts +20 -16
- package/dist/paybox/types.d.ts.map +1 -1
- package/dist/paybox/types.js +1 -0
- package/dist/paybox/types.js.map +1 -1
- package/dist/paybox/wallet/manager.d.ts +3 -1
- package/dist/paybox/wallet/manager.d.ts.map +1 -1
- package/dist/paybox/wallet/manager.js +16 -5
- package/dist/paybox/wallet/manager.js.map +1 -1
- package/dist/paybox/wallet/rpc.client.d.ts +1 -0
- package/dist/paybox/wallet/rpc.client.d.ts.map +1 -1
- package/dist/paybox/wallet/rpc.client.js +4 -0
- package/dist/paybox/wallet/rpc.client.js.map +1 -1
- package/dist/paybox/wallet/utils.d.ts +0 -2
- package/dist/paybox/wallet/utils.d.ts.map +1 -1
- package/dist/paybox/wallet/utils.js +2 -65
- package/dist/paybox/wallet/utils.js.map +1 -1
- package/dist/server.constants.d.ts.map +1 -1
- package/dist/server.constants.js +13 -19
- package/dist/server.constants.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +11 -5
- package/dist/server.js.map +1 -1
- package/dist/services/app-config.utils.d.ts.map +1 -1
- package/dist/services/app-config.utils.js +1 -0
- package/dist/services/app-config.utils.js.map +1 -1
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +16 -4
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/market/acceptance.constants.d.ts +5 -0
- package/dist/services/market/acceptance.constants.d.ts.map +1 -0
- package/dist/services/market/acceptance.constants.js +6 -0
- package/dist/services/market/acceptance.constants.js.map +1 -0
- package/dist/services/market/acceptance.service.d.ts +51 -0
- package/dist/services/market/acceptance.service.d.ts.map +1 -0
- package/dist/services/market/acceptance.service.js +595 -0
- package/dist/services/market/acceptance.service.js.map +1 -0
- package/dist/services/market/acceptance.types.d.ts +214 -0
- package/dist/services/market/acceptance.types.d.ts.map +1 -0
- package/dist/services/market/acceptance.types.js +13 -0
- package/dist/services/market/acceptance.types.js.map +1 -0
- package/dist/services/market/acceptance.utils.d.ts +7 -0
- package/dist/services/market/acceptance.utils.d.ts.map +1 -0
- package/dist/services/market/acceptance.utils.js +15 -0
- package/dist/services/market/acceptance.utils.js.map +1 -0
- package/dist/services/market/action.types.d.ts +29 -0
- package/dist/services/market/action.types.d.ts.map +1 -0
- package/dist/services/market/action.types.js +9 -0
- package/dist/services/market/action.types.js.map +1 -0
- package/dist/services/market/budget.d.ts +17 -0
- package/dist/services/market/budget.d.ts.map +1 -0
- package/dist/services/market/budget.js +52 -0
- package/dist/services/market/budget.js.map +1 -0
- package/dist/services/market/budget.scope.d.ts +4 -0
- package/dist/services/market/budget.scope.d.ts.map +1 -0
- package/dist/services/market/budget.scope.js +10 -0
- package/dist/services/market/budget.scope.js.map +1 -0
- package/dist/services/market/budget.utils.d.ts +4 -0
- package/dist/services/market/budget.utils.d.ts.map +1 -0
- package/dist/services/market/budget.utils.js +29 -0
- package/dist/services/market/budget.utils.js.map +1 -0
- package/dist/services/market/cancel.abi.d.ts +108 -0
- package/dist/services/market/cancel.abi.d.ts.map +1 -0
- package/dist/services/market/cancel.abi.js +50 -0
- package/dist/services/market/cancel.abi.js.map +1 -0
- package/dist/services/market/cancel.constants.d.ts +4 -0
- package/dist/services/market/cancel.constants.d.ts.map +1 -0
- package/dist/services/market/cancel.constants.js +5 -0
- package/dist/services/market/cancel.constants.js.map +1 -0
- package/dist/services/market/cancel.service.d.ts +34 -0
- package/dist/services/market/cancel.service.d.ts.map +1 -0
- package/dist/services/market/cancel.service.js +342 -0
- package/dist/services/market/cancel.service.js.map +1 -0
- package/dist/services/market/cancel.types.d.ts +87 -0
- package/dist/services/market/cancel.types.d.ts.map +1 -0
- package/dist/services/market/cancel.types.js +8 -0
- package/dist/services/market/cancel.types.js.map +1 -0
- package/dist/services/market/cancel.utils.d.ts +7 -0
- package/dist/services/market/cancel.utils.d.ts.map +1 -0
- package/dist/services/market/cancel.utils.js +71 -0
- package/dist/services/market/cancel.utils.js.map +1 -0
- package/dist/services/market/client.d.ts +19 -0
- package/dist/services/market/client.d.ts.map +1 -0
- package/dist/services/market/client.js +198 -0
- package/dist/services/market/client.js.map +1 -0
- package/dist/services/market/client.types.d.ts +6 -0
- package/dist/services/market/client.types.d.ts.map +1 -0
- package/dist/services/market/client.types.js +2 -0
- package/dist/services/market/client.types.js.map +1 -0
- package/dist/services/market/constants.d.ts +21 -0
- package/dist/services/market/constants.d.ts.map +1 -0
- package/dist/services/market/constants.js +36 -0
- package/dist/services/market/constants.js.map +1 -0
- package/dist/services/market/error.d.ts +10 -0
- package/dist/services/market/error.d.ts.map +1 -0
- package/dist/services/market/error.js +18 -0
- package/dist/services/market/error.js.map +1 -0
- package/dist/services/market/error.utils.d.ts +10 -0
- package/dist/services/market/error.utils.d.ts.map +1 -0
- package/dist/services/market/error.utils.js +56 -0
- package/dist/services/market/error.utils.js.map +1 -0
- package/dist/services/market/factory.d.ts +4 -0
- package/dist/services/market/factory.d.ts.map +1 -0
- package/dist/services/market/factory.js +86 -0
- package/dist/services/market/factory.js.map +1 -0
- package/dist/services/market/factory.types.d.ts +34 -0
- package/dist/services/market/factory.types.d.ts.map +1 -0
- package/dist/services/market/factory.types.js +2 -0
- package/dist/services/market/factory.types.js.map +1 -0
- package/dist/services/market/fulfilment-proof.d.ts +13 -0
- package/dist/services/market/fulfilment-proof.d.ts.map +1 -0
- package/dist/services/market/fulfilment-proof.js +116 -0
- package/dist/services/market/fulfilment-proof.js.map +1 -0
- package/dist/services/market/fulfilment-proof.reader.d.ts +8 -0
- package/dist/services/market/fulfilment-proof.reader.d.ts.map +1 -0
- package/dist/services/market/fulfilment-proof.reader.js +22 -0
- package/dist/services/market/fulfilment-proof.reader.js.map +1 -0
- package/dist/services/market/fulfilment-proof.types.d.ts +46 -0
- package/dist/services/market/fulfilment-proof.types.d.ts.map +1 -0
- package/dist/services/market/fulfilment-proof.types.js +6 -0
- package/dist/services/market/fulfilment-proof.types.js.map +1 -0
- package/dist/services/market/fulfilment-proof.utils.d.ts +19 -0
- package/dist/services/market/fulfilment-proof.utils.d.ts.map +1 -0
- package/dist/services/market/fulfilment-proof.utils.js +69 -0
- package/dist/services/market/fulfilment-proof.utils.js.map +1 -0
- package/dist/services/market/idempotency.utils.d.ts +4 -0
- package/dist/services/market/idempotency.utils.d.ts.map +1 -0
- package/dist/services/market/idempotency.utils.js +15 -0
- package/dist/services/market/idempotency.utils.js.map +1 -0
- package/dist/services/market/listing.constants.d.ts +7 -0
- package/dist/services/market/listing.constants.d.ts.map +1 -0
- package/dist/services/market/listing.constants.js +8 -0
- package/dist/services/market/listing.constants.js.map +1 -0
- package/dist/services/market/listing.service.d.ts +53 -0
- package/dist/services/market/listing.service.d.ts.map +1 -0
- package/dist/services/market/listing.service.js +671 -0
- package/dist/services/market/listing.service.js.map +1 -0
- package/dist/services/market/listing.types.d.ts +718 -0
- package/dist/services/market/listing.types.d.ts.map +1 -0
- package/dist/services/market/listing.types.js +84 -0
- package/dist/services/market/listing.types.js.map +1 -0
- package/dist/services/market/listing.utils.d.ts +12 -0
- package/dist/services/market/listing.utils.d.ts.map +1 -0
- package/dist/services/market/listing.utils.js +51 -0
- package/dist/services/market/listing.utils.js.map +1 -0
- package/dist/services/market/offer.constants.d.ts +8 -0
- package/dist/services/market/offer.constants.d.ts.map +1 -0
- package/dist/services/market/offer.constants.js +9 -0
- package/dist/services/market/offer.constants.js.map +1 -0
- package/dist/services/market/offer.service.d.ts +54 -0
- package/dist/services/market/offer.service.d.ts.map +1 -0
- package/dist/services/market/offer.service.js +757 -0
- package/dist/services/market/offer.service.js.map +1 -0
- package/dist/services/market/offer.types.d.ts +554 -0
- package/dist/services/market/offer.types.d.ts.map +1 -0
- package/dist/services/market/offer.types.js +73 -0
- package/dist/services/market/offer.types.js.map +1 -0
- package/dist/services/market/offer.utils.d.ts +7 -0
- package/dist/services/market/offer.utils.d.ts.map +1 -0
- package/dist/services/market/offer.utils.js +25 -0
- package/dist/services/market/offer.utils.js.map +1 -0
- package/dist/services/market/profile.client.d.ts +14 -0
- package/dist/services/market/profile.client.d.ts.map +1 -0
- package/dist/services/market/profile.client.js +65 -0
- package/dist/services/market/profile.client.js.map +1 -0
- package/dist/services/market/profile.schemas.d.ts +630 -0
- package/dist/services/market/profile.schemas.d.ts.map +1 -0
- package/dist/services/market/profile.schemas.js +84 -0
- package/dist/services/market/profile.schemas.js.map +1 -0
- package/dist/services/market/profile.utils.d.ts +2 -0
- package/dist/services/market/profile.utils.d.ts.map +1 -0
- package/dist/services/market/profile.utils.js +8 -0
- package/dist/services/market/profile.utils.js.map +1 -0
- package/dist/services/market/purchase.constants.d.ts +5 -0
- package/dist/services/market/purchase.constants.d.ts.map +1 -0
- package/dist/services/market/purchase.constants.js +6 -0
- package/dist/services/market/purchase.constants.js.map +1 -0
- package/dist/services/market/purchase.service.d.ts +48 -0
- package/dist/services/market/purchase.service.d.ts.map +1 -0
- package/dist/services/market/purchase.service.js +564 -0
- package/dist/services/market/purchase.service.js.map +1 -0
- package/dist/services/market/purchase.types.d.ts +207 -0
- package/dist/services/market/purchase.types.d.ts.map +1 -0
- package/dist/services/market/purchase.types.js +13 -0
- package/dist/services/market/purchase.types.js.map +1 -0
- package/dist/services/market/purchase.utils.d.ts +11 -0
- package/dist/services/market/purchase.utils.d.ts.map +1 -0
- package/dist/services/market/purchase.utils.js +29 -0
- package/dist/services/market/purchase.utils.js.map +1 -0
- package/dist/services/market/recovery.constants.d.ts +6 -0
- package/dist/services/market/recovery.constants.d.ts.map +1 -0
- package/dist/services/market/recovery.constants.js +6 -0
- package/dist/services/market/recovery.constants.js.map +1 -0
- package/dist/services/market/recovery.store.d.ts +10 -0
- package/dist/services/market/recovery.store.d.ts.map +1 -0
- package/dist/services/market/recovery.store.js +44 -0
- package/dist/services/market/recovery.store.js.map +1 -0
- package/dist/services/market/service.d.ts +11 -0
- package/dist/services/market/service.d.ts.map +1 -0
- package/dist/services/market/service.js +71 -0
- package/dist/services/market/service.js.map +1 -0
- package/dist/services/market/single-flight.d.ts +6 -0
- package/dist/services/market/single-flight.d.ts.map +1 -0
- package/dist/services/market/single-flight.js +19 -0
- package/dist/services/market/single-flight.js.map +1 -0
- package/dist/services/market/snapshot.schemas.d.ts +385 -0
- package/dist/services/market/snapshot.schemas.d.ts.map +1 -0
- package/dist/services/market/snapshot.schemas.js +67 -0
- package/dist/services/market/snapshot.schemas.js.map +1 -0
- package/dist/services/market/types.d.ts +787 -0
- package/dist/services/market/types.d.ts.map +1 -0
- package/dist/services/market/types.js +216 -0
- package/dist/services/market/types.js.map +1 -0
- package/dist/services/types.d.ts +2 -0
- package/dist/services/types.d.ts.map +1 -1
- package/dist/services/types.js.map +1 -1
- package/dist/session/jwt.utils.d.ts +1 -0
- package/dist/session/jwt.utils.d.ts.map +1 -1
- package/dist/session/jwt.utils.js +4 -0
- package/dist/session/jwt.utils.js.map +1 -1
- package/dist/session/manager.d.ts +1 -1
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js.map +1 -1
- package/dist/tools/authenticate.d.ts +1 -1
- package/dist/tools/authenticate.d.ts.map +1 -1
- package/dist/tools/authenticate.js.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.utils.js +1 -1
- package/dist/tools/config/get-game-config/get-game-config.utils.js.map +1 -1
- package/dist/tools/market/accept-offer/accept-offer.d.ts +4 -0
- package/dist/tools/market/accept-offer/accept-offer.d.ts.map +1 -0
- package/dist/tools/market/accept-offer/accept-offer.js +29 -0
- package/dist/tools/market/accept-offer/accept-offer.js.map +1 -0
- package/dist/tools/market/accept-offer/constants.d.ts +2 -0
- package/dist/tools/market/accept-offer/constants.d.ts.map +1 -0
- package/dist/tools/market/accept-offer/constants.js +27 -0
- package/dist/tools/market/accept-offer/constants.js.map +1 -0
- package/dist/tools/market/accept-offer/format.utils.d.ts +3 -0
- package/dist/tools/market/accept-offer/format.utils.d.ts.map +1 -0
- package/dist/tools/market/accept-offer/format.utils.js +22 -0
- package/dist/tools/market/accept-offer/format.utils.js.map +1 -0
- package/dist/tools/market/accept-offer/types.d.ts +9 -0
- package/dist/tools/market/accept-offer/types.d.ts.map +1 -0
- package/dist/tools/market/accept-offer/types.js +14 -0
- package/dist/tools/market/accept-offer/types.js.map +1 -0
- package/dist/tools/market/buy-cell/buy-cell.d.ts +4 -0
- package/dist/tools/market/buy-cell/buy-cell.d.ts.map +1 -0
- package/dist/tools/market/buy-cell/buy-cell.js +30 -0
- package/dist/tools/market/buy-cell/buy-cell.js.map +1 -0
- package/dist/tools/market/buy-cell/constants.d.ts +2 -0
- package/dist/tools/market/buy-cell/constants.d.ts.map +1 -0
- package/dist/tools/market/buy-cell/constants.js +23 -0
- package/dist/tools/market/buy-cell/constants.js.map +1 -0
- package/dist/tools/market/buy-cell/format.utils.d.ts +3 -0
- package/dist/tools/market/buy-cell/format.utils.d.ts.map +1 -0
- package/dist/tools/market/buy-cell/format.utils.js +17 -0
- package/dist/tools/market/buy-cell/format.utils.js.map +1 -0
- package/dist/tools/market/buy-cell/types.d.ts +6 -0
- package/dist/tools/market/buy-cell/types.d.ts.map +1 -0
- package/dist/tools/market/buy-cell/types.js +10 -0
- package/dist/tools/market/buy-cell/types.js.map +1 -0
- package/dist/tools/market/cancel-order/cancel-order.d.ts +4 -0
- package/dist/tools/market/cancel-order/cancel-order.d.ts.map +1 -0
- package/dist/tools/market/cancel-order/cancel-order.js +29 -0
- package/dist/tools/market/cancel-order/cancel-order.js.map +1 -0
- package/dist/tools/market/cancel-order/constants.d.ts +2 -0
- package/dist/tools/market/cancel-order/constants.d.ts.map +1 -0
- package/dist/tools/market/cancel-order/constants.js +22 -0
- package/dist/tools/market/cancel-order/constants.js.map +1 -0
- package/dist/tools/market/cancel-order/format.utils.d.ts +3 -0
- package/dist/tools/market/cancel-order/format.utils.d.ts.map +1 -0
- package/dist/tools/market/cancel-order/format.utils.js +13 -0
- package/dist/tools/market/cancel-order/format.utils.js.map +1 -0
- package/dist/tools/market/cancel-order/types.d.ts +8 -0
- package/dist/tools/market/cancel-order/types.d.ts.map +1 -0
- package/dist/tools/market/cancel-order/types.js +7 -0
- package/dist/tools/market/cancel-order/types.js.map +1 -0
- package/dist/tools/market/cell-market/cell-market.d.ts +4 -0
- package/dist/tools/market/cell-market/cell-market.d.ts.map +1 -0
- package/dist/tools/market/cell-market/cell-market.js +24 -0
- package/dist/tools/market/cell-market/cell-market.js.map +1 -0
- package/dist/tools/market/cell-market/constants.d.ts +2 -0
- package/dist/tools/market/cell-market/constants.d.ts.map +1 -0
- package/dist/tools/market/cell-market/constants.js +16 -0
- package/dist/tools/market/cell-market/constants.js.map +1 -0
- package/dist/tools/market/format.utils.d.ts +8 -0
- package/dist/tools/market/format.utils.d.ts.map +1 -0
- package/dist/tools/market/format.utils.js +75 -0
- package/dist/tools/market/format.utils.js.map +1 -0
- package/dist/tools/market/list-cell/constants.d.ts +2 -0
- package/dist/tools/market/list-cell/constants.d.ts.map +1 -0
- package/dist/tools/market/list-cell/constants.js +23 -0
- package/dist/tools/market/list-cell/constants.js.map +1 -0
- package/dist/tools/market/list-cell/list-cell.d.ts +4 -0
- package/dist/tools/market/list-cell/list-cell.d.ts.map +1 -0
- package/dist/tools/market/list-cell/list-cell.js +31 -0
- package/dist/tools/market/list-cell/list-cell.js.map +1 -0
- package/dist/tools/market/list-cell/types.d.ts +7 -0
- package/dist/tools/market/list-cell/types.d.ts.map +1 -0
- package/dist/tools/market/list-cell/types.js +15 -0
- package/dist/tools/market/list-cell/types.js.map +1 -0
- package/dist/tools/market/make-offer/constants.d.ts +2 -0
- package/dist/tools/market/make-offer/constants.d.ts.map +1 -0
- package/dist/tools/market/make-offer/constants.js +22 -0
- package/dist/tools/market/make-offer/constants.js.map +1 -0
- package/dist/tools/market/make-offer/format.utils.d.ts +3 -0
- package/dist/tools/market/make-offer/format.utils.d.ts.map +1 -0
- package/dist/tools/market/make-offer/format.utils.js +16 -0
- package/dist/tools/market/make-offer/format.utils.js.map +1 -0
- package/dist/tools/market/make-offer/make-offer.d.ts +4 -0
- package/dist/tools/market/make-offer/make-offer.d.ts.map +1 -0
- package/dist/tools/market/make-offer/make-offer.js +30 -0
- package/dist/tools/market/make-offer/make-offer.js.map +1 -0
- package/dist/tools/market/make-offer/types.d.ts +10 -0
- package/dist/tools/market/make-offer/types.d.ts.map +1 -0
- package/dist/tools/market/make-offer/types.js +10 -0
- package/dist/tools/market/make-offer/types.js.map +1 -0
- package/dist/tools/market/my-listings/constants.d.ts +2 -0
- package/dist/tools/market/my-listings/constants.d.ts.map +1 -0
- package/dist/tools/market/my-listings/constants.js +14 -0
- package/dist/tools/market/my-listings/constants.js.map +1 -0
- package/dist/tools/market/my-listings/my-listings.d.ts +4 -0
- package/dist/tools/market/my-listings/my-listings.d.ts.map +1 -0
- package/dist/tools/market/my-listings/my-listings.js +24 -0
- package/dist/tools/market/my-listings/my-listings.js.map +1 -0
- package/dist/tools/market/my-offers/constants.d.ts +2 -0
- package/dist/tools/market/my-offers/constants.d.ts.map +1 -0
- package/dist/tools/market/my-offers/constants.js +15 -0
- package/dist/tools/market/my-offers/constants.js.map +1 -0
- package/dist/tools/market/my-offers/my-offers.d.ts +4 -0
- package/dist/tools/market/my-offers/my-offers.d.ts.map +1 -0
- package/dist/tools/market/my-offers/my-offers.js +24 -0
- package/dist/tools/market/my-offers/my-offers.js.map +1 -0
- package/dist/tools/market/my-offers-received/constants.d.ts +2 -0
- package/dist/tools/market/my-offers-received/constants.d.ts.map +1 -0
- package/dist/tools/market/my-offers-received/constants.js +16 -0
- package/dist/tools/market/my-offers-received/constants.js.map +1 -0
- package/dist/tools/market/my-offers-received/my-offers-received.d.ts +4 -0
- package/dist/tools/market/my-offers-received/my-offers-received.d.ts.map +1 -0
- package/dist/tools/market/my-offers-received/my-offers-received.js +24 -0
- package/dist/tools/market/my-offers-received/my-offers-received.js.map +1 -0
- package/dist/tools/market/output.types.d.ts +822 -0
- package/dist/tools/market/output.types.d.ts.map +1 -0
- package/dist/tools/market/output.types.js +75 -0
- package/dist/tools/market/output.types.js.map +1 -0
- package/dist/tools/market/register.d.ts +12 -0
- package/dist/tools/market/register.d.ts.map +1 -0
- package/dist/tools/market/register.js +50 -0
- package/dist/tools/market/register.js.map +1 -0
- package/dist/tools/market/types.d.ts +16 -0
- package/dist/tools/market/types.d.ts.map +1 -0
- package/dist/tools/market/types.js +14 -0
- package/dist/tools/market/types.js.map +1 -0
- package/dist/tools/types.d.ts +6 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +5 -0
- package/dist/tools/types.js.map +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/wallet/evm.manager.d.ts +3 -1
- package/dist/wallet/evm.manager.d.ts.map +1 -1
- package/dist/wallet/evm.manager.js +12 -0
- package/dist/wallet/evm.manager.js.map +1 -1
- package/dist/wallet/evm.provider.d.ts.map +1 -1
- package/dist/wallet/evm.provider.js +0 -3
- package/dist/wallet/evm.provider.js.map +1 -1
- package/dist/wallet/types.d.ts +19 -0
- package/dist/wallet/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
import { ACCEPTANCE_EMPTY_CALLDATA, ACCEPTANCE_NO_VALUE, ACCEPTANCE_START_TIME_SKEW_SECONDS, MARKET_ACCEPTANCE_PREPARE_PATH, } from './acceptance.constants.js';
|
|
2
|
+
import { prepareAcceptanceResponseSchema, } from './acceptance.types.js';
|
|
3
|
+
import { acceptanceActionInputs, acceptanceApprovals, acceptanceFulfilment, effectiveAcceptanceDeadline, } from './acceptance.utils.js';
|
|
4
|
+
import { MarketActionTool, } from './action.types.js';
|
|
5
|
+
import { narrowInvocationDeadline } from './budget.utils.js';
|
|
6
|
+
import { MS_PER_SECOND } from './constants.js';
|
|
7
|
+
import { MarketError } from './error.js';
|
|
8
|
+
import { marketActionKey } from './idempotency.utils.js';
|
|
9
|
+
import { sameAddress } from './listing.utils.js';
|
|
10
|
+
import { sameOrderHash } from './purchase.utils.js';
|
|
11
|
+
import { cellTokenIdSchema, evmAddressSchema, MarketActionStage, MarketActionStatus, MarketErrorCode, MarketOfferKind, MarketTransactionKind, orderHashSchema, } from './types.js';
|
|
12
|
+
import { collectionApprovalCall } from '../../contracts/approval.utils.js';
|
|
13
|
+
import { ERC721_OWNERSHIP_ABI } from '../../contracts/erc721.abi.js';
|
|
14
|
+
import { SeaportSpenderReader } from '../../contracts/seaport-spender.reader.js';
|
|
15
|
+
import { SEAPORT_ADDRESS } from '../../contracts/seaport.constants.js';
|
|
16
|
+
import { SeaportSpenderOutcome } from '../../contracts/seaport.types.js';
|
|
17
|
+
import { errorMessage } from '../../utils/error.utils.js';
|
|
18
|
+
import { TxStatus } from '../../wallet/types.js';
|
|
19
|
+
export class MarketAcceptanceService {
|
|
20
|
+
client;
|
|
21
|
+
proof;
|
|
22
|
+
appConfig;
|
|
23
|
+
wallet;
|
|
24
|
+
network;
|
|
25
|
+
singleFlight;
|
|
26
|
+
recovery;
|
|
27
|
+
logger;
|
|
28
|
+
spenders;
|
|
29
|
+
constructor(options) {
|
|
30
|
+
this.spenders = new SeaportSpenderReader({ wallet: options.wallet });
|
|
31
|
+
this.client = options.client;
|
|
32
|
+
this.proof = options.proof;
|
|
33
|
+
this.appConfig = options.appConfig;
|
|
34
|
+
this.wallet = options.wallet;
|
|
35
|
+
this.network = options.network;
|
|
36
|
+
this.singleFlight = options.singleFlight;
|
|
37
|
+
this.recovery = options.recovery;
|
|
38
|
+
this.logger = options.logger;
|
|
39
|
+
}
|
|
40
|
+
async acceptCellOffer(request) {
|
|
41
|
+
const validated = this.requireUsableRequest(request);
|
|
42
|
+
const key = marketActionKey({
|
|
43
|
+
wallet: this.walletAddress(),
|
|
44
|
+
network: this.network,
|
|
45
|
+
tool: MarketActionTool.AcceptCellOffer,
|
|
46
|
+
inputs: acceptanceActionInputs(validated),
|
|
47
|
+
});
|
|
48
|
+
return this.singleFlight.run(key, async () => this.accept(key, validated));
|
|
49
|
+
}
|
|
50
|
+
async accept(key, request) {
|
|
51
|
+
const unresolved = this.recovery.read(key);
|
|
52
|
+
if (unresolved !== null && unresolved.payload.fulfilmentTxHash !== null) {
|
|
53
|
+
return this.settleKnownFulfilment(key, request, unresolved);
|
|
54
|
+
}
|
|
55
|
+
this.reserve(key, MarketActionStage.Prepare, this.emptyPayload());
|
|
56
|
+
let prepared;
|
|
57
|
+
try {
|
|
58
|
+
prepared = await this.prepare(request);
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
this.recovery.forget(key);
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
let payload = { prepared, approvalTxHashes: [], fulfilmentTxHash: null };
|
|
65
|
+
this.reserve(key, MarketActionStage.Prepare, payload);
|
|
66
|
+
for (const approval of acceptanceApprovals(prepared)) {
|
|
67
|
+
let hash;
|
|
68
|
+
try {
|
|
69
|
+
hash = await this.broadcastApproval(approval, request);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
this.recovery.forget(key);
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
payload = { ...payload, approvalTxHashes: [...payload.approvalTxHashes, hash] };
|
|
76
|
+
this.reserve(key, MarketActionStage.Approve, payload);
|
|
77
|
+
}
|
|
78
|
+
return this.fulfil(key, request, payload);
|
|
79
|
+
}
|
|
80
|
+
async fulfil(key, request, payload) {
|
|
81
|
+
let transaction;
|
|
82
|
+
try {
|
|
83
|
+
const prepared = this.requirePrepared(payload);
|
|
84
|
+
this.requireWithinDeadline(prepared, MarketActionStage.Fulfil);
|
|
85
|
+
transaction = this.requireFulfilmentTransaction(prepared, request);
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
this.recovery.forget(key);
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
let hash;
|
|
92
|
+
try {
|
|
93
|
+
hash = await this.send(transaction);
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
this.reserve(key, MarketActionStage.Fulfil, payload);
|
|
97
|
+
throw this.lostBroadcast(request, payload, errorMessage(error));
|
|
98
|
+
}
|
|
99
|
+
const sent = { ...payload, fulfilmentTxHash: hash };
|
|
100
|
+
this.reserve(key, MarketActionStage.Fulfil, sent);
|
|
101
|
+
return this.settle(key, request, sent, MarketActionStatus.Completed);
|
|
102
|
+
}
|
|
103
|
+
async settleKnownFulfilment(key, request, record) {
|
|
104
|
+
this.logger.info('an acceptance of this exact offer is already on-chain — proving it instead of selling again', {
|
|
105
|
+
orderHash: request.orderHash,
|
|
106
|
+
txHash: record.payload.fulfilmentTxHash,
|
|
107
|
+
});
|
|
108
|
+
return this.settle(key, request, record.payload, MarketActionStatus.AlreadyCompleted);
|
|
109
|
+
}
|
|
110
|
+
async settle(key, request, payload, status) {
|
|
111
|
+
const hash = this.requireFulfilmentHash(payload);
|
|
112
|
+
const receipt = await this.confirm(key, request, payload, hash);
|
|
113
|
+
try {
|
|
114
|
+
const collection = await this.requireCellCollection(MarketActionStage.Verify);
|
|
115
|
+
await this.proof.requireFulfilment({
|
|
116
|
+
receipt,
|
|
117
|
+
orderHash: request.orderHash,
|
|
118
|
+
wallet: this.walletAddress(),
|
|
119
|
+
stage: MarketActionStage.Verify,
|
|
120
|
+
boundCell: { collection, tokenId: this.requirePrepared(payload).offer.tokenId },
|
|
121
|
+
});
|
|
122
|
+
await this.requireSoldCell(this.requirePrepared(payload), hash);
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
this.forgetIfSettled(key, error);
|
|
126
|
+
throw error;
|
|
127
|
+
}
|
|
128
|
+
this.recovery.forget(key);
|
|
129
|
+
return this.result(status, request, payload, hash);
|
|
130
|
+
}
|
|
131
|
+
// A terminal proof failure is the end of this intent: the transaction is mined and will never
|
|
132
|
+
// prove anything else, so holding its record would strand one of the bounded slots for the life
|
|
133
|
+
// of the process. A retryable one keeps its record, because repeating re-checks that same
|
|
134
|
+
// transaction instead of sending another.
|
|
135
|
+
forgetIfSettled(key, error) {
|
|
136
|
+
if (error instanceof MarketError && !error.retryable) {
|
|
137
|
+
this.recovery.forget(key);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
async confirm(key, request, payload, hash) {
|
|
141
|
+
let receipt;
|
|
142
|
+
try {
|
|
143
|
+
receipt = await this.wallet.get().waitForReceipt(hash);
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
throw new MarketError({
|
|
147
|
+
code: MarketErrorCode.OutcomeUnknown,
|
|
148
|
+
message: `The acceptance of offer ${request.orderHash} was broadcast as ${hash}, but its receipt could ` +
|
|
149
|
+
`not be read: ${errorMessage(error)}. The transaction is kept, so repeating this call ` +
|
|
150
|
+
're-checks that exact transaction instead of selling anything else.',
|
|
151
|
+
retryable: true,
|
|
152
|
+
retryAfterSeconds: null,
|
|
153
|
+
stage: MarketActionStage.Fulfil,
|
|
154
|
+
txHash: hash,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
if (receipt.status === TxStatus.Success) {
|
|
158
|
+
return receipt;
|
|
159
|
+
}
|
|
160
|
+
this.recovery.forget(key);
|
|
161
|
+
throw new MarketError({
|
|
162
|
+
code: MarketErrorCode.TransactionReverted,
|
|
163
|
+
message: `The acceptance of offer ${request.orderHash} reverted on-chain, so no Cell changed hands and ` +
|
|
164
|
+
`nothing was earned beyond the gas it cost. ${this.knownHashes(payload, hash)} The offer may have ` +
|
|
165
|
+
'been filled or cancelled meanwhile; read the market again and pick an exact offer.',
|
|
166
|
+
retryable: false,
|
|
167
|
+
retryAfterSeconds: null,
|
|
168
|
+
stage: MarketActionStage.Fulfil,
|
|
169
|
+
txHash: hash,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
async requireSoldCell(prepared, hash) {
|
|
173
|
+
const tokenId = prepared.offer.tokenId;
|
|
174
|
+
let owner;
|
|
175
|
+
try {
|
|
176
|
+
owner = await this.readCellOwner(tokenId, MarketActionStage.Verify);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
throw new MarketError({
|
|
180
|
+
code: MarketErrorCode.OutcomeUnknown,
|
|
181
|
+
message: `Offer ${prepared.offer.orderHash} was fulfilled by transaction ${hash}, but who owns Cell ` +
|
|
182
|
+
`${tokenId} now could not be read: ${errorMessage(error)}. The transaction is kept, so ` +
|
|
183
|
+
'repeating this call re-checks it instead of selling anything else.',
|
|
184
|
+
retryable: true,
|
|
185
|
+
retryAfterSeconds: null,
|
|
186
|
+
stage: MarketActionStage.Verify,
|
|
187
|
+
txHash: hash,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
if (!sameAddress(owner, this.walletAddress())) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
throw new MarketError({
|
|
194
|
+
code: MarketErrorCode.WrongOwner,
|
|
195
|
+
message: `Transaction ${hash} carries the fulfilment of offer ${prepared.offer.orderHash}, but Cell ` +
|
|
196
|
+
`${tokenId} is still owned by this wallet ${this.walletAddress()}, so that transaction does not ` +
|
|
197
|
+
'prove the Cell was sold. Nothing else was sent.',
|
|
198
|
+
retryable: false,
|
|
199
|
+
retryAfterSeconds: null,
|
|
200
|
+
stage: MarketActionStage.Verify,
|
|
201
|
+
txHash: hash,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
async prepare(request) {
|
|
205
|
+
const collection = await this.requireCellCollection(MarketActionStage.Prepare);
|
|
206
|
+
const body = { orderHash: request.orderHash };
|
|
207
|
+
if (request.tokenId !== null) {
|
|
208
|
+
body.tokenId = request.tokenId;
|
|
209
|
+
}
|
|
210
|
+
const prepared = await this.client.sendOnce({
|
|
211
|
+
path: MARKET_ACCEPTANCE_PREPARE_PATH,
|
|
212
|
+
method: 'POST',
|
|
213
|
+
body,
|
|
214
|
+
schema: prepareAcceptanceResponseSchema(this.wallet.get().getChainId()),
|
|
215
|
+
stage: MarketActionStage.Prepare,
|
|
216
|
+
label: `Preparing the acceptance of offer ${request.orderHash}`,
|
|
217
|
+
});
|
|
218
|
+
await this.requireTrustworthyPreparation(request, prepared, collection);
|
|
219
|
+
return prepared;
|
|
220
|
+
}
|
|
221
|
+
async requireTrustworthyPreparation(request, prepared, collection) {
|
|
222
|
+
const wallet = this.walletAddress();
|
|
223
|
+
if (!sameAddress(prepared.offer.protocolAddress, SEAPORT_ADDRESS)) {
|
|
224
|
+
throw this.untrustworthy(MarketErrorCode.ProtocolAddressMismatch, `it names protocol contract ${prepared.offer.protocolAddress} instead of the pinned ${SEAPORT_ADDRESS}`, request);
|
|
225
|
+
}
|
|
226
|
+
this.requirePinnedOffer(request, prepared);
|
|
227
|
+
this.requireWithinDeadline(prepared, MarketActionStage.Prepare);
|
|
228
|
+
this.requireBoundCell(request, prepared);
|
|
229
|
+
if (sameAddress(prepared.offer.maker, wallet)) {
|
|
230
|
+
throw this.untrustworthy(MarketErrorCode.WrongOwner, `it is your own offer — this wallet ${wallet} is both the buyer and the seller`, request);
|
|
231
|
+
}
|
|
232
|
+
await this.requireOwnedCell(request, prepared);
|
|
233
|
+
this.requireFulfilmentShape(request, prepared);
|
|
234
|
+
await this.requireCollectionApprovals(request, prepared, collection);
|
|
235
|
+
}
|
|
236
|
+
requirePinnedOffer(request, prepared) {
|
|
237
|
+
const offer = prepared.offer;
|
|
238
|
+
if (!sameOrderHash(offer.orderHash, request.orderHash)) {
|
|
239
|
+
throw this.unavailable(request, `the marketplace answered with offer ${offer.orderHash} instead of the offer you pinned`);
|
|
240
|
+
}
|
|
241
|
+
const now = this.nowSeconds();
|
|
242
|
+
if (offer.expirationTime <= now) {
|
|
243
|
+
throw this.unavailable(request, `it expired at ${offer.expirationTime} and can no longer be accepted`);
|
|
244
|
+
}
|
|
245
|
+
if (offer.startTime > now + ACCEPTANCE_START_TIME_SKEW_SECONDS) {
|
|
246
|
+
throw this.unavailable(request, `it cannot be accepted until ${offer.startTime}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
requireBoundCell(request, prepared) {
|
|
250
|
+
const offer = prepared.offer;
|
|
251
|
+
const selected = offer.kind === MarketOfferKind.Item ? this.itemCell(request, prepared) : request.tokenId;
|
|
252
|
+
if (selected === null) {
|
|
253
|
+
throw this.rejectedInput(`Offer ${request.orderHash} is a ${offer.kind} offer: it names a set of Cells rather than one, so ` +
|
|
254
|
+
'it cannot pick which of your Cells to sell. Pass the exact `tokenId` you want to sell and ' +
|
|
255
|
+
'call the tool again. Nothing was sent.');
|
|
256
|
+
}
|
|
257
|
+
if (prepared.offer.tokenId !== selected) {
|
|
258
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it would sell Cell ${prepared.offer.tokenId} rather than the Cell ${selected} this call is bound to`, request);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
itemCell(request, prepared) {
|
|
262
|
+
const named = prepared.offer.tokenId;
|
|
263
|
+
if (named === null) {
|
|
264
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it calls the order an offer for one exact Cell while naming no Cell at all', request);
|
|
265
|
+
}
|
|
266
|
+
if (request.tokenId !== null && request.tokenId !== named) {
|
|
267
|
+
throw this.rejectedInput(`Offer ${request.orderHash} bids for Cell ${named}, not for the Cell ${request.tokenId} you named. ` +
|
|
268
|
+
'Accept it for that Cell, or pick another offer. Nothing was sent.');
|
|
269
|
+
}
|
|
270
|
+
return named;
|
|
271
|
+
}
|
|
272
|
+
async requireOwnedCell(request, prepared) {
|
|
273
|
+
const tokenId = prepared.offer.tokenId;
|
|
274
|
+
let owner;
|
|
275
|
+
try {
|
|
276
|
+
owner = await this.readCellOwner(tokenId, MarketActionStage.Prepare);
|
|
277
|
+
}
|
|
278
|
+
catch (error) {
|
|
279
|
+
throw new MarketError({
|
|
280
|
+
code: MarketErrorCode.NetworkFailure,
|
|
281
|
+
message: `Offer ${request.orderHash} was not accepted because who owns Cell ${tokenId} could not be ` +
|
|
282
|
+
`read: ${errorMessage(error)}. Nothing was approved and no Cell was sold.`,
|
|
283
|
+
retryable: true,
|
|
284
|
+
retryAfterSeconds: null,
|
|
285
|
+
stage: MarketActionStage.Prepare,
|
|
286
|
+
txHash: null,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
if (sameAddress(owner, this.walletAddress())) {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
throw new MarketError({
|
|
293
|
+
code: MarketErrorCode.WrongOwner,
|
|
294
|
+
message: `Cell ${tokenId} is owned by ${owner} rather than this wallet ${this.walletAddress()}, so this ` +
|
|
295
|
+
`wallet cannot sell it against offer ${request.orderHash}. Nothing was approved and nothing was ` +
|
|
296
|
+
'sent. If you already sold it, that sale stands and this call would only have spent gas.',
|
|
297
|
+
retryable: false,
|
|
298
|
+
retryAfterSeconds: null,
|
|
299
|
+
stage: MarketActionStage.Prepare,
|
|
300
|
+
txHash: null,
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
requireFulfilmentShape(request, prepared) {
|
|
304
|
+
const chainId = this.wallet.get().getChainId();
|
|
305
|
+
const transactions = prepared.transactions;
|
|
306
|
+
const last = transactions.at(-1) ?? null;
|
|
307
|
+
if (last === null || last.kind !== MarketTransactionKind.Fulfillment) {
|
|
308
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it does not end with the one fulfilment transaction that sells the Cell', request);
|
|
309
|
+
}
|
|
310
|
+
if (acceptanceFulfilment(prepared) === null) {
|
|
311
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it asks to send more than one fulfilment transaction for a single offer', request);
|
|
312
|
+
}
|
|
313
|
+
if (last.data === ACCEPTANCE_EMPTY_CALLDATA) {
|
|
314
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'its fulfilment transaction carries no calldata, so it would sell nothing', request);
|
|
315
|
+
}
|
|
316
|
+
if (!sameAddress(last.to, SEAPORT_ADDRESS)) {
|
|
317
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `its fulfilment transaction would hand the Cell to ${last.to} rather than to the pinned protocol ` +
|
|
318
|
+
`contract ${SEAPORT_ADDRESS}`, request);
|
|
319
|
+
}
|
|
320
|
+
const foreignChain = transactions.find((transaction) => transaction.chainId !== chainId);
|
|
321
|
+
if (foreignChain !== undefined) {
|
|
322
|
+
throw this.untrustworthy(MarketErrorCode.ChainMismatch, `it asks to send a "${foreignChain.kind}" transaction on chain ${foreignChain.chainId} while this ` +
|
|
323
|
+
`wallet sells on chain ${chainId}`, request);
|
|
324
|
+
}
|
|
325
|
+
const foreignKind = transactions
|
|
326
|
+
.slice(0, -1)
|
|
327
|
+
.find((transaction) => transaction.kind !== MarketTransactionKind.CollectionApproval);
|
|
328
|
+
if (foreignKind !== undefined) {
|
|
329
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'accepting an offer may only need collection approvals before the fulfilment, but it asks to send ' +
|
|
330
|
+
`a "${foreignKind.kind}" transaction first`, request);
|
|
331
|
+
}
|
|
332
|
+
const valued = transactions.find((transaction) => transaction.value !== ACCEPTANCE_NO_VALUE);
|
|
333
|
+
if (valued !== undefined) {
|
|
334
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it asks to send ${valued.value} native base units out of this wallet for a sale that pays it ` +
|
|
335
|
+
`${prepared.offer.amount} ${prepared.offer.currency.symbol}`, request);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
async requireCollectionApprovals(request, prepared, collection) {
|
|
339
|
+
const approvals = acceptanceApprovals(prepared).map((transaction) => this.requireCollectionOperator(request, transaction, collection));
|
|
340
|
+
const firstApproval = approvals[0];
|
|
341
|
+
if (firstApproval === undefined) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
const operator = await this.requireRegisteredOperator(request, firstApproval.operator);
|
|
345
|
+
const stranger = approvals.find((approval) => !sameAddress(approval.operator, operator));
|
|
346
|
+
if (stranger !== undefined) {
|
|
347
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it asks the wallet to let ${stranger.operator} move every Cell it owns, while this acceptance ` +
|
|
348
|
+
`settles through ${operator}`, request);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
requireCollectionOperator(request, transaction, collection) {
|
|
352
|
+
if (!sameAddress(transaction.to, collection)) {
|
|
353
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it asks the wallet to approve contract ${transaction.to} instead of the Cell collection ` +
|
|
354
|
+
`${collection}`, request);
|
|
355
|
+
}
|
|
356
|
+
const approval = collectionApprovalCall(transaction.data);
|
|
357
|
+
if (approval === null) {
|
|
358
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it asks the wallet to send calldata the Cell collection would not read as approving one operator', request);
|
|
359
|
+
}
|
|
360
|
+
if (!approval.approved) {
|
|
361
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it asks the wallet to withdraw ${approval.operator}'s approval rather than grant the one this ` +
|
|
362
|
+
'sale needs', request);
|
|
363
|
+
}
|
|
364
|
+
return approval;
|
|
365
|
+
}
|
|
366
|
+
async requireRegisteredOperator(request, operator) {
|
|
367
|
+
const answer = await this.spenders.registeredSpender(operator);
|
|
368
|
+
const detail = answer.detail ?? `${operator} is not a registered protocol spender`;
|
|
369
|
+
if (answer.outcome === SeaportSpenderOutcome.Unreachable) {
|
|
370
|
+
throw new MarketError({
|
|
371
|
+
code: MarketErrorCode.NetworkFailure,
|
|
372
|
+
message: `Offer ${request.orderHash} was not accepted because ${detail}. Nothing was approved and no ` +
|
|
373
|
+
'Cell was sold.',
|
|
374
|
+
retryable: true,
|
|
375
|
+
retryAfterSeconds: null,
|
|
376
|
+
stage: MarketActionStage.Prepare,
|
|
377
|
+
txHash: null,
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
if (answer.outcome !== SeaportSpenderOutcome.Resolved || answer.address === null) {
|
|
381
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it would settle this sale through an operator this client cannot justify: ${detail}`, request);
|
|
382
|
+
}
|
|
383
|
+
return answer.address;
|
|
384
|
+
}
|
|
385
|
+
async broadcastApproval(transaction, request) {
|
|
386
|
+
const hash = await this.send(transaction);
|
|
387
|
+
const receipt = await this.wallet.get().waitForReceipt(hash);
|
|
388
|
+
if (receipt.status !== TxStatus.Success) {
|
|
389
|
+
throw new MarketError({
|
|
390
|
+
code: MarketErrorCode.TransactionReverted,
|
|
391
|
+
message: 'The collection approval this sale needs reverted on-chain, so offer ' +
|
|
392
|
+
`${request.orderHash} was never fulfilled and no Cell changed hands.`,
|
|
393
|
+
retryable: false,
|
|
394
|
+
retryAfterSeconds: null,
|
|
395
|
+
stage: MarketActionStage.Approve,
|
|
396
|
+
txHash: hash,
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
return hash;
|
|
400
|
+
}
|
|
401
|
+
async send(transaction) {
|
|
402
|
+
return this.wallet.get().sendTransaction({
|
|
403
|
+
to: transaction.to,
|
|
404
|
+
data: transaction.data,
|
|
405
|
+
value: BigInt(transaction.value),
|
|
406
|
+
gas: null,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
async readCellOwner(tokenId, stage) {
|
|
410
|
+
const collection = await this.requireCellCollection(stage);
|
|
411
|
+
return (await this.wallet.get().readContract({
|
|
412
|
+
address: collection,
|
|
413
|
+
abi: ERC721_OWNERSHIP_ABI,
|
|
414
|
+
functionName: 'ownerOf',
|
|
415
|
+
args: [BigInt(tokenId)],
|
|
416
|
+
}));
|
|
417
|
+
}
|
|
418
|
+
async requireCellCollection(stage) {
|
|
419
|
+
const config = await this.appConfig.load();
|
|
420
|
+
const collection = config.contracts.land;
|
|
421
|
+
if (!evmAddressSchema.safeParse(collection).success) {
|
|
422
|
+
throw new MarketError({
|
|
423
|
+
code: MarketErrorCode.InvalidMarketResponse,
|
|
424
|
+
message: 'The Cell collection contract is not configured for this network, so neither the approval this ' +
|
|
425
|
+
'sale asks for nor who owns the Cell afterwards can be checked.',
|
|
426
|
+
retryable: false,
|
|
427
|
+
retryAfterSeconds: null,
|
|
428
|
+
stage,
|
|
429
|
+
txHash: null,
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
return collection;
|
|
433
|
+
}
|
|
434
|
+
requireFulfilmentTransaction(prepared, request) {
|
|
435
|
+
const fulfilment = acceptanceFulfilment(prepared);
|
|
436
|
+
if (fulfilment !== null) {
|
|
437
|
+
return fulfilment;
|
|
438
|
+
}
|
|
439
|
+
throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it carries no single fulfilment transaction to send', request);
|
|
440
|
+
}
|
|
441
|
+
requireWithinDeadline(prepared, stage) {
|
|
442
|
+
const deadline = effectiveAcceptanceDeadline(prepared);
|
|
443
|
+
narrowInvocationDeadline(deadline);
|
|
444
|
+
if (this.nowSeconds() < deadline) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
throw new MarketError({
|
|
448
|
+
code: MarketErrorCode.PreparedIntentExpired,
|
|
449
|
+
message: 'This prepared acceptance is past the offer expiry, so it can ' +
|
|
450
|
+
'no longer be sent. No Cell was sold. Call the tool again for the same exact offer.',
|
|
451
|
+
retryable: false,
|
|
452
|
+
retryAfterSeconds: null,
|
|
453
|
+
stage,
|
|
454
|
+
txHash: null,
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
requirePrepared(payload) {
|
|
458
|
+
if (payload.prepared === null) {
|
|
459
|
+
throw new MarketError({
|
|
460
|
+
code: MarketErrorCode.InvalidMarketResponse,
|
|
461
|
+
message: 'The acceptance has no prepared offer to fulfil.',
|
|
462
|
+
retryable: false,
|
|
463
|
+
retryAfterSeconds: null,
|
|
464
|
+
stage: MarketActionStage.Fulfil,
|
|
465
|
+
txHash: null,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
return payload.prepared;
|
|
469
|
+
}
|
|
470
|
+
requireFulfilmentHash(payload) {
|
|
471
|
+
if (payload.fulfilmentTxHash === null) {
|
|
472
|
+
throw new MarketError({
|
|
473
|
+
code: MarketErrorCode.InvalidMarketResponse,
|
|
474
|
+
message: 'The acceptance has no broadcast fulfilment transaction to verify.',
|
|
475
|
+
retryable: false,
|
|
476
|
+
retryAfterSeconds: null,
|
|
477
|
+
stage: MarketActionStage.Verify,
|
|
478
|
+
txHash: null,
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
return payload.fulfilmentTxHash;
|
|
482
|
+
}
|
|
483
|
+
requireUsableRequest(request) {
|
|
484
|
+
const orderHash = orderHashSchema.safeParse(request.orderHash);
|
|
485
|
+
if (!orderHash.success) {
|
|
486
|
+
throw this.rejectedInput(`"${request.orderHash}" is not a Market order hash. Pass the exact 32-byte 0x-prefixed ` +
|
|
487
|
+
'`orderHash` of the offer you decided to accept — this tool never picks an offer for you.');
|
|
488
|
+
}
|
|
489
|
+
if (request.tokenId === null) {
|
|
490
|
+
return { orderHash: orderHash.data, tokenId: null };
|
|
491
|
+
}
|
|
492
|
+
const tokenId = cellTokenIdSchema.safeParse(request.tokenId);
|
|
493
|
+
if (!tokenId.success) {
|
|
494
|
+
throw this.rejectedInput(`"${request.tokenId}" is not a canonical Cell token id. Pass a decimal integer with no leading ` +
|
|
495
|
+
'zeroes so that one Cell keeps one identity.');
|
|
496
|
+
}
|
|
497
|
+
return { orderHash: orderHash.data, tokenId: tokenId.data };
|
|
498
|
+
}
|
|
499
|
+
reserve(key, stage, payload) {
|
|
500
|
+
this.recovery.write(key, { tool: MarketActionTool.AcceptCellOffer, stage, payload });
|
|
501
|
+
}
|
|
502
|
+
emptyPayload() {
|
|
503
|
+
return { prepared: null, approvalTxHashes: [], fulfilmentTxHash: null };
|
|
504
|
+
}
|
|
505
|
+
result(status, request, payload, hash) {
|
|
506
|
+
const prepared = this.requirePrepared(payload);
|
|
507
|
+
this.logger.info('the Cell sale is confirmed', {
|
|
508
|
+
tokenId: prepared.offer.tokenId,
|
|
509
|
+
status,
|
|
510
|
+
orderHash: request.orderHash,
|
|
511
|
+
txHash: hash,
|
|
512
|
+
});
|
|
513
|
+
return {
|
|
514
|
+
status,
|
|
515
|
+
stage: MarketActionStage.Verify,
|
|
516
|
+
wallet: this.walletAddress(),
|
|
517
|
+
tokenId: prepared.offer.tokenId,
|
|
518
|
+
orderHash: request.orderHash,
|
|
519
|
+
offer: prepared.offer,
|
|
520
|
+
buyer: prepared.offer.maker,
|
|
521
|
+
amount: prepared.offer.amount,
|
|
522
|
+
currency: prepared.offer.currency,
|
|
523
|
+
approvalTxHashes: [...payload.approvalTxHashes],
|
|
524
|
+
fulfilmentTxHash: hash,
|
|
525
|
+
txHashes: [...payload.approvalTxHashes, hash],
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
lostBroadcast(request, payload, reason) {
|
|
529
|
+
this.logger.error('the fulfilment broadcast left an uncertain outcome', {
|
|
530
|
+
orderHash: request.orderHash,
|
|
531
|
+
reason,
|
|
532
|
+
});
|
|
533
|
+
return new MarketError({
|
|
534
|
+
code: MarketErrorCode.NetworkFailure,
|
|
535
|
+
message: `The acceptance of offer ${request.orderHash} could not be confirmed as broadcast: ${reason}. No ` +
|
|
536
|
+
`second fulfilment was sent in this call. ${this.knownHashes(payload, null)} Repeating this call ` +
|
|
537
|
+
'targets that same exact offer and the same Cell, and can never sell another one; at worst it ' +
|
|
538
|
+
'spends gas on a transaction the protocol rejects.',
|
|
539
|
+
retryable: true,
|
|
540
|
+
retryAfterSeconds: null,
|
|
541
|
+
stage: MarketActionStage.Fulfil,
|
|
542
|
+
txHash: null,
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
knownHashes(payload, hash) {
|
|
546
|
+
const hashes = [...payload.approvalTxHashes, ...(hash === null ? [] : [hash])];
|
|
547
|
+
return hashes.length === 0
|
|
548
|
+
? 'No transaction was broadcast.'
|
|
549
|
+
: `Transactions broadcast in order: ${hashes.join(', ')}.`;
|
|
550
|
+
}
|
|
551
|
+
unavailable(request, detail) {
|
|
552
|
+
this.logger.error('the pinned Market offer cannot be accepted', { orderHash: request.orderHash, detail });
|
|
553
|
+
return new MarketError({
|
|
554
|
+
code: MarketErrorCode.OrderUnavailable,
|
|
555
|
+
message: `Offer ${request.orderHash} cannot be accepted: ${detail}. No replacement offer was selected and ` +
|
|
556
|
+
'nothing was sold. Read the market again and pass another exact `orderHash` if you still want to ' +
|
|
557
|
+
'sell that Cell.',
|
|
558
|
+
retryable: false,
|
|
559
|
+
retryAfterSeconds: null,
|
|
560
|
+
stage: MarketActionStage.Prepare,
|
|
561
|
+
txHash: null,
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
untrustworthy(code, detail, request) {
|
|
565
|
+
this.logger.error('the prepared acceptance does not match the request', {
|
|
566
|
+
orderHash: request.orderHash,
|
|
567
|
+
detail,
|
|
568
|
+
});
|
|
569
|
+
return new MarketError({
|
|
570
|
+
code,
|
|
571
|
+
message: `The prepared acceptance of offer ${request.orderHash} cannot be sent: ${detail}.`,
|
|
572
|
+
retryable: false,
|
|
573
|
+
retryAfterSeconds: null,
|
|
574
|
+
stage: MarketActionStage.Prepare,
|
|
575
|
+
txHash: null,
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
rejectedInput(message) {
|
|
579
|
+
return new MarketError({
|
|
580
|
+
code: MarketErrorCode.InvalidInput,
|
|
581
|
+
message,
|
|
582
|
+
retryable: false,
|
|
583
|
+
retryAfterSeconds: null,
|
|
584
|
+
stage: MarketActionStage.Prepare,
|
|
585
|
+
txHash: null,
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
walletAddress() {
|
|
589
|
+
return this.wallet.get().getAddress();
|
|
590
|
+
}
|
|
591
|
+
nowSeconds() {
|
|
592
|
+
return Math.floor(Date.now() / MS_PER_SECOND);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
//# sourceMappingURL=acceptance.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance.service.js","sourceRoot":"","sources":["../../../src/services/market/acceptance.service.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,yBAAyB,EACzB,mBAAmB,EACnB,kCAAkC,EAClC,8BAA8B,GACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,+BAA+B,GAOlC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,gBAAgB,GAInB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACH,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,eAAe,GAElB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACv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