![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@0xsequence/kit-checkout
Advanced tools
Checkout modal for Sequence Kit. Displays a list a summary of collectibles to be purchased
First install the package:
npm install @0xsequence/kit-checkout
# or
pnpm install @0xsequence/kit-checkout
# or
yarn add @0xsequence/kit-checkout
Then the wallet provider module must placed below the Sequence Kit Core provider.
import { KitCheckoutProvider } from '@0xsequence/kit-checkout'
const App = () => {
return (
<WagmiConfig config={config}>
<KitProvider>
<KitCheckoutProvider>
<Page />
</KitCheckoutProvider>
</KitProvider>
</WagmiConfig>
)
}
The useCheckoutModal
hook must be used to open the modal.
Furthermore, it is necessary to pass a settings object.
import { useCheckoutModal } from '@0xsequence/kit-checkout'
const MyComponent = () => {
const { triggerCheckout } = useCheckoutModal()
const onClick = () => {
const checkoutSettings = {...}
triggerCheckout(checkoutSettings)
}
return (
<button onClick={onClick}>checkout</button>
)
}
The react example has an example configuration for setting up the checkout.
Example settings
const checkoutSettings = {
cryptoCheckout: {...},
orderSummaryItems: {...}
}
The cryptoCheckout
specifies settings regarding checking out with crypto.
An example usecase might be interacting with a minting contract.
The actual cryptoTransaction must be passed down to the triggerTransaction
field.
cons checkoutConfig = {
{...},
cryptoCheckout: {
chainId: 137,
triggerTransaction: async () => { console.log('triggered transaction') },
coinQuantity: {
contractAddress: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
amountRequiredRaw: '10000000000'
},
},
}
This field specific the list of collectibles that will show up in the order summary.
orderSummaryItems: [
{
contractAddress: '0x631998e91476da5b870d741192fc5cbc55f5a52e',
tokenId: '66597',
quantityRaw: '100'
},
]
FAQs
Checkout UI for Sequence Kit
The npm package @0xsequence/kit-checkout receives a total of 377 weekly downloads. As such, @0xsequence/kit-checkout popularity was classified as not popular.
We found that @0xsequence/kit-checkout demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.