├── packages ├── client │ ├── base │ │ ├── .gitignore │ │ ├── src │ │ │ ├── types │ │ │ │ ├── embed │ │ │ │ │ ├── index.ts │ │ │ │ │ └── v3 │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── events │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── EmbeddedCheckoutV3IFrameEmitter.ts │ │ │ │ │ │ └── incoming.ts │ │ │ │ ├── hosted │ │ │ │ │ ├── index.ts │ │ │ │ │ └── v3 │ │ │ │ │ │ └── index.ts │ │ │ │ ├── events │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── public │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── internal │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── payloads.ts │ │ │ │ └── payment-method-management │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── events │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── outgoing.ts │ │ │ │ │ ├── incoming.ts │ │ │ │ │ └── PaymentMethodManagementIFrameEmitter.ts │ │ │ │ │ └── OrderIntents.ts │ │ │ ├── lib │ │ │ │ ├── index.ts │ │ │ │ └── hosted-checkout │ │ │ │ │ └── index.ts │ │ │ ├── services │ │ │ │ ├── embed │ │ │ │ │ ├── index.ts │ │ │ │ │ └── v3 │ │ │ │ │ │ └── index.ts │ │ │ │ ├── hosted │ │ │ │ │ ├── index.ts │ │ │ │ │ └── v3 │ │ │ │ │ │ └── index.ts │ │ │ │ ├── api │ │ │ │ │ └── index.ts │ │ │ │ ├── payment-method-management │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── logging │ │ │ │ │ ├── BrowserLoggerInterface.ts │ │ │ │ │ ├── ConsoleProvider.ts │ │ │ │ │ └── index.ts │ │ │ ├── consts │ │ │ │ ├── index.ts │ │ │ │ └── embed.ts │ │ │ ├── index.ts │ │ │ └── utils │ │ │ │ ├── i18n │ │ │ │ └── dictionaries │ │ │ │ │ ├── koKR.ts │ │ │ │ │ ├── jaJp.ts │ │ │ │ │ ├── zhCN.ts │ │ │ │ │ ├── zhTW.ts │ │ │ │ │ ├── enUS.ts │ │ │ │ │ ├── itIT.ts │ │ │ │ │ ├── trTR.ts │ │ │ │ │ ├── Klingon.ts │ │ │ │ │ ├── deDE.ts │ │ │ │ │ ├── esES.ts │ │ │ │ │ ├── frFR.ts │ │ │ │ │ ├── ptPT.ts │ │ │ │ │ ├── thTH.ts │ │ │ │ │ ├── viVN.ts │ │ │ │ │ ├── ruRU.ts │ │ │ │ │ └── ukUA.ts │ │ │ │ ├── index.ts │ │ │ │ ├── validate.ts │ │ │ │ ├── tasks.ts │ │ │ │ └── appendObjectToQueryParams.ts │ │ ├── tsup.config.ts │ │ ├── tsconfig.json │ │ ├── turbo.json │ │ └── vitest.config.ts │ ├── signers │ │ ├── .gitignore │ │ ├── src │ │ │ ├── index.ts │ │ │ └── communications │ │ │ │ ├── urls.ts │ │ │ │ ├── errorCodes.ts │ │ │ │ └── index.ts │ │ ├── tsup.config.ts │ │ ├── tsconfig.json │ │ ├── turbo.json │ │ └── package.json │ ├── window │ │ ├── .gitignore │ │ ├── tsup.config.ts │ │ ├── src │ │ │ ├── windows │ │ │ │ ├── index.ts │ │ │ │ └── Child.ts │ │ │ ├── utils │ │ │ │ ├── urlToOrigin.ts │ │ │ │ ├── safeUrl.ts │ │ │ │ └── generateRandomString.ts │ │ │ ├── index.ts │ │ │ └── transport │ │ │ │ └── Transport.ts │ │ ├── tsconfig.json │ │ ├── turbo.json │ │ └── package.json │ ├── rn-window │ │ ├── .gitignore │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── polyfills.ts │ │ │ └── rn-webview │ │ │ │ ├── index.ts │ │ │ │ └── Child.ts │ │ ├── tsup.config.ts │ │ ├── vitest.config.ts │ │ ├── tsconfig.json │ │ └── turbo.json │ ├── signers-cryptography │ │ ├── .gitignore │ │ ├── src │ │ │ ├── types │ │ │ │ ├── keys.ts │ │ │ │ ├── index.ts │ │ │ │ ├── providers.ts │ │ │ │ └── encryption.ts │ │ │ ├── primitives │ │ │ │ ├── index.ts │ │ │ │ ├── keys │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── generator.ts │ │ │ │ │ └── derivation.ts │ │ │ │ └── encoding │ │ │ │ │ ├── base58.ts │ │ │ │ │ ├── base64.ts │ │ │ │ │ └── hex.ts │ │ │ ├── algorithms │ │ │ │ ├── asymmetric │ │ │ │ │ ├── index.ts │ │ │ │ │ └── ecdh.ts │ │ │ │ ├── index.ts │ │ │ │ └── symmetric │ │ │ │ │ └── index.ts │ │ │ ├── constants │ │ │ │ ├── index.ts │ │ │ │ ├── crypto-specs.ts │ │ │ │ └── algorithms.ts │ │ │ ├── providers │ │ │ │ ├── index.ts │ │ │ │ ├── key-providers │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── interfaces.ts │ │ │ │ │ └── ecdh-provider.ts │ │ │ │ └── crypto-providers │ │ │ │ │ └── index.ts │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ ├── performance.ts │ │ │ │ └── validation.ts │ │ ├── tsup.config.ts │ │ ├── tsconfig.json │ │ ├── CHANGELOG.md │ │ ├── turbo.json │ │ └── package.json │ ├── wallets │ │ ├── walletconnect │ │ │ ├── .gitignore │ │ │ ├── styles │ │ │ │ └── global.css │ │ │ ├── src │ │ │ │ ├── wallets │ │ │ │ │ ├── index.ts │ │ │ │ │ └── WalletConnectEVMAAWallet.ts │ │ │ │ ├── index.ts │ │ │ │ ├── consts │ │ │ │ │ └── walletconnect.ts │ │ │ │ ├── utils │ │ │ │ │ ├── sendTransaction │ │ │ │ │ │ └── isSendTransactionMethod.ts │ │ │ │ │ ├── signMessage │ │ │ │ │ │ ├── isSignTypedDataMethod.ts │ │ │ │ │ │ └── isSignMessageMethod.ts │ │ │ │ │ ├── classNames.ts │ │ │ │ │ ├── walletconnect │ │ │ │ │ │ └── createProvider.ts │ │ │ │ │ └── wallet │ │ │ │ │ │ └── supportedNamespacesSatisfiesMethod.ts │ │ │ │ ├── types │ │ │ │ │ ├── walletconnect │ │ │ │ │ │ └── RequestMethods.ts │ │ │ │ │ ├── wallet │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── UIConfig.ts │ │ │ │ └── components │ │ │ │ │ └── common │ │ │ │ │ ├── layouts │ │ │ │ │ └── RootLayout.tsx │ │ │ │ │ └── Loader.tsx │ │ │ ├── postcss.config.cjs │ │ │ ├── tailwind.config.cjs │ │ │ ├── tsup.config.ts │ │ │ ├── tsconfig.json │ │ │ └── turbo.json │ │ └── smart-wallet │ │ │ ├── src │ │ │ ├── services │ │ │ │ ├── index.ts │ │ │ │ └── logger.ts │ │ │ ├── utils │ │ │ │ ├── index.ts │ │ │ │ └── constants.ts │ │ │ └── evm │ │ │ │ └── chains │ │ │ │ └── definitions │ │ │ │ ├── story.ts │ │ │ │ └── story-testnet.ts │ │ │ ├── tsup.config.ts │ │ │ ├── .gitignore │ │ │ ├── tsconfig.typedoc.json │ │ │ ├── tsconfig.json │ │ │ ├── turbo.json │ │ │ └── typedoc.json │ ├── ui │ │ ├── react-ui │ │ │ ├── src │ │ │ │ ├── shims │ │ │ │ │ └── noop.ts │ │ │ │ ├── components │ │ │ │ │ ├── embed │ │ │ │ │ │ ├── index.tsx │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ └── CrossmintEmbeddedCheckoutV3.tsx │ │ │ │ │ ├── hosted │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── wallets │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── order-intent │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── card-management │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── CrossmintPaymentMethodManagement.tsx │ │ │ │ │ ├── signers │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── auth │ │ │ │ │ │ ├── EmbeddedAuthForm.tsx │ │ │ │ │ │ ├── AuthFormDialog.tsx │ │ │ │ │ │ └── methods │ │ │ │ │ │ │ ├── web3 │ │ │ │ │ │ │ └── Web3AuthFlow.tsx │ │ │ │ │ │ │ └── email │ │ │ │ │ │ │ └── EmailAuthFlow.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── common │ │ │ │ │ │ ├── ScreenReaderText.tsx │ │ │ │ │ │ ├── SecuredByCrossmint.tsx │ │ │ │ │ │ └── CrossmintLogoV2 │ │ │ │ │ │ │ └── consts.ts │ │ │ │ │ ├── CrossmintNFTDetail.tsx │ │ │ │ │ └── CrossmintNFTCollectionView.tsx │ │ │ │ ├── styles │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── globals.ts │ │ │ │ │ └── theme.ts │ │ │ │ ├── providers │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── auth │ │ │ │ │ │ └── FarcasterProvider.tsx │ │ │ │ │ └── CrossmintProvider.tsx │ │ │ │ ├── consts │ │ │ │ │ └── version.ts │ │ │ │ ├── hooks │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── useEnvironment.ts │ │ │ │ │ ├── useDeepEffect.ts │ │ │ │ │ └── useAuth.ts │ │ │ │ ├── types │ │ │ │ │ ├── passkey.ts │ │ │ │ │ └── wallet.ts │ │ │ │ ├── utils │ │ │ │ │ ├── createPasskeySigner.ts │ │ │ │ │ └── createCrossmintApiClient.ts │ │ │ │ ├── index.ts │ │ │ │ └── icons │ │ │ │ │ ├── x.tsx │ │ │ │ │ ├── mail.tsx │ │ │ │ │ ├── leftArrow.tsx │ │ │ │ │ ├── chevronRight.tsx │ │ │ │ │ ├── twitter.tsx │ │ │ │ │ ├── alert.tsx │ │ │ │ │ ├── phone.tsx │ │ │ │ │ └── passkey.tsx │ │ │ ├── .gitignore │ │ │ ├── tsconfig.json │ │ │ ├── turbo.json │ │ │ ├── vitest.config.ts │ │ │ └── tsup.config.ts │ │ └── react-native │ │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.ts │ │ │ │ └── theme.ts │ │ │ ├── components │ │ │ │ ├── embed │ │ │ │ │ ├── index.ts │ │ │ │ │ └── v3 │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── CrossmintEmbeddedCheckoutV3.tsx │ │ │ │ ├── wallets │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── signers │ │ │ │ │ └── index.ts │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ └── useAuth.ts │ │ │ ├── providers │ │ │ │ └── index.ts │ │ │ ├── utils │ │ │ │ ├── eventEmitter.ts │ │ │ │ ├── createCrossmintApiClient.ts │ │ │ │ └── embed │ │ │ │ │ └── userAgent.ts │ │ │ ├── plugin │ │ │ │ └── mods │ │ │ │ │ └── addQueryToAndroidManifest.ts │ │ │ ├── index.ts │ │ │ └── types │ │ │ │ └── auth.ts │ │ │ ├── app.plugin.js │ │ │ ├── tsup.config.ts │ │ │ ├── tsconfig.json │ │ │ ├── turbo.json │ │ │ └── vitest.config.ts │ ├── verifiable-credentials │ │ ├── .gitignore │ │ ├── tsup.config.ts │ │ ├── src │ │ │ ├── verifiableCredentialsSDK │ │ │ │ ├── verification │ │ │ │ │ └── index.ts │ │ │ │ ├── types │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── nft.ts │ │ │ │ │ ├── chain.ts │ │ │ │ │ ├── credentialFilter.ts │ │ │ │ │ └── verifiableCredential.ts │ │ │ │ └── onchainServices │ │ │ │ │ ├── provider.ts │ │ │ │ │ └── ABI │ │ │ │ │ └── ERC7572.ts │ │ │ └── types │ │ │ │ └── nfts.ts │ │ ├── tsconfig.json │ │ ├── turbo.json │ │ ├── tsconfig.typedoc.json │ │ ├── jest.config.ts │ │ └── typedoc.json │ ├── auth │ │ ├── src │ │ │ ├── utils │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── jwt.ts │ │ │ │ └── cookies.ts │ │ │ └── index.ts │ │ ├── tsup.config.ts │ │ ├── tsconfig.json │ │ ├── turbo.json │ │ └── vitest.config.ts │ └── react-base │ │ ├── src │ │ ├── index.ts │ │ ├── hooks │ │ │ ├── index.ts │ │ │ ├── useCrossmint.tsx │ │ │ ├── useWallet.ts │ │ │ └── useAuth.ts │ │ ├── types │ │ │ └── index.ts │ │ └── providers │ │ │ ├── index.ts │ │ │ └── LoggerProvider.tsx │ │ ├── tsup.config.ts │ │ ├── tsconfig.json │ │ ├── turbo.json │ │ └── vitest.config.ts ├── common │ ├── base │ │ ├── .gitignore │ │ ├── src │ │ │ ├── types │ │ │ │ ├── react │ │ │ │ │ ├── index.ts │ │ │ │ │ └── nftDisplay.ts │ │ │ │ ├── utils.ts │ │ │ │ ├── json.ts │ │ │ │ ├── index.ts │ │ │ │ └── UserIdentifier.ts │ │ │ ├── blockchain │ │ │ │ ├── index.ts │ │ │ │ ├── types │ │ │ │ │ ├── wallet.ts │ │ │ │ │ ├── baseLayers.ts │ │ │ │ │ └── nft.ts │ │ │ │ └── utils │ │ │ │ │ ├── evm │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── isEVMBlockchain.ts │ │ │ │ │ └── chainIdToBlockchain.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── isBlockchain.ts │ │ │ │ │ ├── isBlockchainIncludingTestnets.ts │ │ │ │ │ └── isValidAddress.ts │ │ │ ├── apiClient │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── apiKey │ │ │ │ ├── utils │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── usageOriginToPrefix.ts │ │ │ │ │ ├── environmentToExpectedPublicKey.ts │ │ │ │ │ ├── environmentToCrossmintBaseURL.ts │ │ │ │ │ └── validateApiKeyAndGetCrossmintBaseUrl.ts │ │ │ │ ├── index.ts │ │ │ │ ├── consts.ts │ │ │ │ └── types.ts │ │ │ ├── error │ │ │ │ └── index.ts │ │ │ └── logger │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ ├── tsup.config.ts │ │ ├── tsconfig.json │ │ └── turbo.json │ └── auth │ │ ├── README.md │ │ ├── src │ │ ├── types │ │ │ ├── errors.ts │ │ │ ├── index.ts │ │ │ ├── cookies.ts │ │ │ ├── user.ts │ │ │ └── authmaterial.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ ├── isEmailValid.ts │ │ │ └── constants.ts │ │ └── index.ts │ │ ├── tsup.config.ts │ │ ├── tsconfig.json │ │ ├── turbo.json │ │ └── package.json ├── wallets │ ├── .gitignore │ ├── src │ │ ├── logger │ │ │ └── index.ts │ │ ├── api │ │ │ └── index.ts │ │ ├── signers │ │ │ ├── non-custodial │ │ │ │ └── index.ts │ │ │ └── evm-api-key.ts │ │ ├── utils │ │ │ └── constants.ts │ │ └── chains │ │ │ └── definitions │ │ │ ├── story.ts │ │ │ ├── tempoTestnet.ts │ │ │ ├── arcTestnet.ts │ │ │ └── storyTestnet.ts │ ├── tsup.config.ts │ ├── tsconfig.typedoc.json │ ├── tsconfig.json │ ├── openapi-ts.config.ts │ ├── turbo.json │ └── typedoc.json ├── crossmint │ └── README.md └── server │ ├── src │ ├── auth │ │ ├── types │ │ │ └── index.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ ├── constants.ts │ │ │ └── jwksClient.ts │ │ └── index.ts │ └── index.ts │ ├── tsup.config.ts │ ├── tsconfig.json │ ├── turbo.json │ └── package.json ├── apps ├── auth │ ├── node-and-express-server │ │ ├── .env.example │ │ ├── package.json │ │ └── .gitignore │ ├── remix-ssr │ │ ├── .gitignore │ │ ├── .env.example │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── logo-dark.png │ │ │ └── logo-light.png │ │ ├── postcss.config.js │ │ ├── remix.config.js │ │ ├── app │ │ │ ├── tailwind.css │ │ │ ├── entry.client.tsx │ │ │ └── routes │ │ │ │ ├── api.logout.tsx │ │ │ │ └── api.refresh.tsx │ │ ├── vite.config.ts │ │ └── tailwind.config.ts │ └── nextjs-ssr │ │ ├── src │ │ ├── app │ │ │ ├── favicon.ico │ │ │ ├── globals.css │ │ │ └── api │ │ │ │ ├── logout │ │ │ │ └── route.ts │ │ │ │ └── refresh │ │ │ │ └── route.ts │ │ └── providers │ │ │ └── CrossmintProviders.tsx │ │ ├── .env.example │ │ ├── postcss.config.mjs │ │ ├── turbo.json │ │ ├── next.config.mjs │ │ ├── .gitignore │ │ ├── tailwind.config.ts │ │ ├── package.json │ │ └── tsconfig.json ├── wallets │ ├── smart-wallet │ │ ├── next │ │ │ ├── .env.example │ │ │ ├── public │ │ │ │ ├── emoji-nft.png │ │ │ │ ├── fireworks.gif │ │ │ │ └── icons │ │ │ │ │ └── eth.png │ │ │ ├── src │ │ │ │ ├── app │ │ │ │ │ └── favicon.ico │ │ │ │ ├── components │ │ │ │ │ ├── skeleton.tsx │ │ │ │ │ ├── signin-auth-button.tsx │ │ │ │ │ └── secured-by-crossmint.tsx │ │ │ │ ├── lib │ │ │ │ │ └── utils.ts │ │ │ │ └── icons │ │ │ │ │ └── logout.tsx │ │ │ ├── postcss.config.mjs │ │ │ ├── turbo.json │ │ │ ├── next.config.mjs │ │ │ ├── .gitignore │ │ │ └── tsconfig.json │ │ └── expo │ │ │ ├── .env.example │ │ │ ├── assets │ │ │ ├── images │ │ │ │ ├── icon.png │ │ │ │ ├── favicon.png │ │ │ │ ├── react-logo.png │ │ │ │ ├── adaptive-icon.png │ │ │ │ ├── react-logo@2x.png │ │ │ │ ├── react-logo@3x.png │ │ │ │ ├── splash-icon.png │ │ │ │ └── partial-react-logo.png │ │ │ └── fonts │ │ │ │ └── SpaceMono-Regular.ttf │ │ │ ├── utils │ │ │ └── polyfills.ts │ │ │ ├── tsconfig.json │ │ │ ├── README.md │ │ │ └── .gitignore │ └── quickstart-devkit │ │ ├── e2e │ │ └── helpers │ │ │ └── index.ts │ │ ├── app │ │ └── favicon.ico │ │ ├── postcss.config.mjs │ │ ├── next.config.ts │ │ ├── public │ │ ├── check.svg │ │ ├── circle-check-big.svg │ │ ├── copy.svg │ │ ├── window.svg │ │ ├── file.svg │ │ └── xlm.svg │ │ ├── turbo.json │ │ ├── lib │ │ └── utils.ts │ │ ├── .env.template │ │ ├── .gitignore │ │ └── tsconfig.json └── payments │ └── nextjs │ ├── .eslintrc.json │ ├── pages │ ├── index.tsx │ └── _app.tsx │ ├── public │ └── favicon.ico │ ├── next.config.js │ ├── next-env.d.ts │ ├── turbo.json │ ├── app │ ├── layout.tsx │ └── payment-method-management │ │ ├── components │ │ └── ClientProviders.tsx │ │ └── page.tsx │ ├── .gitignore │ ├── tsconfig.json │ └── components │ └── hosted-v3 │ └── HostedCheckoutV3ClientProviders.tsx ├── pnpm-workspace.yaml ├── .gitignore ├── .npmrc ├── .editorconfig ├── .changeset ├── purple-onions-pretend.md ├── config.json └── README.md ├── lerna.json ├── turbo.json ├── tsup.config.base.ts ├── pull_request_template.md ├── .github └── workflows │ └── pr-stats-slack.yml └── tsconfig.base.json /packages/client/base/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/client/signers/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/client/window/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/common/base/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/client/rn-window/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/wallets/.gitignore: -------------------------------------------------------------------------------- 1 | src/api/gen/ 2 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/crossmint/README.md: -------------------------------------------------------------------------------- 1 | # @crossmint/sdk 2 | 3 | TODO 4 | -------------------------------------------------------------------------------- /packages/common/auth/README.md: -------------------------------------------------------------------------------- 1 | # @crossmint/common-sdk-auth 2 | 3 | -------------------------------------------------------------------------------- /packages/wallets/src/logger/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./init"; 2 | -------------------------------------------------------------------------------- /apps/auth/node-and-express-server/.env.example: -------------------------------------------------------------------------------- 1 | SERVER_CROSSMINT_API_KEY= -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_CROSSMINT_API_KEY= -------------------------------------------------------------------------------- /packages/client/base/src/types/embed/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./v3"; 2 | -------------------------------------------------------------------------------- /packages/client/base/src/types/hosted/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./v3"; 2 | -------------------------------------------------------------------------------- /packages/client/rn-window/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./rn-webview"; 2 | -------------------------------------------------------------------------------- /packages/server/src/auth/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./request"; 2 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/.env.example: -------------------------------------------------------------------------------- 1 | EXPO_PUBLIC_CROSSMINT_API_KEY= 2 | -------------------------------------------------------------------------------- /packages/client/base/src/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./hosted-checkout"; 2 | -------------------------------------------------------------------------------- /packages/client/base/src/services/embed/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./v3"; 2 | -------------------------------------------------------------------------------- /packages/client/base/src/services/hosted/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./v3"; 2 | -------------------------------------------------------------------------------- /packages/client/signers/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./communications"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/shims/noop.ts: -------------------------------------------------------------------------------- 1 | export default () => {}; 2 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | docs/* 3 | coverage/ -------------------------------------------------------------------------------- /packages/client/base/src/lib/hosted-checkout/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./Order"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/styles/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./theme"; 2 | -------------------------------------------------------------------------------- /packages/common/base/src/types/react/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./nftDisplay"; 2 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | /.cache 4 | /build 5 | .env 6 | -------------------------------------------------------------------------------- /packages/client/base/src/services/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./APIErrorService"; 2 | -------------------------------------------------------------------------------- /packages/client/rn-window/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | import "react-native-get-random-values"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/components/embed/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./v3"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/embed/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./v3"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/hosted/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./v3"; 2 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./logger"; 2 | -------------------------------------------------------------------------------- /apps/payments/nextjs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /packages/wallets/src/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./client"; 2 | export * from "./types"; 3 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | package 3 | package.tgz 4 | yarn-error.log 5 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_CLIENT_CROSSMINT_API_KEY= 2 | SERVER_CROSSMINT_API_KEY= -------------------------------------------------------------------------------- /apps/payments/nextjs/pages/index.tsx: -------------------------------------------------------------------------------- 1 | export default function Index() { 2 | return null; 3 | } 4 | -------------------------------------------------------------------------------- /packages/client/auth/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | export const TIME_BEFORE_EXPIRING_JWT_IN_SECONDS = 120; 2 | -------------------------------------------------------------------------------- /packages/client/base/src/types/hosted/v3/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CrossmintHostedCheckoutV3Props"; 2 | -------------------------------------------------------------------------------- /packages/common/auth/src/types/errors.ts: -------------------------------------------------------------------------------- 1 | export class CrossmintAuthenticationError extends Error {} 2 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./types"; 2 | export * from "./utils"; 3 | -------------------------------------------------------------------------------- /packages/server/src/auth/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./jwt"; 2 | export * from "./constants"; 3 | -------------------------------------------------------------------------------- /packages/client/base/src/types/events/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./public"; 2 | export * from "./internal"; 3 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/app.plugin.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./dist/plugin/withGooglePay"); 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/wallets/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./ExportPrivateKeyButton"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/styles/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./globals"; 2 | export * from "./theme"; 3 | -------------------------------------------------------------------------------- /packages/common/auth/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./constants"; 2 | export * from "./isEmailValid"; 3 | -------------------------------------------------------------------------------- /packages/client/base/src/services/embed/v3/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./crossmintEmbeddedCheckoutV3Service"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/components/wallets/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./ExportPrivateKeyButton"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/embed/v3/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CrossmintEmbeddedCheckoutV3"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/hosted/v3/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CrossmintHostedCheckoutV3"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/order-intent/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./OrderIntentVerification"; 2 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/types/keys.ts: -------------------------------------------------------------------------------- 1 | export type EncodingFormat = "base64" | "base58" | "hex"; 2 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/components/embed/v3/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CrossmintEmbeddedCheckoutV3"; 2 | -------------------------------------------------------------------------------- /packages/common/base/src/apiClient/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./ApiClient"; 2 | export * from "./CrossmintApiClient"; 3 | -------------------------------------------------------------------------------- /packages/client/base/src/services/payment-method-management/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./paymentMethodManagementService"; 2 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/primitives/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./keys"; 2 | export * from "./encoding"; 3 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/card-management/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CrossmintPaymentMethodManagement"; 2 | -------------------------------------------------------------------------------- /packages/server/src/index.ts: -------------------------------------------------------------------------------- 1 | export { createCrossmint } from "@crossmint/common-sdk-base"; 2 | export * from "./auth"; 3 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/algorithms/asymmetric/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./ecdh"; 2 | export * from "./hpke"; 3 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/algorithms/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./symmetric"; 2 | export * from "./asymmetric"; 3 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/algorithms/symmetric/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./aes-gcm"; 2 | export * from "./fpe"; 3 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/styles/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /packages/common/auth/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./utils"; 2 | export * from "./types"; 3 | export * from "./CrossmintAuth"; 4 | -------------------------------------------------------------------------------- /packages/client/react-base/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./hooks"; 2 | export * from "./providers"; 3 | export * from "./types"; 4 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./crypto-specs"; 2 | export * from "./algorithms"; 3 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "apps/**/*" 3 | - "packages/**/*" 4 | - "!**/.next/**" 5 | - "!**/dist/**" 6 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/auth/remix-ssr/public/favicon.ico -------------------------------------------------------------------------------- /apps/payments/nextjs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/payments/nextjs/public/favicon.ico -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/e2e/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./auth"; 2 | export * from "./email"; 3 | export * from "./wallet"; 4 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./key-providers"; 2 | export * from "./crypto-providers"; 3 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/types/wallet.ts: -------------------------------------------------------------------------------- 1 | export interface Wallet { 2 | chain: string; 3 | publicKey: string; 4 | } 5 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/auth/nextjs-ssr/src/app/favicon.ico -------------------------------------------------------------------------------- /apps/auth/remix-ssr/public/logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/auth/remix-ssr/public/logo-dark.png -------------------------------------------------------------------------------- /apps/auth/remix-ssr/public/logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/auth/remix-ssr/public/logo-light.png -------------------------------------------------------------------------------- /packages/client/base/src/types/embed/v3/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./events"; 2 | 3 | export * from "./CrossmintEmbeddedCheckoutV3Props"; 4 | -------------------------------------------------------------------------------- /packages/client/rn-window/src/rn-webview/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./Child"; 2 | export * from "./Parent"; 3 | export * from "./RNWebView"; 4 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CrossmintAuthProvider"; 2 | export * from "./CrossmintWalletProvider"; 3 | -------------------------------------------------------------------------------- /packages/server/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_CLIENT_CROSSMINT_API_KEY= 2 | SERVER_CROSSMINT_API_KEY= 3 | NEXT_PUBLIC_APP_URL=http://localhost:3000 -------------------------------------------------------------------------------- /packages/client/auth/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /packages/client/base/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/providers/key-providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./interfaces"; 2 | export * from "./ecdh-provider"; 3 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./embed"; 2 | export * from "./signers"; 3 | export * from "./wallets"; 4 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/consts/version.ts: -------------------------------------------------------------------------------- 1 | import { version } from "../../package.json"; 2 | 3 | export const LIB_VERSION = version; 4 | -------------------------------------------------------------------------------- /packages/common/auth/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /packages/common/base/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /packages/server/src/auth/index.ts: -------------------------------------------------------------------------------- 1 | export { CrossmintAuthServer as CrossmintAuth } from "./CrossmintAuthServer"; 2 | export * from "./utils"; 3 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/quickstart-devkit/app/favicon.ico -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: ["@tailwindcss/postcss"], 3 | }; 4 | 5 | export default config; 6 | -------------------------------------------------------------------------------- /packages/client/base/src/consts/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./embed"; 2 | 3 | export const DATADOG_CLIENT_TOKEN = "pub035be8a594b35be1887b6ba76c4029ca"; 4 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./encryption"; 2 | export * from "./keys"; 3 | export * from "./providers"; 4 | -------------------------------------------------------------------------------- /packages/client/signers/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /packages/client/window/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./performance"; 2 | export * from "./validation"; 3 | export * from "./errors"; 4 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/wallets/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./WalletConnectEVMAAWallet"; 2 | export * from "./WalletConnectEthersWallet"; 3 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/public/emoji-nft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/next/public/emoji-nft.png -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/public/fireworks.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/next/public/fireworks.gif -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/public/icons/eth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/next/public/icons/eth.png -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/next/src/app/favicon.ico -------------------------------------------------------------------------------- /packages/client/auth/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./jwt"; 2 | export * from "./cookies"; 3 | export * from "./constants"; 4 | export * from "./storage"; 5 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/providers/crypto-providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./encryption-service"; 2 | export * from "./decryption-service"; 3 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /packages/client/window/src/windows/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./Child"; 2 | export * from "./IFrame"; 3 | export * from "./Popup"; 4 | export * from "./NewTab"; 5 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/images/icon.png -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/primitives/keys/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./generator"; 2 | export * from "./serializer"; 3 | export * from "./derivation"; 4 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../../../tsup.config.base"; 2 | 3 | export default treeShakableConfig; 4 | -------------------------------------------------------------------------------- /packages/common/auth/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./user"; 2 | export * from "./authmaterial"; 3 | export * from "./errors"; 4 | export * from "./cookies"; 5 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/images/favicon.png -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules/ 3 | docs/* 4 | /test-results/ 5 | /playwright-report/ 6 | /blob-report/ 7 | /playwright/.cache/ 8 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export async function sleep(ms: number) { 2 | return new Promise((resolve) => setTimeout(resolve, ms)); 3 | } 4 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/images/react-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/images/react-logo.png -------------------------------------------------------------------------------- /packages/client/base/src/services/hosted/v3/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./crossmintHostedCheckoutV3Service"; 2 | export * from "./styles/crossmintHostedCheckoutV3StylesService"; 3 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/src/verifiableCredentialsSDK/verification/index.ts: -------------------------------------------------------------------------------- 1 | import { verifyCredential } from "./verify"; 2 | 3 | export { verifyCredential }; 4 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/images/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/images/adaptive-icon.png -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/images/react-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/images/react-logo@2x.png -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/images/react-logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/images/react-logo@3x.png -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/images/splash-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/images/splash-icon.png -------------------------------------------------------------------------------- /packages/client/base/src/types/embed/v3/events/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./incoming"; 2 | export * from "./outgoing"; 3 | 4 | export * from "./EmbeddedCheckoutV3IFrameEmitter"; 5 | -------------------------------------------------------------------------------- /packages/client/react-base/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./useCrossmint"; 2 | export * from "./useWallet"; 3 | export * from "./useAuth"; 4 | export * from "./useSignerAuth"; 5 | -------------------------------------------------------------------------------- /packages/client/window/src/utils/urlToOrigin.ts: -------------------------------------------------------------------------------- 1 | export function urlToOrigin(url: string): string { 2 | const urlObject = new URL(url); 3 | return urlObject.origin; 4 | } 5 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/utils/evm/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./blockchainToChainId"; 2 | export * from "./chainIdToBlockchain"; 3 | export * from "./isEVMBlockchain"; 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | 4 | .DS_Store 5 | 6 | dist 7 | 8 | node_modules 9 | yarn-error.log 10 | 11 | docs 12 | 13 | .parcel-cache 14 | .turbo 15 | 16 | .env 17 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | save-exact=true 3 | 4 | # Required for React Native monorepo: prevents duplicate native modules 5 | shamefully-hoist=true 6 | auto-install-peers=false 7 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/signers/index.ts: -------------------------------------------------------------------------------- 1 | export { EmailSignersDialog } from "./EmailSignersDialog"; 2 | export { PhoneSignersDialog } from "./PhoneSignersDialog"; 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 4 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/fonts/SpaceMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/fonts/SpaceMono-Regular.ttf -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/assets/images/partial-react-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Crossmint/crossmint-sdk/HEAD/apps/wallets/smart-wallet/expo/assets/images/partial-react-logo.png -------------------------------------------------------------------------------- /packages/client/base/src/types/payment-method-management/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./events"; 2 | export * from "./OrderIntents"; 3 | export * from "./CrossmintPaymentMethodManagementProps"; 4 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/components/signers/index.ts: -------------------------------------------------------------------------------- 1 | export { EmailSignersDialog } from "./EmailSignersDialog"; 2 | export { PhoneSignersDialog } from "./PhoneSignersDialog"; 3 | -------------------------------------------------------------------------------- /packages/client/react-base/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./wallet"; 2 | export type { AuthStatus, CrossmintAuthBaseContextType, CrossmintAuthBaseProviderProps, LoginMethod } from "./auth"; 3 | -------------------------------------------------------------------------------- /apps/payments/nextjs/next.config.js: -------------------------------------------------------------------------------- 1 | const withBundleAnalyzer = require("@next/bundle-analyzer")({ 2 | enabled: process.env.ANALYZE === "true", 3 | }); 4 | module.exports = withBundleAnalyzer({}); 5 | -------------------------------------------------------------------------------- /packages/client/base/src/types/payment-method-management/events/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./incoming"; 2 | export * from "./outgoing"; 3 | 4 | export * from "./PaymentMethodManagementIFrameEmitter"; 5 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export { useCrossmint, useWallet } from "@crossmint/client-sdk-react-base"; 2 | export * from "./useCrossmintCheckout"; 3 | export * from "./useAuth"; 4 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /packages/wallets/src/signers/non-custodial/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./ncs-signer"; 2 | export * from "./ncs-solana-signer"; 3 | export * from "./ncs-evm-signer"; 4 | export * from "./ncs-stellar-signer"; 5 | -------------------------------------------------------------------------------- /packages/client/auth/src/index.ts: -------------------------------------------------------------------------------- 1 | export { createCrossmint } from "@crossmint/common-sdk-base"; 2 | export { CrossmintAuthClient as CrossmintAuth } from "./CrossmintAuthClient"; 3 | export * from "./utils"; 4 | -------------------------------------------------------------------------------- /packages/client/base/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./embed"; 2 | export * from "./hosted"; 3 | export * from "./payment-method-management"; 4 | 5 | export * from "./api"; 6 | export * from "./logging"; 7 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/types/passkey.ts: -------------------------------------------------------------------------------- 1 | import type { WebAuthnP256 } from "ox"; 2 | 3 | export type PasskeySigner = { 4 | type: "PASSKEY"; 5 | credential: WebAuthnP256.P256Credential; 6 | }; 7 | -------------------------------------------------------------------------------- /.changeset/purple-onions-pretend.md: -------------------------------------------------------------------------------- 1 | --- 2 | "@crossmint/client-sdk-base": patch 3 | --- 4 | 5 | Update @datadog/browser-logs from 4.42.2 to 6.24.1 and update sampleRate to sessionSampleRate for v6 compatibility 6 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /packages/client/auth/src/utils/jwt.ts: -------------------------------------------------------------------------------- 1 | import { jwtDecode } from "jwt-decode"; 2 | 3 | export function getJWTExpiration(token: string) { 4 | const decoded = jwtDecode(token); 5 | return decoded.exp; 6 | } 7 | -------------------------------------------------------------------------------- /packages/client/base/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./lib"; 2 | 3 | export * from "./utils"; 4 | export * from "./types"; 5 | export * from "./services"; 6 | export * from "./consts"; 7 | export * from "./error"; 8 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/auth/EmbeddedAuthForm.tsx: -------------------------------------------------------------------------------- 1 | import { AuthForm } from "./AuthForm"; 2 | 3 | export function EmbeddedAuthForm() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /packages/common/base/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./apiClient"; 2 | export * from "./apiKey"; 3 | export * from "./blockchain"; 4 | export * from "./error"; 5 | export * from "./logger"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/wallets/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { treeShakableConfig } from "../../tsup.config.base"; 2 | 3 | export default { ...treeShakableConfig, minify: false }; // Disable minification for less-verbose error logs 4 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/index.ts: -------------------------------------------------------------------------------- 1 | import "../styles/global.css"; 2 | 3 | export * from "./types/wallet"; 4 | 5 | export * from "./components/CrossmintWalletConnect"; 6 | export * from "./wallets"; 7 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /packages/common/base/src/types/utils.ts: -------------------------------------------------------------------------------- 1 | export type ObjectValues = T[keyof T]; 2 | export function objectValues(obj: T): ReadonlyArray { 3 | return Object.values(obj); 4 | } 5 | -------------------------------------------------------------------------------- /packages/server/src/auth/utils/constants.ts: -------------------------------------------------------------------------------- 1 | import { version, name } from "../../../package.json"; 2 | 3 | export const SDK_VERSION = version; 4 | export const SDK_NAME = name; 5 | export const CROSSMINT_API_VERSION = "2024-09-26"; 6 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/remix.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('@remix-run/dev').AppConfig} */ 2 | module.exports = { 3 | serverDependenciesToBundle: ["@crossmint/server-sdk", "@crossmint/common-sdk-auth", "@crossmint/common-sdk-base"], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/client/base/src/types/payment-method-management/events/outgoing.ts: -------------------------------------------------------------------------------- 1 | export const paymentMethodManagementOutgoingEvents = {}; 2 | export type PaymentMethodManagementOutgoingEventMap = typeof paymentMethodManagementOutgoingEvents; 3 | -------------------------------------------------------------------------------- /packages/wallets/tsconfig.typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "skipLibCheck": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.tsx"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export { useCrossmint, useWallet } from "@crossmint/client-sdk-react-base"; 2 | export * from "./useWalletEmailSigner"; 3 | export * from "./useCrossmintCheckout"; 4 | export * from "./useAuth"; 5 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./isBlockchain"; 2 | export * from "./isBlockchainIncludingTestnets"; 3 | export * from "./blockchainToCopyName"; 4 | export * from "./isValidAddress"; 5 | 6 | export * from "./evm"; 7 | -------------------------------------------------------------------------------- /packages/common/base/src/types/json.ts: -------------------------------------------------------------------------------- 1 | export type JSONPrimitive = string | number | boolean | null; 2 | export type JSONValue = JSONPrimitive | { [key: string]: JSONValue } | JSONValue[]; 3 | export type JSONObject = { [key: string]: JSONValue }; 4 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/providers/index.ts: -------------------------------------------------------------------------------- 1 | export { CrossmintProvider } from "./CrossmintProvider"; 2 | export { CrossmintAuthProvider } from "./CrossmintAuthProvider"; 3 | export { CrossmintWalletProvider } from "./CrossmintWalletProvider"; 4 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/src/verifiableCredentialsSDK/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./verifiableCredential"; 2 | export * from "./chain"; 3 | export * from "./nft"; 4 | export * from "./collection"; 5 | export * from "./credentialFilter"; 6 | -------------------------------------------------------------------------------- /packages/common/base/src/apiKey/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./environmentToCrossmintBaseURL"; 2 | export * from "./environmentToExpectedPublicKey"; 3 | export * from "./usageOriginToPrefix"; 4 | export * from "./validateApiKeyAndGetCrossmintBaseUrl"; 5 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/providers/key-providers/interfaces.ts: -------------------------------------------------------------------------------- 1 | // Re-export from types for backward compatibility 2 | export type { 3 | KeyPairProvider, 4 | PublicKeyProvider, 5 | SymmetricKeyProvider, 6 | } from "../../types"; 7 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/styles/globals.ts: -------------------------------------------------------------------------------- 1 | import { css } from "@emotion/react"; 2 | 3 | export const globalReset = css` 4 | /* Reset inherited styles */ 5 | all: initial; 6 | font-family: inherit; 7 | box-sizing: border-box; 8 | `; 9 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": ["packages/**/*"], 3 | "version": "independent", 4 | "npmClient": "pnpm", 5 | "useWorkspaces": true, 6 | "command": { 7 | "publish": { 8 | "exact": true 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/signers/src/communications/urls.ts: -------------------------------------------------------------------------------- 1 | export const environmentUrlConfig = { 2 | production: "https://signers.crossmint.com", 3 | staging: "https://staging.signers.crossmint.com", 4 | development: "http://localhost:54825", 5 | } as const; 6 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/tsconfig.typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "skipLibCheck": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/common/auth/src/utils/isEmailValid.ts: -------------------------------------------------------------------------------- 1 | export function isEmailValid(email: string): boolean { 2 | // Regular expression for basic email validation 3 | const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; 4 | return emailRegex.test(email); 5 | } 6 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/app/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | html, 6 | body { 7 | @apply bg-white dark:bg-gray-950; 8 | 9 | @media (prefers-color-scheme: dark) { 10 | color-scheme: dark; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/wallets/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | import { name, version } from "../../package.json"; 2 | 3 | export const WALLETS_SERVICE = "WALLETS_SDK"; 4 | export const SDK_VERSION = version; 5 | export const SDK_NAME = name; 6 | export const STATUS_POLLING_INTERVAL_MS = 500; 7 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/consts/walletconnect.ts: -------------------------------------------------------------------------------- 1 | export const WALLETCONNECT_SOLANA_MAINNET_CHAIN_IDENTIFIER = "solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ"; 2 | export const WALLETCONNECT_SOLANA_DEVNET_CHAIN_IDENTIFIER = "solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K"; 3 | -------------------------------------------------------------------------------- /packages/common/base/src/apiKey/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./consts"; 2 | export * from "./utils"; 3 | export * from "./types"; 4 | 5 | export * from "./validateAPIKey"; 6 | export * from "./validateAPIKeyPrefix"; 7 | export * from "./utils/validateApiKeyAndGetCrossmintBaseUrl"; 8 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/utils/polyfills.ts: -------------------------------------------------------------------------------- 1 | // see https://docs.solanamobile.com/react-native/polyfill-guides/web3-js 2 | 3 | import { Buffer } from "buffer/"; 4 | 5 | global.Buffer = Buffer as unknown as typeof global.Buffer; 6 | 7 | import "react-native-get-random-values"; 8 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/src/types/nfts.ts: -------------------------------------------------------------------------------- 1 | import type { NftWithMetadata } from "@/verifiableCredentialsSDK"; 2 | 3 | export interface CrossmintWalletNft extends NftWithMetadata { 4 | metadata: any; 5 | locators: string; 6 | tokenStandard: string; 7 | } 8 | -------------------------------------------------------------------------------- /packages/common/base/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./Crossmint"; 2 | export * from "./errors"; 3 | export * from "./react"; 4 | export * from "./uiconfig"; 5 | export * from "./UserIdentifier"; 6 | export * from "./utils"; 7 | export * from "./signers"; 8 | export * from "./json"; 9 | -------------------------------------------------------------------------------- /packages/client/base/src/services/logging/BrowserLoggerInterface.ts: -------------------------------------------------------------------------------- 1 | export interface BrowserLoggerInterface { 2 | logInfo(message: string, context?: unknown): void; 3 | logError(message: string, context?: unknown): void; 4 | logWarn(message: string, context?: unknown): void; 5 | } 6 | -------------------------------------------------------------------------------- /packages/client/react-base/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from "tsup"; 2 | 3 | import { treeShakableConfig } from "../../../tsup.config.base"; 4 | 5 | const config: Options = { 6 | ...treeShakableConfig, 7 | external: ["react"], 8 | }; 9 | 10 | export default config; 11 | -------------------------------------------------------------------------------- /packages/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/wallets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/public/check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/client/auth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/window/src/utils/safeUrl.ts: -------------------------------------------------------------------------------- 1 | export function safeUrl(url: string): string { 2 | const parsed = new URL(url, window.location.origin); 3 | if (!/^https?:$/.test(parsed.protocol)) { 4 | throw new Error("Unsupported URL scheme"); 5 | } 6 | return parsed.href; 7 | } 8 | -------------------------------------------------------------------------------- /packages/common/auth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/common/base/src/apiKey/utils/usageOriginToPrefix.ts: -------------------------------------------------------------------------------- 1 | import type { APIKeyUsageOrigin, APIKeyUsageOriginPrefix } from "../types"; 2 | 3 | export function usageOriginToPrefix(usageOrigin: APIKeyUsageOrigin): APIKeyUsageOriginPrefix { 4 | return usageOrigin === "client" ? "ck" : "sk"; 5 | } 6 | -------------------------------------------------------------------------------- /packages/common/base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /apps/payments/nextjs/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import type { AppProps } from "next/app"; 2 | import type { JSX } from "react"; 3 | 4 | import "../styles/globals.css"; 5 | 6 | export default function App({ Component, pageProps }: AppProps): JSX.IntrinsicAttributes { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /packages/client/signers/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/window/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/src/components/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | function Skeleton({ className, ...props }: React.HTMLAttributes) { 4 | return
; 5 | } 6 | 7 | export { Skeleton }; 8 | -------------------------------------------------------------------------------- /packages/client/rn-window/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from "tsup"; 2 | import { treeShakableConfig } from "../../../tsup.config.base"; 3 | 4 | const config: Options = { 5 | ...treeShakableConfig, 6 | external: ["react", "react-native-webview"], 7 | }; 8 | 9 | export default config; 10 | -------------------------------------------------------------------------------- /packages/client/rn-window/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({ 4 | test: { 5 | environment: "jsdom", 6 | include: ["**/*.test.{ts,tsx}"], 7 | exclude: ["node_modules"], 8 | globals: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/primitives/encoding/base58.ts: -------------------------------------------------------------------------------- 1 | import bs58 from "bs58"; 2 | 3 | export function encodeBase58(bytes: Uint8Array): string { 4 | return bs58.encode(bytes); 5 | } 6 | 7 | export function decodeBase58(base58: string): Uint8Array { 8 | return bs58.decode(base58); 9 | } 10 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from "tsup"; 2 | 3 | import { treeShakableConfig } from "../../../../tsup.config.base"; 4 | 5 | const config: Options = { 6 | ...treeShakableConfig, 7 | external: ["react", "react-native"], 8 | }; 9 | 10 | export default config; 11 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | } 9 | }, 10 | "include": ["src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from "tsup"; 2 | 3 | import { treeShakableConfig } from "../../../../tsup.config.base"; 4 | 5 | const config: Options = { 6 | ...treeShakableConfig, 7 | external: ["react", "react-dom"], 8 | }; 9 | 10 | export default config; 11 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/algorithms/asymmetric/ecdh.ts: -------------------------------------------------------------------------------- 1 | import { deriveSymmetricKey } from "../../primitives"; 2 | 3 | export class ECDH { 4 | async deriveSharedSecret(privateKey: CryptoKey, publicKey: CryptoKey): Promise { 5 | return deriveSymmetricKey(privateKey, publicKey); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/utils/sendTransaction/isSendTransactionMethod.ts: -------------------------------------------------------------------------------- 1 | import { SessionRequestMethods } from "@/types/walletconnect/RequestMethods"; 2 | 3 | export function isSendTransactionMethod(method: string) { 4 | return ([SessionRequestMethods.EVM_SEND_TRANSACTION] as string[]).includes(method); 5 | } 6 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/constants/crypto-specs.ts: -------------------------------------------------------------------------------- 1 | export const AES256_KEY_SPEC: AesKeyGenParams = { 2 | name: "AES-GCM" as const, 3 | length: 256, 4 | } as const; 5 | 6 | export const ECDH_KEY_SPEC: EcKeyGenParams = { 7 | name: "ECDH" as const, 8 | namedCurve: "P-256" as const, 9 | } as const; 10 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": [".env", ".env.local"], 8 | "outputs": [".next/**", "!.next/cache/**"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/payments/nextjs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | 5 | // NOTE: This file should not be edited 6 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. 7 | -------------------------------------------------------------------------------- /apps/payments/nextjs/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": [".env", ".env.local"], 8 | "outputs": [".next/**", "!.next/cache/**"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/rn-window/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "jsx": "react-native", 5 | "rootDir": "src", 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["src/*"] 9 | } 10 | }, 11 | "include": ["src/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/primitives/encoding/base64.ts: -------------------------------------------------------------------------------- 1 | export function encodeBase64(bytes: Uint8Array): string { 2 | return btoa(String.fromCharCode.apply(null, Array.from(bytes))); 3 | } 4 | 5 | export function decodeBase64(base64: string): Uint8Array { 6 | return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0)); 7 | } 8 | -------------------------------------------------------------------------------- /packages/client/window/src/utils/generateRandomString.ts: -------------------------------------------------------------------------------- 1 | export const generateRandomString = (length = 13): string => { 2 | const bytes = new Uint8Array(length); 3 | crypto.getRandomValues(bytes); 4 | 5 | // Map each byte to a single base-36 digit (0–9, a–z) 6 | return Array.from(bytes, (b) => (b % 36).toString(36)).join(""); 7 | }; 8 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": [".env", ".env.local"], 8 | "outputs": [".next/**", "!.next/cache/**"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "expo/tsconfig.base", 3 | "compilerOptions": { 4 | "strict": true, 5 | "paths": { 6 | "@/*": ["./*"] 7 | }, 8 | "jsx": "react-native" 9 | }, 10 | "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": [".env", ".env.local"], 8 | "outputs": [".next/**", "!.next/cache/**"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/types/providers.ts: -------------------------------------------------------------------------------- 1 | export interface KeyPairProvider { 2 | getKeyPair(): Promise; 3 | } 4 | 5 | export interface PublicKeyProvider { 6 | getPublicKey(): Promise; 7 | } 8 | 9 | export interface SymmetricKeyProvider { 10 | getSymmetricKey(): Promise; 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | }, 9 | "target": "ES2020" 10 | }, 11 | "include": ["src/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | }, 9 | "jsx": "react-jsx" 10 | }, 11 | "include": ["src/**/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/utils/isBlockchain.ts: -------------------------------------------------------------------------------- 1 | import { BLOCKCHAINS, type Blockchain } from "../types"; 2 | 3 | export function isBlockchain(value: unknown, expectedBlockchain?: T): value is T { 4 | return expectedBlockchain ? value === expectedBlockchain : BLOCKCHAINS.includes(value as Blockchain); 5 | } 6 | -------------------------------------------------------------------------------- /packages/common/base/src/error/index.ts: -------------------------------------------------------------------------------- 1 | import type { CrossmintErrors } from "@/types"; 2 | 3 | export class CrossmintSDKError extends Error { 4 | constructor( 5 | message: string, 6 | public readonly code: CrossmintErrors, 7 | public readonly details?: string 8 | ) { 9 | super(message); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "tasks": { 4 | "build": { 5 | "env": ["NODE_ENV"], 6 | "outputLogs": "new-only", 7 | "dependsOn": ["^build"] 8 | }, 9 | "test:vitest": { 10 | "outputLogs": "new-only" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/src/verifiableCredentialsSDK/types/nft.ts: -------------------------------------------------------------------------------- 1 | import type { VCChain } from "./chain"; 2 | 3 | export interface Nft { 4 | chain: VCChain; 5 | contractAddress: string; 6 | tokenId: string; 7 | metadata?: any; 8 | } 9 | 10 | export interface NftWithMetadata extends Nft { 11 | metadata: any; 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/types/encryption.ts: -------------------------------------------------------------------------------- 1 | export type EncryptionResult = { 2 | ciphertext: T; 3 | encapsulatedKey: T; 4 | }; 5 | 6 | export type EncryptablePayload = Record; 7 | 8 | export type FPEEncryptionOptions = { 9 | radix: number; 10 | tweak?: Uint8Array; 11 | }; 12 | -------------------------------------------------------------------------------- /packages/common/auth/src/types/cookies.ts: -------------------------------------------------------------------------------- 1 | export type CookieData = { 2 | name: string; 3 | value: string; 4 | options?: CookieOptions; 5 | }; 6 | 7 | export type CookieOptions = { 8 | expiresAt?: string; 9 | httpOnly?: boolean; 10 | secure?: boolean; 11 | sameSite?: "Lax" | "Strict" | "None"; 12 | domain?: string; 13 | }; 14 | -------------------------------------------------------------------------------- /packages/common/base/src/types/UserIdentifier.ts: -------------------------------------------------------------------------------- 1 | export type UserIdentifierParams = { 2 | email?: string; 3 | userId?: string; 4 | phoneNumber?: string; 5 | }; 6 | 7 | export type UserIdentifier = 8 | | { type: "whiteLabel"; userId: string } 9 | | { type: "email"; email: string } 10 | | { type: "phoneNumber"; phoneNumber: string }; 11 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/src/services/logger.ts: -------------------------------------------------------------------------------- 1 | import { SDKLogger, getBrowserLogger } from "@crossmint/client-sdk-base"; 2 | 3 | import { SCW_SERVICE } from "../utils/constants"; 4 | 5 | export const scwLogger = new SDKLogger(SCW_SERVICE); 6 | export const scwDatadogLogger = new SDKLogger(SCW_SERVICE, getBrowserLogger(SCW_SERVICE, { onlyDatadog: true })); 7 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/public/circle-check-big.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/client/react-base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | }, 9 | "jsx": "react-jsx" 10 | }, 11 | "include": ["src/**/*"], 12 | "exclude": ["__tests__"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | }, 9 | "jsx": "react-jsx" 10 | }, 11 | "include": ["src/**/*"], 12 | "exclude": ["__tests__"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/wallets/openapi-ts.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "@hey-api/openapi-ts"; 2 | 3 | export default defineConfig({ 4 | input: "src/openapi.json", 5 | output: "src/api/gen", 6 | plugins: [ 7 | "@hey-api/client-fetch", 8 | { 9 | name: "@hey-api/sdk", 10 | validator: false, 11 | }, 12 | ], 13 | }); 14 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "rootDir": "src", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["src/*"] 8 | }, 9 | "jsx": "react-jsx" 10 | }, 11 | "include": ["src/**/*"], 12 | "exclude": ["__tests__"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/hooks/useEnvironment.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | 3 | export default function useEnvironment() { 4 | const [isServerSideRendering, setIsServerSideRendering] = useState(true); 5 | useEffect(() => { 6 | setIsServerSideRendering(false); 7 | }, []); 8 | 9 | return { isServerSideRendering }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/koKR.ts: -------------------------------------------------------------------------------- 1 | const koKR = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "{0}로 결제하기", 5 | buy: "{0}로 구매하기", 6 | subscribe: "{0}로 구독하기", 7 | }, 8 | crossmint: "크로스민트", 9 | crypto: "암호화폐", 10 | card: "카드", 11 | }, 12 | }; 13 | export default koKR; 14 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/utils/performance.ts: -------------------------------------------------------------------------------- 1 | export async function measureFunctionTime(fnName: string, fn: () => Promise): Promise { 2 | const start = performance.now(); 3 | const result = await fn(); 4 | const end = performance.now(); 5 | console.log(`Function ${fnName} took ${Math.round(end - start)}ms to execute`); 6 | return result; 7 | } 8 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/utils/signMessage/isSignTypedDataMethod.ts: -------------------------------------------------------------------------------- 1 | import { SessionRequestMethods } from "@/types/walletconnect/RequestMethods"; 2 | 3 | export function isSignTypedDataMethod(method: string) { 4 | return ( 5 | [SessionRequestMethods.EVM_SIGN_TYPED_DATA, SessionRequestMethods.EVM_SIGN_TYPED_DATA_V4] as string[] 6 | ).includes(method); 7 | } 8 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/public/copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/jaJp.ts: -------------------------------------------------------------------------------- 1 | const jaJp = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "{0}で支払う", 5 | buy: "{0}で購入する", 6 | subscribe: "{0}で購読する", 7 | }, 8 | crossmint: "クロスミント", 9 | crypto: "暗号資産", 10 | card: "カード", 11 | }, 12 | }; 13 | 14 | export default jaJp; 15 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/zhCN.ts: -------------------------------------------------------------------------------- 1 | const zhCN = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "使用 {0} 支付", 5 | buy: "使用 {0} 购买", 6 | subscribe: "使用 {0} 订阅", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "加密货币", 10 | card: "卡片", 11 | }, 12 | }; 13 | export default zhCN; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/zhTW.ts: -------------------------------------------------------------------------------- 1 | const zhTW = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "使用 {0} 付款", 5 | buy: "使用 {0} 購買", 6 | subscribe: "使用 {0} 訂閱", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "加密貨幣", 10 | card: "卡片", 11 | }, 12 | }; 13 | export default zhTW; 14 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/embed/v3/CrossmintEmbeddedCheckoutV3.tsx: -------------------------------------------------------------------------------- 1 | import { EmbeddedCheckoutV3IFrame } from "./EmbeddedCheckoutV3IFrame"; 2 | import type { CrossmintEmbeddedCheckoutV3Props } from "@crossmint/client-sdk-base"; 3 | 4 | export function CrossmintEmbeddedCheckout(props: CrossmintEmbeddedCheckoutV3Props) { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /packages/client/window/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./windows"; 2 | export * from "./handshake"; 3 | export type { Transport, SimpleMessageEvent } from "./transport/Transport"; 4 | export type { EventMap, SendActionArgs } from "./EventEmitter"; 5 | export { generateRandomString } from "./utils/generateRandomString"; 6 | export { SignersWindowTransport } from "./transport/SignersWindowTransport"; 7 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", 3 | "changelog": ["@changesets/cli/changelog", { "repo": "Crossmint/crossmint-sdk" }], 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /packages/client/base/src/consts/embed.ts: -------------------------------------------------------------------------------- 1 | export const embeddedCheckoutIFrameId = "crossmint-embedded-checkout.iframe"; 2 | 3 | export const updatableCommonParams = ["recipient", "mintConfig", "locale", "currency", "whPassThroughArgs"] as const; 4 | export const updatableFiatParams = [...updatableCommonParams] as const; 5 | export const updatableCryptoParams = ["signer", ...updatableCommonParams] as const; 6 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/components/embed/v3/CrossmintEmbeddedCheckoutV3.tsx: -------------------------------------------------------------------------------- 1 | import { EmbeddedCheckoutV3WebView } from "./EmbeddedCheckoutV3WebView"; 2 | import type { CrossmintEmbeddedCheckoutV3Props } from "@crossmint/client-sdk-base"; 3 | 4 | export function CrossmintEmbeddedCheckout(props: CrossmintEmbeddedCheckoutV3Props) { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /packages/client/base/src/types/events/public/index.ts: -------------------------------------------------------------------------------- 1 | import type { CrossmintEvents } from "./events"; 2 | import type { CrossmintEventMap } from "./payloads"; 3 | 4 | export * from "./events"; 5 | export * from "./payloads"; 6 | 7 | export type CrossmintEvent = { 8 | [K in CrossmintEvents]: { 9 | type: K; 10 | payload: CrossmintEventMap[K]; 11 | }; 12 | }[CrossmintEvents]; 13 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | import { name, version } from "../../package.json"; 2 | 3 | export const SCW_SERVICE = "SCW_SDK"; 4 | export const SDK_VERSION = version; 5 | export const SDK_NAME = name; 6 | export const API_VERSION = "2022-06-09"; 7 | export const ENTRY_POINT_ADDRESS = "0x0000000071727de22e5e9d8baf0edac6f37da032"; 8 | export const STATUS_POLLING_INTERVAL_MS = 1000; 9 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/enUS.ts: -------------------------------------------------------------------------------- 1 | const enUS = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Pay with {0}", 5 | buy: "Buy with {0}", 6 | subscribe: "Subscribe with {0}", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "Crypto", 10 | card: "Card", 11 | }, 12 | }; 13 | export default enUS; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/itIT.ts: -------------------------------------------------------------------------------- 1 | const itIT = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Paga con {0}", 5 | buy: "Compra con {0}", 6 | subscribe: "Abbonati con {0}", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "Cripto", 10 | card: "Carta", 11 | }, 12 | }; 13 | export default itIT; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/trTR.ts: -------------------------------------------------------------------------------- 1 | const trTR = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "{0} ile öde", 5 | buy: "{0} ile satın al", 6 | subscribe: "{0} ile abone ol", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "Kripto", 10 | card: "Kart", 11 | }, 12 | }; 13 | export default trTR; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/Klingon.ts: -------------------------------------------------------------------------------- 1 | const Klingon = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "{0} lo' DIch", 5 | buy: "{0} lo' je'", 6 | subscribe: "{0} lo' nugh", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "DIch nugh", 10 | card: "naQ", 11 | }, 12 | }; 13 | export default Klingon; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/deDE.ts: -------------------------------------------------------------------------------- 1 | const deDE = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Bezahlen mit {0}", 5 | buy: "Kaufen mit {0}", 6 | subscribe: "Abonnieren mit {0}", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "Krypto", 10 | card: "Karte", 11 | }, 12 | }; 13 | export default deDE; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/esES.ts: -------------------------------------------------------------------------------- 1 | const esES = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Pagar con {0}", 5 | buy: "Comprar con {0}", 6 | subscribe: "Suscribirse con {0}", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "Cripto", 10 | card: "Tarjeta", 11 | }, 12 | }; 13 | export default esES; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/frFR.ts: -------------------------------------------------------------------------------- 1 | const frFR = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Payer avec {0}", 5 | buy: "Acheter avec {0}", 6 | subscribe: "S'abonner avec {0}", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "Crypto", 10 | card: "Carte", 11 | }, 12 | }; 13 | export default frFR; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/ptPT.ts: -------------------------------------------------------------------------------- 1 | const ptPT = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Pagar com {0}", 5 | buy: "Comprar com {0}", 6 | subscribe: "Subscrever com {0}", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "Cripto", 10 | card: "Cartão", 11 | }, 12 | }; 13 | export default ptPT; 14 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/thTH.ts: -------------------------------------------------------------------------------- 1 | const thTH = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "ชำระเงินด้วย {0}", 5 | buy: "ซื้อด้วย {0}", 6 | subscribe: "สมัครสมาชิกด้วย {0}", 7 | }, 8 | crossmint: "ครอสมิ้นต์", 9 | crypto: "คริปโต", 10 | card: "บัตร", 11 | }, 12 | }; 13 | export default thTH; 14 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CrossmintNFTCollectionView"; 2 | export * from "./CrossmintNFTDetail"; 3 | 4 | export * from "./embed"; 5 | export * from "./hosted"; 6 | export * from "./signers"; 7 | export * from "./wallets"; 8 | export * from "./card-management"; 9 | export * from "./order-intent"; 10 | 11 | export { EmbeddedAuthForm } from "./auth/EmbeddedAuthForm"; 12 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/public/window.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/viVN.ts: -------------------------------------------------------------------------------- 1 | const enUS = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Thanh toán bằng {0}", 5 | buy: "Mua bằng {0}", 6 | subscribe: "Đăng ký bằng {0}", 7 | }, 8 | crossmint: "Crossmint", 9 | crypto: "Tiền điện tử", 10 | card: "Thẻ", 11 | }, 12 | }; 13 | export default enUS; 14 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/primitives/encoding/hex.ts: -------------------------------------------------------------------------------- 1 | export function encodeHex(bytes: Uint8Array): string { 2 | return Array.from(bytes) 3 | .map((byte) => byte.toString(16).padStart(2, "0")) 4 | .join(""); 5 | } 6 | 7 | export function decodeHex(hex: string): Uint8Array { 8 | return new Uint8Array(hex.match(/.{1,2}/g)?.map((byte) => Number.parseInt(byte, 16)) || []); 9 | } 10 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/types/wallet.ts: -------------------------------------------------------------------------------- 1 | export type { BaseCrossmintWalletProviderProps } from "@crossmint/client-sdk-react-base"; 2 | export { 3 | type Activity, 4 | type Balances, 5 | type Chain, 6 | type DelegatedSigner, 7 | type Transaction, 8 | type Signature, 9 | EVMWallet, 10 | SolanaWallet, 11 | StellarWallet, 12 | Wallet, 13 | } from "@crossmint/wallets-sdk"; 14 | -------------------------------------------------------------------------------- /apps/payments/nextjs/app/layout.tsx: -------------------------------------------------------------------------------- 1 | export const metadata = { 2 | title: "Next.js", 3 | description: "Generated by Next.js", 4 | }; 5 | 6 | export default function RootLayout({ 7 | children, 8 | }: { 9 | children: React.ReactNode; 10 | }) { 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/public/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/styles/theme.ts: -------------------------------------------------------------------------------- 1 | export const theme = { 2 | "cm-text-primary": "#00150D", 3 | "cm-text-secondary": "#67797F", 4 | "cm-background-primary": "#FFFFFF", 5 | "cm-muted-primary": "#F0F2F4", 6 | "cm-hover": "#E9ECF0", 7 | "cm-border": "#D9D9D9", 8 | "cm-link": "#1A74E9", 9 | "cm-accent": "#4CAF50", // old 04AA6D 10 | "cm-danger": "#f44336", 11 | } as const; 12 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/styles/theme.ts: -------------------------------------------------------------------------------- 1 | export const theme = { 2 | "cm-text-primary": "#00150D", 3 | "cm-text-secondary": "#67797F", 4 | "cm-background-primary": "#FFFFFF", 5 | "cm-muted-primary": "#F0F2F4", 6 | "cm-hover": "#E9ECF0", 7 | "cm-border": "#D9D9D9", 8 | "cm-link": "#1A74E9", 9 | "cm-accent": "#4CAF50", // old 04AA6D 10 | "cm-danger": "#f44336", 11 | } as const; 12 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/types/baseLayers.ts: -------------------------------------------------------------------------------- 1 | import { type ObjectValues, objectValues } from "@/types"; 2 | 3 | export const BlockchainBaseLayer = { 4 | EVM: "evm", 5 | SOLANA: "solana", 6 | SUI: "sui", 7 | APTOS: "aptos", 8 | } as const; 9 | export type BlockchainBaseLayer = ObjectValues; 10 | export const BLOCKCHAIN_BASE_LAYERS = objectValues(BlockchainBaseLayer); 11 | -------------------------------------------------------------------------------- /packages/wallets/src/chains/definitions/story.ts: -------------------------------------------------------------------------------- 1 | import { defineChain } from "viem"; 2 | 3 | export const story = defineChain({ 4 | id: 1514, 5 | name: "Story", 6 | nativeCurrency: { 7 | decimals: 18, 8 | name: "IP Token", 9 | symbol: "IP", 10 | }, 11 | rpcUrls: { 12 | default: { http: ["https://mainnet.storyrpc.io"] }, 13 | }, 14 | testnet: false, 15 | }); 16 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | /** 5 | * Combines multiple class names into a single string. 6 | * 7 | * @param inputs - The class names to combine. 8 | * @returns The combined class names as a string. 9 | */ 10 | export function cn(...inputs: ClassValue[]) { 11 | return twMerge(clsx(inputs)); 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/react-base/src/providers/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CrossmintWalletBaseProvider"; 2 | export * from "./CrossmintWalletUIBaseProvider"; 3 | export * from "./CrossmintProvider"; 4 | export { CrossmintAuthBaseProvider, CrossmintAuthBaseContext, useCrossmintAuthBase } from "./CrossmintAuthBaseProvider"; 5 | export { createLoggerContext, useLogger } from "./LoggerProvider"; 6 | export { initReactLogger } from "../logger/init"; 7 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/ruRU.ts: -------------------------------------------------------------------------------- 1 | const ruRU = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Оплатить с помощью {0}", 5 | buy: "Купить с помощью {0}", 6 | subscribe: "Подписаться с помощью {0}", 7 | }, 8 | crossmint: "Кроссминт", 9 | crypto: "Криптовалюта", 10 | card: "Карта", 11 | }, 12 | }; 13 | export default ruRU; 14 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/utils/createPasskeySigner.ts: -------------------------------------------------------------------------------- 1 | import { WebAuthnP256 } from "ox"; 2 | import type { PasskeySigner } from "@/types/passkey"; 3 | 4 | export async function createWebAuthnPasskeySigner(name: string): Promise { 5 | const credential = await WebAuthnP256.createCredential({ 6 | name, 7 | }); 8 | return { 9 | type: "PASSKEY", 10 | credential, 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/i18n/dictionaries/ukUA.ts: -------------------------------------------------------------------------------- 1 | const ukUA = { 2 | hostedCheckoutV3: { 3 | paymentVariant: { 4 | pay: "Оплатити за допомогою {0}", 5 | buy: "Купити за допомогою {0}", 6 | subscribe: "Підписатися за допомогою {0}", 7 | }, 8 | crossmint: "Кросмінт", 9 | crypto: "Крипто", 10 | card: "Картка", 11 | }, 12 | }; 13 | export default ukUA; 14 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/src/evm/chains/definitions/story.ts: -------------------------------------------------------------------------------- 1 | import { defineChain } from "viem"; 2 | 3 | export const story = defineChain({ 4 | id: 1514, 5 | name: "Story", 6 | nativeCurrency: { 7 | decimals: 18, 8 | name: "IP Token", 9 | symbol: "IP", 10 | }, 11 | rpcUrls: { 12 | default: { http: ["https://mainnet.storyrpc.io"] }, 13 | }, 14 | testnet: false, 15 | }); 16 | -------------------------------------------------------------------------------- /packages/common/auth/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | import { version, name } from "../../package.json"; 2 | 3 | export const SDK_VERSION = version; 4 | export const SDK_NAME = name; 5 | export const CROSSMINT_API_VERSION = "2024-09-26"; 6 | export const AUTH_SDK_ROOT_ENDPOINT = `api/${CROSSMINT_API_VERSION}/session/sdk/auth`; 7 | 8 | export const SESSION_PREFIX = "crossmint-jwt"; 9 | export const REFRESH_TOKEN_PREFIX = "crossmint-refresh-token"; 10 | -------------------------------------------------------------------------------- /packages/client/base/src/types/payment-method-management/events/incoming.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | export const paymentMethodManagementIncomingEvents = { 4 | "ui:height.changed": z.object({ 5 | height: z.number(), 6 | }), 7 | "payment-method:selected": z.any(), 8 | "order-intent:created": z.any(), 9 | }; 10 | export type PaymentMethodManagementIncomingEventMap = typeof paymentMethodManagementIncomingEvents; 11 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./validate"; 2 | export * from "./ui"; 3 | export * from "./SDKLogger"; 4 | export * from "./tasks"; 5 | 6 | export function isClient() { 7 | return typeof window !== "undefined"; 8 | } 9 | 10 | export function isLocalhost() { 11 | if (process.env.NODE_ENV === "test") { 12 | return false; 13 | } 14 | 15 | return window.location.origin.includes("localhost"); 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/constants/algorithms.ts: -------------------------------------------------------------------------------- 1 | import { CipherSuite, Aes256Gcm, DhkemP256HkdfSha256, HkdfSha256 } from "@hpke/core"; 2 | 3 | export const createHpkeSuite = () => { 4 | return new CipherSuite({ 5 | kem: createKEM(), 6 | kdf: new HkdfSha256(), 7 | aead: new Aes256Gcm(), 8 | }); 9 | }; 10 | 11 | export const createKEM = () => { 12 | return new DhkemP256HkdfSha256(); 13 | }; 14 | -------------------------------------------------------------------------------- /packages/common/base/src/apiKey/consts.ts: -------------------------------------------------------------------------------- 1 | export const CROSSMINT_API_KEY_SIGNER_PUBLICKEY_STAGING = "3hSfN4dWSwgCg1uf2yytBtK6KxK3ySFKasd2h9J2vSK5"; 2 | export const CROSSMINT_API_KEY_SIGNER_PUBLICKEY_PROD = "8erZh8YApGck3iUSUHqATBxqMTM1Ukp9mHmvGgUWHtkK"; 3 | 4 | export const CROSSMINT_DEV_URL = "http://localhost:3000/"; 5 | export const CROSSMINT_STG_URL = "https://staging.crossmint.com/"; 6 | export const CROSSMINT_PROD_URL = "https://www.crossmint.com/"; 7 | -------------------------------------------------------------------------------- /apps/auth/node-and-express-server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crossmint-auth-node", 3 | "version": "1.1.65", 4 | "description": "", 5 | "main": "index.js", 6 | "type": "module", 7 | "private": true, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@crossmint/server-sdk": "workspace:*", 13 | "dotenv": "16.4.5", 14 | "express": "4.21.1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/card-management/CrossmintPaymentMethodManagement.tsx: -------------------------------------------------------------------------------- 1 | import { CrossmintPaymentMethodManagementIFrame } from "./CrossmintPaymentMethodManagementIFrame"; 2 | import type { CrossmintPaymentMethodManagementProps } from "@crossmint/client-sdk-base"; 3 | 4 | export function CrossmintPaymentMethodManagement(props: CrossmintPaymentMethodManagementProps) { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/utils/evm/isEVMBlockchain.ts: -------------------------------------------------------------------------------- 1 | import { type EVMBlockchainIncludingTestnet, EVM_BLOCKCHAINS_INCLUDING_TESTNETS } from "../../types"; 2 | import { isBlockchainIncludingTestnets } from "../isBlockchainIncludingTestnets"; 3 | 4 | export function isEVMBlockchain(value: unknown): value is EVMBlockchainIncludingTestnet { 5 | return EVM_BLOCKCHAINS_INCLUDING_TESTNETS.some((chain) => isBlockchainIncludingTestnets(value, chain)); 6 | } 7 | -------------------------------------------------------------------------------- /packages/client/base/src/types/embed/v3/events/EmbeddedCheckoutV3IFrameEmitter.ts: -------------------------------------------------------------------------------- 1 | import type { IFrameWindow } from "@crossmint/client-sdk-window"; 2 | 3 | import type { EmbeddedCheckoutV3IncomingEventMap } from "./incoming"; 4 | import type { EmbeddedCheckoutV3OutgoingEventMap } from "./outgoing"; 5 | 6 | export type EmbeddedCheckoutV3IFrameEmitter = IFrameWindow< 7 | EmbeddedCheckoutV3IncomingEventMap, 8 | EmbeddedCheckoutV3OutgoingEventMap 9 | >; 10 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/primitives/keys/generator.ts: -------------------------------------------------------------------------------- 1 | import { AES256_KEY_SPEC, ECDH_KEY_SPEC } from "../../constants"; 2 | 3 | export async function generateECDHKeyPair(): Promise { 4 | return crypto.subtle.generateKey(ECDH_KEY_SPEC, true, ["deriveKey"]); 5 | } 6 | 7 | export async function generateAESKey(): Promise { 8 | return crypto.subtle.generateKey(AES256_KEY_SPEC, true, ["encrypt", "decrypt"]); 9 | } 10 | -------------------------------------------------------------------------------- /packages/client/react-base/src/hooks/useCrossmint.tsx: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import { CrossmintContext } from "@/providers/CrossmintProvider"; 3 | 4 | export function useCrossmint(missingContextMessage?: string) { 5 | const context = useContext(CrossmintContext); 6 | if (context == null) { 7 | throw new Error(missingContextMessage ?? "useCrossmint must be used within a CrossmintProvider"); 8 | } 9 | return context; 10 | } 11 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @crossmint/client-signers-cryptography 2 | 3 | ## 0.0.4 4 | 5 | ### Patch Changes 6 | 7 | - 25ad566: Updates dependencies 8 | 9 | ## 0.0.3 10 | 11 | ### Patch Changes 12 | 13 | - 978420c: Updates React to patched version 14 | - 7c47c14: Update @hpke/core to fix critical security vulnerability related to AEAD nonce reuse 15 | 16 | ## 0.0.2 17 | 18 | ### Patch Changes 19 | 20 | - b7aa8d6: Create package 21 | -------------------------------------------------------------------------------- /packages/common/base/src/types/react/nftDisplay.ts: -------------------------------------------------------------------------------- 1 | import type { NFTOrNFTLocator, Wallet } from "@/blockchain/types"; 2 | 3 | import type { UIConfig } from "../uiconfig"; 4 | 5 | interface CommonProps { 6 | uiConfig?: UIConfig; 7 | environment?: string; 8 | } 9 | export interface NFTCollectionViewProps extends CommonProps { 10 | wallets: Wallet[]; 11 | } 12 | export interface NFTDetailProps extends CommonProps { 13 | nft: NFTOrNFTLocator; 14 | } 15 | -------------------------------------------------------------------------------- /packages/server/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/wallets/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/auth/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/base/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/signers/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./components"; 2 | export * from "./hooks"; 3 | export * from "./providers"; 4 | export * from "./types/wallet"; 5 | 6 | export type { LoginMethod } from "@crossmint/client-sdk-react-base"; 7 | 8 | export { 9 | type CrossmintEvent, 10 | type CrossmintEventMap, 11 | CrossmintEvents, 12 | } from "@crossmint/client-sdk-base"; 13 | 14 | export { CrossmintProvider } from "./providers/CrossmintProvider"; 15 | -------------------------------------------------------------------------------- /packages/client/window/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/common/auth/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/common/base/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/react-base/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/rn-window/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | // Needed for Wallet Connect with next.js apps which we use via dynamic-labs in react-ui: https://docs.reown.com/appkit/next/core/installation#extra-configuration 4 | webpack: (config) => { 5 | config.externals.push("pino-pretty", "lokijs", "encoding"); 6 | return config; 7 | }, 8 | reactStrictMode: false, 9 | }; 10 | 11 | export default nextConfig; 12 | -------------------------------------------------------------------------------- /packages/client/signers/src/communications/errorCodes.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Typed error codes for signer operations. 3 | * These codes are returned in error responses from the frame to signal specific error conditions. 4 | */ 5 | export enum SignerErrorCode { 6 | /** 7 | * IndexedDB connection failed after all retries exhausted. 8 | * This signals that the WebView should be reloaded to recover from the fatal state. 9 | */ 10 | IndexedDbFatal = "indexeddb-fatal", 11 | } 12 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | // Needed for Wallet Connect with next.js apps which we use via dynamic-labs in react-ui: https://docs.reown.com/appkit/next/core/installation#extra-configuration 4 | webpack: (config) => { 5 | config.externals.push("pino-pretty", "lokijs", "encoding"); 6 | return config; 7 | }, 8 | reactStrictMode: false, 9 | }; 10 | 11 | export default nextConfig; 12 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/primitives/keys/derivation.ts: -------------------------------------------------------------------------------- 1 | import { AES256_KEY_SPEC } from "../../constants"; 2 | 3 | export async function deriveSymmetricKey(privateKey: CryptoKey, publicKey: CryptoKey): Promise { 4 | return crypto.subtle.deriveKey( 5 | { 6 | name: "ECDH", 7 | public: publicKey, 8 | }, 9 | privateKey, 10 | AES256_KEY_SPEC, 11 | true, 12 | ["encrypt", "decrypt"] 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], 8 | "outputs": ["dist/**"] 9 | }, 10 | "test:vitest": { 11 | "inputs": ["src/**", "vitest.config.ts", "jest.config.ts"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/base/src/types/payment-method-management/events/PaymentMethodManagementIFrameEmitter.ts: -------------------------------------------------------------------------------- 1 | import type { IFrameWindow } from "@crossmint/client-sdk-window"; 2 | 3 | import type { PaymentMethodManagementIncomingEventMap } from "./incoming"; 4 | import type { PaymentMethodManagementOutgoingEventMap } from "./outgoing"; 5 | 6 | export type PaymentMethodManagementIFrameEmitter = IFrameWindow< 7 | PaymentMethodManagementIncomingEventMap, 8 | PaymentMethodManagementOutgoingEventMap 9 | >; 10 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/utils/classNames.ts: -------------------------------------------------------------------------------- 1 | export function classNames(...classes: (boolean | string | undefined | { [key: string]: boolean | undefined })[]) { 2 | return classes 3 | .map((c) => { 4 | if (typeof c === "object") { 5 | return Object.keys(c) 6 | .filter((k) => c[k]) 7 | .join(" "); 8 | } 9 | return c || ""; 10 | }) 11 | .join(" ") 12 | .trim(); 13 | } 14 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { vitePlugin as remix } from "@remix-run/dev"; 2 | import { defineConfig } from "vite"; 3 | import tsconfigPaths from "vite-tsconfig-paths"; 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | remix({ 8 | future: { 9 | v3_fetcherPersist: true, 10 | v3_relativeSplatPath: true, 11 | v3_throwAbortReason: true, 12 | }, 13 | }), 14 | tsconfigPaths(), 15 | ], 16 | }); 17 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/utils/eventEmitter.ts: -------------------------------------------------------------------------------- 1 | import type { Order } from "@crossmint/client-sdk-base"; 2 | import mitt from "mitt"; 3 | 4 | export type LocalEventEmitterEvents = { 5 | "order:updated": { 6 | order?: Order; 7 | orderClientSecret?: string; 8 | }; 9 | "order:creation-failed": { 10 | errorMessage: string; 11 | }; 12 | }; 13 | 14 | // Create a singleton instance for global use 15 | export const localEventEmitter = mitt(); 16 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/tsconfig.typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "rootDir": "src", 4 | "baseUrl": ".", 5 | "paths": { 6 | "@/*": ["src/*"] 7 | }, 8 | "target": "ES2020", 9 | "module": "commonjs", 10 | "strict": true, 11 | "esModuleInterop": true, 12 | "skipLibCheck": true, 13 | "resolveJsonModule": true 14 | }, 15 | "include": ["src/**/*"], 16 | "exclude": ["**/node_modules/**"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/plugin/mods/addQueryToAndroidManifest.ts: -------------------------------------------------------------------------------- 1 | import type { AndroidManifest, ManifestQuery } from "@expo/config-plugins/build/android/Manifest"; 2 | 3 | export function addQueryToAndroidManifest(androidManifest: AndroidManifest, query: ManifestQuery): AndroidManifest { 4 | const manifest = androidManifest.manifest; 5 | 6 | if (!manifest.queries) { 7 | manifest.queries = []; 8 | } 9 | 10 | manifest.queries.push(query); 11 | 12 | return androidManifest; 13 | } 14 | -------------------------------------------------------------------------------- /tsup.config.base.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from "tsup"; 2 | 3 | export const treeShakableConfig: Options = { 4 | splitting: true, 5 | clean: true, 6 | dts: true, 7 | format: ["esm", "cjs"], 8 | bundle: true, 9 | skipNodeModulesBundle: true, 10 | watch: false, 11 | outDir: "dist", 12 | entry: ["src/**/*.(ts|tsx)", "!src/**/*.test.(ts|tsx)"], 13 | shims: true, 14 | minify: process.env.NODE_ENV === "production", 15 | sourcemap: process.env.NODE_ENV !== "production", 16 | }; 17 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/utils/validation.ts: -------------------------------------------------------------------------------- 1 | export function validateRadixData(data: number[], radix: number): void { 2 | if (data.some((d) => d >= radix)) { 3 | throw new Error("Data contains values greater than the radix"); 4 | } 5 | } 6 | 7 | export function validateEncoding(encoding: string): void { 8 | const validEncodings = ["base64", "base58", "hex"]; 9 | if (!validEncodings.includes(encoding)) { 10 | throw new Error(`Unsupported encoding: ${encoding}`); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/utils/walletconnect/createProvider.ts: -------------------------------------------------------------------------------- 1 | import type { WalletConnectConfig } from "@/hooks/useWalletConnectProvider"; 2 | import { Core } from "@walletconnect/core"; 3 | import { Web3Wallet } from "@walletconnect/web3wallet"; 4 | 5 | export async function createProvider({ projectId, metadata }: WalletConnectConfig) { 6 | const core = new Core({ 7 | projectId, 8 | }); 9 | 10 | return await Web3Wallet.init({ 11 | core, 12 | metadata, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/common/base/src/logger/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./interfaces"; 2 | export * from "./types"; 3 | export * from "./SdkLogger"; 4 | export * from "./sink-manager"; 5 | export * from "./platform"; 6 | export * from "./sinks/ConsoleSink"; 7 | export * from "./sinks/DatadogSink"; 8 | export * from "./sinks/BrowserDatadogSink"; 9 | export * from "./sinks/ReactNativeDatadogSink"; 10 | export * from "./sinks/ServerDatadogSink"; 11 | export * from "./utils"; 12 | export * from "./init-helpers"; 13 | export * from "./decorators"; 14 | -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | 4 | 5 | 6 | ## Test plan 7 | 8 | 14 | 15 | ## Package updates 16 | 17 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/utils/signMessage/isSignMessageMethod.ts: -------------------------------------------------------------------------------- 1 | import { SessionRequestMethods } from "@/types/walletconnect/RequestMethods"; 2 | 3 | import { isSignTypedDataMethod } from "./isSignTypedDataMethod"; 4 | 5 | export function isSignMessageMethod(method: string) { 6 | return ( 7 | isSignTypedDataMethod(method) || 8 | ([SessionRequestMethods.EVM_PERSONAL_SIGN, SessionRequestMethods.SOLANA_SIGN_MESSAGE] as string[]).includes( 9 | method 10 | ) 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /packages/server/src/auth/utils/jwksClient.ts: -------------------------------------------------------------------------------- 1 | import { createRemoteJWKSet } from "jose"; 2 | 3 | export function createJWKSClient(jwksUri: string) { 4 | try { 5 | const JWKS = createRemoteJWKSet(new URL(jwksUri), { 6 | cacheMaxAge: 600000, // Cache for 10 minutes (similar to jwks-rsa default) 7 | }); 8 | 9 | return JWKS; 10 | } catch (error) { 11 | console.error("Error creating JWKS client", error); 12 | throw new Error("Unable to create JWKS client"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/utils/isBlockchainIncludingTestnets.ts: -------------------------------------------------------------------------------- 1 | import { BLOCKCHAINS_INCLUDING_TESTNETS, type Blockchain, type BlockchainIncludingTestnet } from "../types"; 2 | 3 | export function isBlockchainIncludingTestnets( 4 | value: unknown, 5 | expectedBlockchain?: T 6 | ): value is T { 7 | return expectedBlockchain 8 | ? value === expectedBlockchain 9 | : BLOCKCHAINS_INCLUDING_TESTNETS.includes(value as Blockchain); 10 | } 11 | -------------------------------------------------------------------------------- /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /packages/client/base/src/services/logging/ConsoleProvider.ts: -------------------------------------------------------------------------------- 1 | import type { BrowserLoggerInterface } from "./BrowserLoggerInterface"; 2 | 3 | export class ConsoleProvider implements BrowserLoggerInterface { 4 | logInfo(message: string, context?: object) { 5 | console.log(message, context); 6 | } 7 | 8 | logError(message: string, context?: object) { 9 | console.error(message, context); 10 | } 11 | 12 | logWarn(message: string, context?: object) { 13 | console.warn(message, context); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/client/react-base/src/hooks/useWallet.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import { 3 | CrossmintWalletBaseContext, 4 | type CrossmintWalletBaseContext as WalletContextType, 5 | } from "@/providers/CrossmintWalletBaseProvider"; 6 | 7 | export function useWallet(): WalletContextType { 8 | const walletContext = useContext(CrossmintWalletBaseContext); 9 | if (!walletContext) { 10 | throw new Error("useWallet must be used within CrossmintWalletProvider"); 11 | } 12 | 13 | return walletContext; 14 | } 15 | -------------------------------------------------------------------------------- /packages/client/react-base/src/hooks/useAuth.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import { CrossmintAuthBaseContext } from "@/providers"; 3 | import type { CrossmintAuthBaseContextType } from "@/types"; 4 | 5 | export function useCrossmintAuth(): CrossmintAuthBaseContextType { 6 | const context = useContext(CrossmintAuthBaseContext); 7 | if (context == null) { 8 | throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider"); 9 | } 10 | return context; 11 | } 12 | 13 | export const useAuth = useCrossmintAuth; 14 | -------------------------------------------------------------------------------- /packages/common/auth/src/types/user.ts: -------------------------------------------------------------------------------- 1 | export type FarcasterMetadata = { 2 | fid: string; 3 | username: string; 4 | bio: string; 5 | displayName: string; 6 | pfpUrl: string; 7 | custody: string; 8 | verifications: string[]; 9 | }; 10 | 11 | export type TwitterMetadata = { 12 | username: string; 13 | id: string; 14 | }; 15 | 16 | export type SDKExternalUser = { 17 | id: string; 18 | email?: string; 19 | phoneNumber?: string; 20 | farcaster?: FarcasterMetadata; 21 | twitter?: TwitterMetadata; 22 | }; 23 | -------------------------------------------------------------------------------- /packages/client/auth/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from "path"; 2 | import { defineConfig } from "vitest/config"; 3 | 4 | export default defineConfig({ 5 | test: { 6 | environment: "jsdom", 7 | include: ["**/*.test.{ts,tsx}"], 8 | exclude: ["node_modules"], 9 | globals: true, 10 | // This is needed because we are using the @ symbol to import from the src folder. 11 | // Otherwise, Vitest will yell at us. 12 | alias: [{ find: "@", replacement: resolve(__dirname, "./src") }], 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /packages/client/base/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from "path"; 2 | import { defineConfig } from "vitest/config"; 3 | 4 | export default defineConfig({ 5 | test: { 6 | environment: "jsdom", 7 | include: ["**/*.test.{ts,tsx}"], 8 | exclude: ["node_modules"], 9 | globals: true, 10 | // This is needed because we are using the @ symbol to import from the src folder. 11 | // Otherwise, Vitest will yell at us. 12 | alias: [{ find: "@", replacement: resolve(__dirname, "./src") }], 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/utils/wallet/supportedNamespacesSatisfiesMethod.ts: -------------------------------------------------------------------------------- 1 | import type { BuildApprovedNamespacesParams } from "@walletconnect/utils"; 2 | 3 | export function supportedNamespacesSatisfiesMethod( 4 | method: string, 5 | supportedNamespaces: BuildApprovedNamespacesParams["supportedNamespaces"] 6 | ) { 7 | return Object.values(supportedNamespaces).some((namespace) => { 8 | return namespace.methods.some((supportedMethod) => { 9 | return supportedMethod === method; 10 | }); 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/react-base/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from "path"; 2 | import { defineConfig } from "vitest/config"; 3 | 4 | export default defineConfig({ 5 | test: { 6 | environment: "jsdom", 7 | include: ["**/*.test.{ts,tsx}"], 8 | exclude: ["node_modules"], 9 | globals: true, 10 | // This is needed because we are using the @ symbol to import from the src folder. 11 | // Otherwise, Vitest will yell at us. 12 | alias: [{ find: "@", replacement: resolve(__dirname, "./src") }], 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from "path"; 2 | import { defineConfig } from "vitest/config"; 3 | 4 | export default defineConfig({ 5 | test: { 6 | environment: "jsdom", 7 | include: ["**/*.test.{ts,tsx}"], 8 | exclude: ["node_modules"], 9 | globals: true, 10 | // This is needed because we are using the @ symbol to import from the src folder. 11 | // Otherwise, Vitest will yell at us. 12 | alias: [{ find: "@", replacement: resolve(__dirname, "./src") }], 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --background: #ffffff; 7 | --foreground: #171717; 8 | } 9 | 10 | @media (prefers-color-scheme: dark) { 11 | :root { 12 | --background: #0a0a0a; 13 | --foreground: #ededed; 14 | } 15 | } 16 | 17 | body { 18 | color: var(--foreground); 19 | background: var(--background); 20 | font-family: Arial, Helvetica, sans-serif; 21 | } 22 | 23 | @layer utilities { 24 | .text-balance { 25 | text-wrap: balance; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { resolve } from "path"; 2 | import { defineConfig } from "vitest/config"; 3 | 4 | export default defineConfig({ 5 | test: { 6 | environment: "jsdom", 7 | include: ["**/*.test.{ts,tsx}"], 8 | exclude: ["node_modules"], 9 | globals: true, 10 | // This is needed because we are using the @ symbol to import from the src folder. 11 | // Otherwise, Vitest will yell at us. 12 | alias: [{ find: "@", replacement: resolve(__dirname, "./src") }], 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | colors: { 12 | background: "var(--background)", 13 | foreground: "var(--foreground)", 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | }; 19 | export default config; 20 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/validate.ts: -------------------------------------------------------------------------------- 1 | import type { NFTCollectionViewProps, NFTDetailProps } from "@crossmint/common-sdk-base"; 2 | 3 | export function assertValidNFTCollectionViewProps({ wallets }: NFTCollectionViewProps) { 4 | if (wallets.length === 0) { 5 | throw new Error("wallets prop is empty. Please provide at least one wallet."); 6 | } 7 | } 8 | 9 | export function assertValidValidateNFTDetailProps({ nft }: NFTDetailProps) { 10 | if (nft == null) { 11 | throw new Error("nft prop is empty. Please provide a valid nft."); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./hooks"; 2 | export * from "./providers"; 3 | export * from "./components"; 4 | 5 | export type { CrossmintEvent, CrossmintEventMap } from "@crossmint/client-sdk-base"; 6 | 7 | export type { SDKExternalUser, OAuthProvider } from "@crossmint/common-sdk-auth"; 8 | 9 | export { 10 | type Activity, 11 | type Balances, 12 | type Chain, 13 | type DelegatedSigner, 14 | type Transaction, 15 | type Signature, 16 | EVMWallet, 17 | SolanaWallet, 18 | Wallet, 19 | } from "@crossmint/wallets-sdk"; 20 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/auth/AuthFormDialog.tsx: -------------------------------------------------------------------------------- 1 | import { useAuthForm } from "@/providers/auth/AuthFormProvider"; 2 | import { AuthForm } from "./AuthForm"; 3 | import { Dialog } from "../common/Dialog"; 4 | 5 | export default function AuthFormDialog({ open }: { open: boolean }) { 6 | const { appearance, setDialogOpen } = useAuthForm(); 7 | 8 | return ( 9 | 10 | 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /apps/payments/nextjs/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | 36 | certificates -------------------------------------------------------------------------------- /packages/client/ui/react-ui/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from "tsup"; 2 | 3 | import { treeShakableConfig } from "../../../../tsup.config.base"; 4 | 5 | const config: Options = { 6 | ...treeShakableConfig, 7 | external: ["react", "react-dom"], 8 | noExternal: [/@dynamic-labs\/utils/], 9 | esbuildOptions(options) { 10 | options.alias = { 11 | "@dynamic-labs/utils/src/services/Oauth2Service/utils/loadAppleId/loadAppleId": "./src/shims/noop.ts", // kills the Apple loader 12 | }; 13 | }, 14 | }; 15 | 16 | export default config; 17 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/providers/auth/FarcasterProvider.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from "react"; 2 | import { AuthKitProvider } from "@farcaster/auth-kit"; 3 | 4 | export function FarcasterProvider({ baseUrl, children }: { baseUrl: string; children: ReactNode }) { 5 | const config = { 6 | rpcUrl: "https://mainnet.optimism.io", 7 | domain: new URL(baseUrl).hostname.replace(/^www\./, ""), 8 | siweUri: `${baseUrl}api/2024-09-26/session/sdk/auth/authenticate`, 9 | }; 10 | 11 | return {children}; 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/src/verifiableCredentialsSDK/onchainServices/provider.ts: -------------------------------------------------------------------------------- 1 | import { StaticJsonRpcProvider } from "@ethersproject/providers"; 2 | 3 | import { configManager } from "../configs"; 4 | import type { VCChain } from "../types/chain"; 5 | 6 | export function getProvider(chain: VCChain) { 7 | const rpcs = configManager.getBlockchainRpcs(); 8 | 9 | if (rpcs[chain] === undefined) { 10 | throw new Error(`RPC provider not found for chain ${chain}, add it using init(VCSDKConfig).`); 11 | } 12 | return new StaticJsonRpcProvider(rpcs[chain]); 13 | } 14 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/README.md: -------------------------------------------------------------------------------- 1 | # React Native SDK Demo 2 | 3 | This starter app showcases usage of Crossmint React Native SDK. 4 | 5 | ## Installation 6 | 7 | ```bash 8 | pnpm i 9 | ``` 10 | 11 | ## Configuration 12 | 13 | Create a `.env` file and provide a valid Crossmint API and an app identifier: 14 | 15 | ```bash 16 | EXPO_PUBLIC_CROSSMINT_API_KEY= 17 | ``` 18 | 19 | ## Running 20 | 21 | For iOS: 22 | 23 | ```bash 24 | pnpm run ios 25 | ``` 26 | 27 | For Android: 28 | 29 | ```bash 30 | pnpm run android 31 | ``` 32 | 33 | For Web: 34 | 35 | ```bash 36 | pnpm run web 37 | ``` 38 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | .env 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/src/verifiableCredentialsSDK/types/chain.ts: -------------------------------------------------------------------------------- 1 | export const VCChain = { 2 | POLYGON: "polygon", 3 | POLYGON_AMOY: "polygon-amoy", 4 | POLY_AMOY: "poly-amoy", // Deprecated 5 | } as const; 6 | 7 | export type VCChain = (typeof VCChain)[keyof typeof VCChain]; 8 | 9 | /** 10 | * ChainRPCConfig is a mapping of blockchain chains to their respective RPC endpoints. 11 | * 12 | * @example 13 | * const config: ChainRPCConfig = { 14 | * polygon: "https://polygon.llamarpc.com/", 15 | * }; 16 | */ 17 | export type ChainRPCConfig = Record; 18 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/src/verifiableCredentialsSDK/types/credentialFilter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * CredentialFilter defines the criteria for filtering credentials. 3 | */ 4 | export interface CredentialFilter { 5 | /** 6 | * List of issuers to filter by. 7 | * @example ["did:polygon-amoy:0x1B887669437644aA348c518844660ef8d63bd643"] 8 | */ 9 | issuers?: string[]; 10 | 11 | /** 12 | * List of accepted credential types. 13 | * @example ["driving_license", "crossmint:e62564a7-06eb-4f65-b389-eb3b7a4f6f98:userAge"] 14 | */ 15 | types?: string[]; 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/types/walletconnect/RequestMethods.ts: -------------------------------------------------------------------------------- 1 | import type { ObjectValues } from "@crossmint/common-sdk-base"; 2 | 3 | export const SessionRequestMethods = { 4 | EVM_PERSONAL_SIGN: "personal_sign", 5 | EVM_SIGN_TYPED_DATA: "eth_signTypedData", 6 | EVM_SIGN_TYPED_DATA_V4: "eth_signTypedData_v4", 7 | EVM_SEND_TRANSACTION: "eth_sendTransaction", 8 | SOLANA_SIGN_TRANSACTION: "solana_signTransaction", 9 | SOLANA_SIGN_MESSAGE: "solana_signMessage", 10 | } as const; 11 | export type SessionRequestMethods = ObjectValues; 12 | -------------------------------------------------------------------------------- /apps/auth/node-and-express-server/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | .env 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /packages/wallets/src/chains/definitions/tempoTestnet.ts: -------------------------------------------------------------------------------- 1 | import { defineChain } from "viem"; 2 | 3 | export const tempoTestnet = defineChain({ 4 | id: 42429, 5 | name: "Tempo Testnet", 6 | nativeCurrency: { 7 | decimals: 6, 8 | name: "pathUSD", 9 | symbol: "pathUSD", 10 | }, 11 | rpcUrls: { 12 | default: { http: ["https://rpc.testnet.tempo.xyz"] }, 13 | }, 14 | blockExplorers: { 15 | default: { 16 | name: "Tempo Scout", 17 | url: "https://scout.tempo.xyz", 18 | }, 19 | }, 20 | testnet: true, 21 | }); 22 | -------------------------------------------------------------------------------- /.github/workflows/pr-stats-slack.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Stats (Slack) 2 | 3 | on: 4 | schedule: 5 | - cron: "0 11 * * 1-5" 6 | 7 | jobs: 8 | stats: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Send pull request stats to slack 12 | uses: flowwer-dev/pull-request-stats@master 13 | with: 14 | period: 14 15 | charts: true 16 | sortBy: "REVIEWS" 17 | slackChannel: ${{ secrets.SLACK_PR_STATS_CHANNEL }} 18 | slackWebhook: ${{ secrets.SLACK_WEBHOOK }} 19 | -------------------------------------------------------------------------------- /packages/client/base/src/services/logging/index.ts: -------------------------------------------------------------------------------- 1 | import { isClient, isLocalhost } from "../../utils"; 2 | import { ConsoleProvider } from "./ConsoleProvider"; 3 | import { DatadogProvider } from "./DatadogProvider"; 4 | 5 | export type BrowserLogger = ConsoleProvider | DatadogProvider; 6 | 7 | function getBrowserLogger(service: string, { onlyDatadog }: { onlyDatadog?: boolean } = {}): BrowserLogger { 8 | if (isClient() && isLocalhost() && !onlyDatadog) { 9 | return new ConsoleProvider(); 10 | } 11 | 12 | return new DatadogProvider(service); 13 | } 14 | 15 | export { getBrowserLogger }; 16 | -------------------------------------------------------------------------------- /packages/wallets/src/chains/definitions/arcTestnet.ts: -------------------------------------------------------------------------------- 1 | import { defineChain } from "viem"; 2 | 3 | export const arcTestnet = defineChain({ 4 | id: 5042002, 5 | name: "Arc Testnet", 6 | nativeCurrency: { 7 | decimals: 6, 8 | name: "USDC", 9 | symbol: "USDC", 10 | }, 11 | rpcUrls: { 12 | default: { http: ["https://rpc.testnet.arc.network"] }, 13 | }, 14 | blockExplorers: { 15 | default: { 16 | name: "Arc Testnet Explorer", 17 | url: "https://testnet.arcscan.app", 18 | }, 19 | }, 20 | testnet: true, 21 | }); 22 | -------------------------------------------------------------------------------- /packages/wallets/src/chains/definitions/storyTestnet.ts: -------------------------------------------------------------------------------- 1 | import { defineChain } from "viem"; 2 | 3 | export const storyTestnet = defineChain({ 4 | id: 1513, 5 | name: "Story Testnet", 6 | nativeCurrency: { 7 | decimals: 18, 8 | name: "IP", 9 | symbol: "IP", 10 | }, 11 | rpcUrls: { 12 | default: { http: ["https://testnet.storyrpc.io"] }, 13 | }, 14 | blockExplorers: { 15 | default: { 16 | name: "Story Testnet Explorer", 17 | url: "https://testnet.storyscan.xyz", 18 | }, 19 | }, 20 | testnet: true, 21 | }); 22 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/src/app/api/logout/route.ts: -------------------------------------------------------------------------------- 1 | import { createCrossmint, CrossmintAuth } from "@crossmint/server-sdk"; 2 | import type { NextRequest } from "next/server"; 3 | 4 | export async function POST(request: NextRequest) { 5 | try { 6 | const crossmint = createCrossmint({ 7 | apiKey: process.env.SERVER_CROSSMINT_API_KEY || "", 8 | }); 9 | const crossmintAuth = CrossmintAuth.from(crossmint); 10 | const response = await crossmintAuth.logout(request); 11 | 12 | return response as Response; 13 | } catch (error) { 14 | console.error(error); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/icons/x.tsx: -------------------------------------------------------------------------------- 1 | export default function X({ style }: { style?: React.CSSProperties }) { 2 | return ( 3 | 15 | 16 | 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/client/window/src/transport/Transport.ts: -------------------------------------------------------------------------------- 1 | import type { z } from "zod"; 2 | import type { EventMap } from "../EventEmitter"; 3 | 4 | export type SimpleMessageEvent = { 5 | type: string; 6 | data: { 7 | event: string; 8 | data: object; 9 | }; 10 | }; 11 | 12 | export interface Transport { 13 | send(message: { event: K; data: z.infer }): void; 14 | addMessageListener(listener: (event: SimpleMessageEvent | MessageEvent) => void): string; 15 | removeMessageListener(id: string): void; 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/common/ScreenReaderText.tsx: -------------------------------------------------------------------------------- 1 | import type { DetailedHTMLProps, HTMLAttributes } from "react"; 2 | import styled from "@emotion/styled"; 3 | 4 | const StyledScreenReaderSpan = styled.span` 5 | position: absolute; 6 | width: 1px; 7 | height: 1px; 8 | padding: 0; 9 | margin: -1px; 10 | overflow: hidden; 11 | clip: rect(0, 0, 0, 0); 12 | white-space: nowrap; 13 | border: 0; 14 | `; 15 | 16 | export function ScreenReaderText(props: DetailedHTMLProps, HTMLSpanElement>) { 17 | return ; 18 | } 19 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/icons/mail.tsx: -------------------------------------------------------------------------------- 1 | import type { SVGProps } from "react"; 2 | 3 | export const MailIcon = (props: SVGProps) => ( 4 | 16 | 17 | 18 | 19 | ); 20 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/src/evm/chains/definitions/story-testnet.ts: -------------------------------------------------------------------------------- 1 | import { defineChain } from "viem"; 2 | 3 | export const storyTestnet = defineChain({ 4 | id: 1513, 5 | name: "Story Testnet", 6 | nativeCurrency: { 7 | decimals: 18, 8 | name: "IP", 9 | symbol: "IP", 10 | }, 11 | rpcUrls: { 12 | default: { http: ["https://testnet.storyrpc.io"] }, 13 | }, 14 | blockExplorers: { 15 | default: { 16 | name: "Story Testnet Explorer", 17 | url: "https://testnet.storyscan.xyz", 18 | }, 19 | }, 20 | testnet: true, 21 | }); 22 | -------------------------------------------------------------------------------- /packages/client/signers/src/communications/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | signerInboundEvents, 3 | signerOutboundEvents, 4 | exportSignerInboundEvents, 5 | exportSignerOutboundEvents, 6 | } from "./events"; 7 | 8 | export type { 9 | SignerIFrameEventName, 10 | SignerInputEvent, 11 | SignerOutputEvent, 12 | ExportSignerEventName, 13 | ExportSignerInputEvent, 14 | ExportSignerOutputEvent, 15 | } from "./events"; 16 | 17 | export { environmentUrlConfig } from "./urls"; 18 | 19 | export type { KeyType, Encoding, KEY_ENCODINGS, KEY_TYPES } from "./schemas"; 20 | 21 | export { SignerErrorCode } from "./errorCodes"; 22 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/icons/leftArrow.tsx: -------------------------------------------------------------------------------- 1 | export function LeftArrowIcon({ style }: { style?: React.CSSProperties }) { 2 | return ( 3 | 15 | 16 | 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/icons/chevronRight.tsx: -------------------------------------------------------------------------------- 1 | import type React from "react"; 2 | 3 | export function ChevronRightIcon({ style }: { style?: React.CSSProperties }) { 4 | return ( 5 | 17 | 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/jest.config.ts: -------------------------------------------------------------------------------- 1 | import type { JestConfigWithTsJest } from "ts-jest"; 2 | 3 | const jestConfig: JestConfigWithTsJest = { 4 | moduleNameMapper: { 5 | "^@/(.*)$": "/src/$1", 6 | // ... add other path mappings as needed 7 | }, 8 | transform: { 9 | // '^.+\\.[tj]sx?$' to process js/ts with `ts-jest` 10 | // '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest` 11 | "^.+\\.ts?$": [ 12 | "ts-jest", 13 | { 14 | useESM: true, 15 | }, 16 | ], 17 | }, 18 | }; 19 | 20 | export default jestConfig; 21 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/expo/.gitignore: -------------------------------------------------------------------------------- 1 | # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 2 | 3 | # dependencies 4 | node_modules/ 5 | 6 | # Expo 7 | .expo/ 8 | dist/ 9 | web-build/ 10 | expo-env.d.ts 11 | 12 | # Native 13 | *.orig.* 14 | *.jks 15 | *.p8 16 | *.p12 17 | *.key 18 | *.mobileprovision 19 | 20 | # Metro 21 | .metro-health-check* 22 | 23 | # debug 24 | npm-debug.* 25 | yarn-debug.* 26 | yarn-error.* 27 | 28 | # macOS 29 | .DS_Store 30 | *.pem 31 | 32 | # local env files 33 | .env*.local 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | 38 | app-example 39 | 40 | # Output 41 | ios/ 42 | android/ 43 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/common/SecuredByCrossmint.tsx: -------------------------------------------------------------------------------- 1 | import styled from "@emotion/styled"; 2 | import { SecuredByLeaf } from "@/icons/securedByLeaf"; 3 | import { theme } from "@/styles"; 4 | 5 | const SecuredByCrossmintContainer = styled.div` 6 | display: flex; 7 | `; 8 | const defaultColor = theme["cm-text-secondary"]; 9 | 10 | export function SecuredByCrossmint({ color = defaultColor, style }: { color?: string; style?: React.CSSProperties }) { 11 | return ( 12 | 13 | 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/hooks/useDeepEffect.ts: -------------------------------------------------------------------------------- 1 | import isEqual from "lodash.isequal"; 2 | import { type DependencyList, type EffectCallback, useEffect, useRef } from "react"; 3 | 4 | export default function useDeepEffect(callback: EffectCallback, dependencies: DependencyList): void { 5 | const dependenciesRef = useRef(dependencies); 6 | 7 | useEffect(() => { 8 | const hasChanged = dependencies.some((dep, i) => !isEqual(dep, dependenciesRef.current[i])); 9 | 10 | if (hasChanged) { 11 | dependenciesRef.current = dependencies; 12 | return callback(); 13 | } 14 | }, [dependencies]); 15 | } 16 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/auth/methods/web3/Web3AuthFlow.tsx: -------------------------------------------------------------------------------- 1 | import { useAuthForm } from "@/providers/auth/AuthFormProvider"; 2 | import { Web3AuthFlowButton } from "./Web3AuthFlowButton"; 3 | import { Web3Connectors } from "./Web3Connectors"; 4 | 5 | export function Web3AuthFlow() { 6 | const { step } = useAuthForm(); 7 | 8 | // Show wallet connectors when in any web3 step 9 | if (step.startsWith("web3")) { 10 | return ; 11 | } 12 | 13 | // Show initial connect button on first step 14 | if (step === "initial") { 15 | return ; 16 | } 17 | 18 | return null; 19 | } 20 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/components/common/layouts/RootLayout.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from "react"; 2 | 3 | import { useCrossmintWalletConnect } from "../../../hooks/useCrossmintWalletConnect"; 4 | 5 | export default function RootLayout({ children }: { children: ReactNode }) { 6 | const { uiConfig } = useCrossmintWalletConnect(); 7 | 8 | return ( 9 |
15 | {children} 16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /packages/common/base/src/apiKey/utils/environmentToExpectedPublicKey.ts: -------------------------------------------------------------------------------- 1 | import { CROSSMINT_API_KEY_SIGNER_PUBLICKEY_PROD, CROSSMINT_API_KEY_SIGNER_PUBLICKEY_STAGING } from "../consts"; 2 | import type { APIKeyEnvironmentPrefix } from "../types"; 3 | 4 | export function environmentToExpectedPublicKey(environment?: APIKeyEnvironmentPrefix): string | null { 5 | switch (environment) { 6 | case "development": 7 | case "staging": 8 | return CROSSMINT_API_KEY_SIGNER_PUBLICKEY_STAGING; 9 | case "production": 10 | return CROSSMINT_API_KEY_SIGNER_PUBLICKEY_PROD; 11 | default: 12 | return null; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/common/base/src/apiKey/utils/environmentToCrossmintBaseURL.ts: -------------------------------------------------------------------------------- 1 | import type { APIKeyEnvironmentPrefix } from "../types"; 2 | 3 | export function environmentToCrossmintBaseURL( 4 | environment: APIKeyEnvironmentPrefix, 5 | customMap?: Partial> 6 | ): string { 7 | switch (environment) { 8 | case "development": 9 | return customMap?.development || "http://localhost:3000"; 10 | case "staging": 11 | return customMap?.staging || "https://staging.crossmint.com"; 12 | case "production": 13 | return customMap?.production || "https://www.crossmint.com"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | 8 | export function formatDate(timestamp: number) { 9 | const date = new Date(timestamp * 1000); 10 | return date.toLocaleDateString() + " " + date.toLocaleTimeString(); 11 | } 12 | 13 | export function shortenAddress(addr: string) { 14 | return addr ? addr.slice(0, 6) + "..." + addr.slice(-4) : ""; 15 | } 16 | 17 | export function shortenHash(hash: string) { 18 | return hash ? hash.slice(0, 8) + "..." + hash.slice(-6) : ""; 19 | } 20 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/icons/twitter.tsx: -------------------------------------------------------------------------------- 1 | export function TwitterIcon({ style }: { style?: React.CSSProperties }) { 2 | return ( 3 | 4 | 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["src/index.ts"], 3 | "out": "docs", 4 | "plugin": ["typedoc-plugin-markdown", "typedoc-plugin-frontmatter", "./custom-plugin.mjs"], 5 | "tsconfig": "tsconfig.typedoc.json", 6 | "fileExtension": ".mdx", 7 | "skipErrorChecking": true, 8 | "excludeNotDocumented": false, 9 | "excludeInternal": true, 10 | "excludePrivate": true, 11 | "excludeProtected": true, 12 | "sanitizeComments": true, 13 | "hidePageHeader": true, 14 | "hideBreadcrumbs": true, 15 | "hidePageTitle": true, 16 | "parametersFormat": "table", 17 | "classPropertiesFormat": "table" 18 | } 19 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/app/entry.client.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * By default, Remix will handle hydrating your app on the client for you. 3 | * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨ 4 | * For more information, see https://remix.run/file-conventions/entry.client 5 | */ 6 | 7 | import { RemixBrowser } from "@remix-run/react"; 8 | import { startTransition, StrictMode } from "react"; 9 | import { hydrateRoot } from "react-dom/client"; 10 | 11 | startTransition(() => { 12 | hydrateRoot( 13 | document, 14 | 15 | 16 | 17 | ); 18 | }); 19 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/src/components/signin-auth-button.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useAuth } from "@crossmint/client-sdk-react-ui"; 4 | 5 | import { Button } from "./button"; 6 | import { Typography } from "./typography"; 7 | 8 | export const SignInAuthButton = () => { 9 | const { login } = useAuth(); 10 | 11 | return ( 12 |
13 | 16 |
17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /packages/client/rn-window/src/rn-webview/Child.ts: -------------------------------------------------------------------------------- 1 | import type { EventMap, EventEmitterWithHandshakeOptions } from "@crossmint/client-sdk-window"; 2 | import { HandshakeChild } from "@crossmint/client-sdk-window"; 3 | import { RNWebViewTransport } from "../transport/RNWebViewTransport"; 4 | 5 | export class RNWebViewChild extends HandshakeChild< 6 | IncomingEvents, 7 | OutgoingEvents 8 | > { 9 | constructor(options?: EventEmitterWithHandshakeOptions) { 10 | const transport = new RNWebViewTransport(); 11 | super(transport, options); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "moduleResolution": "node", 5 | "strict": true, 6 | "experimentalDecorators": true, 7 | "esModuleInterop": true, 8 | "isolatedModules": true, 9 | "resolveJsonModule": true, 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "outDir": "dist", 14 | "noEmitOnError": true, 15 | "forceConsistentCasingInFileNames": true, 16 | "lib": ["DOM", "ES6"], 17 | "noErrorTruncation": true 18 | }, 19 | "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/client/base/src/utils/tasks.ts: -------------------------------------------------------------------------------- 1 | export type CancellableTask = { 2 | cancel: () => void; 3 | }; 4 | 5 | export function queueTask(callback: () => void, endTime: number): CancellableTask { 6 | let cancelled = false; 7 | 8 | function checkTime() { 9 | if (cancelled) { 10 | return; 11 | } 12 | 13 | const timeLeft = endTime - Date.now(); 14 | if (timeLeft <= 0) { 15 | callback(); 16 | } else { 17 | requestAnimationFrame(checkTime); 18 | } 19 | } 20 | 21 | checkTime(); 22 | 23 | return { 24 | cancel: () => { 25 | cancelled = true; 26 | }, 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/icons/alert.tsx: -------------------------------------------------------------------------------- 1 | export function AlertIcon({ customColor = "#f44336" }: { customColor?: string }) { 2 | return ( 3 | 14 | 15 | 16 | 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/icons/phone.tsx: -------------------------------------------------------------------------------- 1 | import type { SVGProps } from "react"; 2 | 3 | export function PhoneIcon(props: SVGProps) { 4 | return ( 5 | 17 | 18 | 19 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/utils/createCrossmintApiClient.ts: -------------------------------------------------------------------------------- 1 | import { LIB_VERSION } from "@/consts/version"; 2 | import { type Crossmint, CrossmintApiClient, type CrossmintApiClientInternalConfig } from "@crossmint/common-sdk-base"; 3 | 4 | export function createCrossmintApiClient( 5 | crossmint: Crossmint, 6 | apiKeyExpectations?: CrossmintApiClientInternalConfig["apiKeyExpectations"] 7 | ) { 8 | return new CrossmintApiClient(crossmint, { 9 | internalConfig: { 10 | sdkMetadata: { 11 | name: "@crossmint/client-sdk-react-ui", 12 | version: LIB_VERSION, 13 | }, 14 | apiKeyExpectations, 15 | }, 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/utils/evm/chainIdToBlockchain.ts: -------------------------------------------------------------------------------- 1 | import type { EVMBlockchainIncludingTestnet } from "../../types"; 2 | import { BLOCKCHAIN_TO_CHAIN_ID } from "./blockchainToChainId"; 3 | 4 | export const CHAIN_ID_TO_BLOCKCHAIN: Record = Object.entries( 5 | BLOCKCHAIN_TO_CHAIN_ID 6 | ).reduce( 7 | (acc, [key, value]) => { 8 | acc[value] = key as EVMBlockchainIncludingTestnet; 9 | return acc; 10 | }, 11 | {} as Record 12 | ); 13 | 14 | export function chainIdToBlockchain(chainId: number): EVMBlockchainIncludingTestnet | undefined { 15 | return CHAIN_ID_TO_BLOCKCHAIN[chainId]; 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/wallets/smart-wallet/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["src/index.ts"], 3 | "out": "docs", 4 | "plugin": ["typedoc-plugin-markdown", "typedoc-plugin-frontmatter", "./custom-plugin.mjs"], 5 | "tsconfig": "tsconfig.typedoc.json", 6 | "fileExtension": ".mdx", 7 | "skipErrorChecking": true, 8 | "excludeNotDocumented": false, 9 | "excludeInternal": true, 10 | "excludePrivate": true, 11 | "excludeProtected": true, 12 | "sanitizeComments": true, 13 | "hidePageHeader": true, 14 | "hideBreadcrumbs": true, 15 | "hidePageTitle": true, 16 | "parametersFormat": "table", 17 | "classPropertiesFormat": "table" 18 | // "theme": "crossmintTheme" 19 | } 20 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | export default { 4 | content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"], 5 | theme: { 6 | extend: { 7 | fontFamily: { 8 | sans: [ 9 | '"Inter"', 10 | "ui-sans-serif", 11 | "system-ui", 12 | "sans-serif", 13 | '"Apple Color Emoji"', 14 | '"Segoe UI Emoji"', 15 | '"Segoe UI Symbol"', 16 | '"Noto Color Emoji"', 17 | ], 18 | }, 19 | }, 20 | }, 21 | plugins: [], 22 | } satisfies Config; 23 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/public/xlm.svg: -------------------------------------------------------------------------------- 1 | Asset 1 -------------------------------------------------------------------------------- /packages/client/auth/src/utils/cookies.ts: -------------------------------------------------------------------------------- 1 | export function getCookie(name: string): string | undefined { 2 | const crossmintRefreshToken = document.cookie.split("; ").find((row) => row.startsWith(name)); 3 | return crossmintRefreshToken ? crossmintRefreshToken.split("=")[1] : undefined; 4 | } 5 | 6 | export function setCookie(name: string, value: string, expiresAt?: string) { 7 | const expiresInUtc = expiresAt ? new Date(expiresAt).toUTCString() : ""; 8 | document.cookie = `${name}=${value}; ${expiresAt ? `expires=${expiresInUtc};` : ""} path=/; SameSite=Lax;`; 9 | } 10 | 11 | export function deleteCookie(name: string) { 12 | document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`; 13 | } 14 | -------------------------------------------------------------------------------- /packages/client/react-base/src/providers/LoggerProvider.tsx: -------------------------------------------------------------------------------- 1 | import { type Context, createContext, useContext } from "react"; 2 | import type { SdkLogger } from "@crossmint/common-sdk-base"; 3 | 4 | type LoggerContext = Context; 5 | 6 | export const createLoggerContext = (): LoggerContext => createContext(null); 7 | 8 | /** 9 | * Hook to access the SDK logger instance 10 | * Must be used within LoggerProvider 11 | */ 12 | export function useLogger(LoggerContext: LoggerContext): SdkLogger { 13 | const logger = useContext(LoggerContext); 14 | if (logger == null) { 15 | throw new Error("useLogger must be used within LoggerProvider"); 16 | } 17 | return logger; 18 | } 19 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/utils/createCrossmintApiClient.ts: -------------------------------------------------------------------------------- 1 | import { type Crossmint, CrossmintApiClient, type CrossmintApiClientInternalConfig } from "@crossmint/common-sdk-base"; 2 | import packageJson from "../../package.json"; 3 | 4 | export function createCrossmintApiClient( 5 | crossmint: Crossmint, 6 | apiKeyExpectations?: CrossmintApiClientInternalConfig["apiKeyExpectations"] 7 | ) { 8 | return new CrossmintApiClient(crossmint, { 9 | internalConfig: { 10 | sdkMetadata: { 11 | name: "@crossmint/client-sdk-react-native-ui", 12 | version: packageJson.version, 13 | }, 14 | apiKeyExpectations, 15 | }, 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /packages/client/verifiable-credentials/src/verifiableCredentialsSDK/onchainServices/ABI/ERC7572.ts: -------------------------------------------------------------------------------- 1 | import { abi_ERC_721 } from "./ERC721"; 2 | 3 | export const abi_ERC_7572 = [ 4 | ...abi_ERC_721, 5 | // ERC-7572 additional functions 6 | { 7 | anonymous: false, 8 | inputs: [], 9 | name: "ContractURIUpdated", 10 | type: "event", 11 | }, 12 | { 13 | inputs: [], 14 | name: "contractURI", 15 | outputs: [ 16 | { 17 | internalType: "string", 18 | name: "", 19 | type: "string", 20 | }, 21 | ], 22 | stateMutability: "view", 23 | type: "function", 24 | }, 25 | ]; 26 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/src/icons/logout.tsx: -------------------------------------------------------------------------------- 1 | export const LogoutIcon = ({ className }: { className?: string }) => ( 2 | 10 | 17 | 18 | ); 19 | -------------------------------------------------------------------------------- /packages/client/signers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@crossmint/client-signers", 3 | "version": "0.1.2", 4 | "repository": "https://github.com/Crossmint/crossmint-sdk", 5 | "license": "Apache-2.0", 6 | "author": "Paella Labs Inc", 7 | "sideEffects": false, 8 | "type": "module", 9 | "exports": { 10 | "import": "./dist/index.js", 11 | "require": "./dist/index.cjs" 12 | }, 13 | "main": "./dist/index.cjs", 14 | "module": "./dist/index.js", 15 | "types": "./dist/index.d.ts", 16 | "files": ["dist", "LICENSE"], 17 | "scripts": { 18 | "build": "tsup", 19 | "dev": "tsup --watch" 20 | }, 21 | "dependencies": { 22 | "zod": "3.22.4" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/types/wallet/index.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | GetAddress, 3 | GetSupportedChains, 4 | SendEthersTransaction, 5 | SignMessage, 6 | SignSolanaTransaction, 7 | SignTypedData, 8 | } from "./features"; 9 | 10 | export type CrossmintWalletConnectCommonWallet = SignMessage & GetSupportedChains & GetAddress; 11 | export type CrossmintWalletConnectEVMWallet = CrossmintWalletConnectCommonWallet & 12 | SendEthersTransaction & 13 | SignTypedData; 14 | export type CrossmintWalletConnectSolanaWallet = CrossmintWalletConnectCommonWallet & SignSolanaTransaction; 15 | 16 | export type CrossmintWalletConnectWallet = CrossmintWalletConnectEVMWallet | CrossmintWalletConnectSolanaWallet; 17 | -------------------------------------------------------------------------------- /packages/wallets/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["src/index.ts"], 3 | "out": "docs", 4 | "plugin": ["typedoc-plugin-markdown", "typedoc-plugin-frontmatter", "./typedoc-custom-plugin.mjs"], 5 | "tsconfig": "tsconfig.typedoc.json", 6 | "fileExtension": ".mdx", 7 | "skipErrorChecking": true, 8 | "excludeNotDocumented": false, 9 | "excludeInternal": true, 10 | "excludePrivate": true, 11 | "excludeProtected": true, 12 | "sanitizeComments": true, 13 | "hidePageHeader": true, 14 | "hideBreadcrumbs": true, 15 | "hidePageTitle": true, 16 | "parametersFormat": "table", 17 | "classPropertiesFormat": "table", 18 | "gitRevision": "main" 19 | // "theme": "crossmintTheme" 20 | } 21 | -------------------------------------------------------------------------------- /apps/payments/nextjs/app/payment-method-management/components/ClientProviders.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { CrossmintAuthProvider } from "@crossmint/client-sdk-react-ui"; 4 | import { CrossmintProvider } from "@crossmint/client-sdk-react-ui"; 5 | 6 | export function ClientProviders({ children }: { children: React.ReactNode }) { 7 | return ( 8 | 9 | {children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /packages/client/window/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@crossmint/client-sdk-window", 3 | "version": "1.0.7", 4 | "repository": "https://github.com/Crossmint/crossmint-sdk", 5 | "license": "Apache-2.0", 6 | "author": "Paella Labs Inc", 7 | "sideEffects": false, 8 | "type": "module", 9 | "exports": { 10 | "import": "./dist/index.js", 11 | "require": "./dist/index.cjs" 12 | }, 13 | "main": "./dist/index.cjs", 14 | "module": "./dist/index.js", 15 | "types": "./dist/index.d.ts", 16 | "files": ["dist", "LICENSE"], 17 | "scripts": { 18 | "build": "tsup", 19 | "dev": "tsup --watch" 20 | }, 21 | "dependencies": { 22 | "zod": "3.22.4" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/common/base/src/apiKey/utils/validateApiKeyAndGetCrossmintBaseUrl.ts: -------------------------------------------------------------------------------- 1 | import { CROSSMINT_DEV_URL, CROSSMINT_PROD_URL, CROSSMINT_STG_URL } from "../consts"; 2 | import type { APIKeyEnvironmentPrefix } from "../types"; 3 | import { validateAPIKey } from "../validateAPIKey"; 4 | 5 | const urlMap: Record = { 6 | development: CROSSMINT_DEV_URL, 7 | staging: CROSSMINT_STG_URL, 8 | production: CROSSMINT_PROD_URL, 9 | }; 10 | 11 | export function validateApiKeyAndGetCrossmintBaseUrl(apiKey: string) { 12 | const result = validateAPIKey(apiKey); 13 | if (!result.isValid) { 14 | throw new Error("Crossmint API key is invalid"); 15 | } 16 | return urlMap[result.environment]; 17 | } 18 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/src/app/api/refresh/route.ts: -------------------------------------------------------------------------------- 1 | import { createCrossmint, CrossmintAuth } from "@crossmint/server-sdk"; 2 | import type { NextRequest } from "next/server"; 3 | 4 | export async function POST(request: NextRequest) { 5 | try { 6 | const crossmint = createCrossmint({ 7 | apiKey: process.env.SERVER_CROSSMINT_API_KEY || "", 8 | }); 9 | const crossmintAuth = CrossmintAuth.from(crossmint, { 10 | cookieOptions: { 11 | httpOnly: true, 12 | }, 13 | }); 14 | const response = await crossmintAuth.handleCustomRefresh(request); 15 | 16 | return response as Response; 17 | } catch (error) { 18 | console.error(error); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/client/signers-cryptography/src/providers/key-providers/ecdh-provider.ts: -------------------------------------------------------------------------------- 1 | import { deriveSymmetricKey } from "../../primitives"; 2 | import type { KeyPairProvider, PublicKeyProvider, SymmetricKeyProvider } from "./interfaces"; 3 | 4 | export class ECDHKeyProvider implements SymmetricKeyProvider { 5 | constructor( 6 | private readonly keyPairProvider: KeyPairProvider, 7 | private readonly publicKeyProvider: PublicKeyProvider 8 | ) {} 9 | 10 | async getSymmetricKey(): Promise { 11 | const publicKey = await this.publicKeyProvider.getPublicKey(); 12 | const keyPair = await this.keyPairProvider.getKeyPair(); 13 | 14 | return deriveSymmetricKey(keyPair.privateKey, publicKey); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/icons/passkey.tsx: -------------------------------------------------------------------------------- 1 | export default function PasskeyIcon() { 2 | return ( 3 | 14 | 15 | 16 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /packages/client/base/src/types/events/internal/index.ts: -------------------------------------------------------------------------------- 1 | import type { IncomingInternalEvents, OutgoingInternalEvents } from "./events"; 2 | import type { CrossmintInternalEventMap } from "./payloads"; 3 | 4 | export * from "./events"; 5 | export * from "./payloads"; 6 | 7 | export type IncomingInternalEvent = { 8 | [K in IncomingInternalEvents]: { 9 | type: K; 10 | payload: CrossmintInternalEventMap[K]; 11 | }; 12 | }[IncomingInternalEvents]; 13 | 14 | export type OutgoingInternalEvent = { 15 | [K in OutgoingInternalEvents]: { 16 | type: K; 17 | payload: CrossmintInternalEventMap[K]; 18 | }; 19 | }[OutgoingInternalEvents]; 20 | 21 | export type CrossmintInternalEvent = IncomingInternalEvent | OutgoingInternalEvent; 22 | -------------------------------------------------------------------------------- /apps/payments/nextjs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "target": "ES2020", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ] 21 | }, 22 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 23 | "exclude": ["node_modules"] 24 | } 25 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/utils/embed/userAgent.ts: -------------------------------------------------------------------------------- 1 | import { Platform } from "react-native"; 2 | import * as Device from "expo-device"; 3 | 4 | export const osVersion = Device.osVersion || "0"; 5 | export const modelName = Device.modelName || "Unknown"; 6 | 7 | export const userAgent = 8 | Platform.OS === "ios" 9 | ? `Mozilla/5.0 (iPhone; CPU iPhone OS ${osVersion 10 | .toString() 11 | .replace(/\./g, "_")} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/${Math.floor( 12 | Number(osVersion) / 2 13 | )}.0 Mobile/15E148 Safari/604.1` 14 | : `Mozilla/5.0 (Linux; Android ${osVersion}; ${modelName}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36`; 15 | -------------------------------------------------------------------------------- /packages/common/base/src/blockchain/types/nft.ts: -------------------------------------------------------------------------------- 1 | import type { Blockchain } from "."; 2 | import type { EVMBlockchainIncludingTestnet } from "./evm"; 3 | 4 | export interface EVMNFT { 5 | chain: EVMBlockchainIncludingTestnet; 6 | contractAddress: string; 7 | tokenId: string; 8 | } 9 | 10 | export interface SolanaNFT { 11 | mintHash: string; 12 | chain: "solana"; 13 | } 14 | 15 | export type NFTLocator = `${T}:${string}${T extends EVMBlockchainIncludingTestnet 16 | ? `:${string}` 17 | : ""}`; 18 | 19 | export type NFT = SolanaNFT | EVMNFT; 20 | 21 | export type NFTOrNFTLocator = 22 | | NFT 23 | | NFTLocator<"solana"> 24 | | NFTLocator<"ethereum"> 25 | | NFTLocator<"polygon"> 26 | | NFTLocator<"bsc">; 27 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/src/providers/CrossmintProviders.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import type { ReactNode } from "react"; 4 | import { CrossmintProvider, CrossmintAuthProvider } from "@crossmint/client-sdk-react-ui"; 5 | 6 | export default function CrossmintProviders({ children }: { children: ReactNode }) { 7 | return ( 8 | 9 | 14 | {children} 15 | 16 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /apps/wallets/smart-wallet/next/src/components/secured-by-crossmint.tsx: -------------------------------------------------------------------------------- 1 | import { CrossmintLeaf } from "@/icons/crossmint-leaf"; 2 | import { cn } from "@/lib/utils"; 3 | 4 | import { Typography } from "./typography"; 5 | 6 | export const SecuredByCrossmint = ({ className }: { className?: string }) => { 7 | return ( 8 | 15 | 16 | 17 | 18 | Secured by Crossmint 19 | 20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/hooks/useAuth.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from "react"; 2 | import type { CrossmintAuthBaseContextType } from "@crossmint/client-sdk-react-base"; 3 | import type { OAuthProvider } from "@crossmint/common-sdk-auth"; 4 | import { AuthContext } from "@/providers"; 5 | 6 | export interface CrossmintAuthContext extends CrossmintAuthBaseContextType { 7 | experimental_loginWithOAuth: (provider: OAuthProvider) => Promise; 8 | } 9 | 10 | export function useCrossmintAuth(): CrossmintAuthContext { 11 | const context = useContext(AuthContext); 12 | if (context == null) { 13 | throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider"); 14 | } 15 | return context; 16 | } 17 | 18 | export const useAuth = useCrossmintAuth; 19 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@crossmint/auth-ssr-nextjs-demo", 3 | "version": "0.4.142", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@crossmint/client-sdk-react-ui": "workspace:*", 13 | "@crossmint/server-sdk": "workspace:*", 14 | "react": "^18", 15 | "react-dom": "^18", 16 | "next": "14.2.26" 17 | }, 18 | "devDependencies": { 19 | "typescript": "^5", 20 | "@types/node": "^20", 21 | "@types/react": "^18", 22 | "@types/react-dom": "^18", 23 | "postcss": "^8", 24 | "tailwindcss": "^3.4.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/auth/methods/email/EmailAuthFlow.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { EmailOTPInput } from "./EmailOTPInput"; 3 | import { EmailSignIn } from "./EmailSignIn"; 4 | import { useAuthForm } from "@/providers/auth/AuthFormProvider"; 5 | import type { OtpEmailPayload } from "@/types/auth"; 6 | 7 | export function EmailAuthFlow() { 8 | const { step } = useAuthForm(); 9 | const [otpEmailData, setOtpEmailData] = useState(null); 10 | 11 | if (step === "otp") { 12 | return ; 13 | } 14 | if (step === "initial") { 15 | return ; 16 | } 17 | 18 | return null; 19 | } 20 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/app/routes/api.logout.tsx: -------------------------------------------------------------------------------- 1 | import { createCrossmint, CrossmintAuth } from "@crossmint/server-sdk"; 2 | import type { ActionFunctionArgs } from "@remix-run/node"; 3 | 4 | export async function action({ request }: ActionFunctionArgs) { 5 | if (request.method !== "POST") { 6 | return new Response(null, { status: 405 }); 7 | } 8 | 9 | try { 10 | const crossmint = createCrossmint({ 11 | apiKey: process.env.SERVER_CROSSMINT_API_KEY || "", 12 | }); 13 | const crossmintAuth = CrossmintAuth.from(crossmint); 14 | const response = await crossmintAuth.logout(request); 15 | 16 | return response; 17 | } catch (error) { 18 | console.error(error); 19 | return new Response(null, { status: 500 }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/auth/nextjs-ssr/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./src/*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /apps/payments/nextjs/components/hosted-v3/HostedCheckoutV3ClientProviders.tsx: -------------------------------------------------------------------------------- 1 | import { CrossmintCheckoutProvider, CrossmintProvider } from "@crossmint/client-sdk-react-ui"; 2 | import type { ReactNode } from "react"; 3 | 4 | export function HostedCheckoutV3ClientProviders({ children }: { children: ReactNode }) { 5 | return ( 6 | 10 | {children} 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/common/CrossmintLogoV2/consts.ts: -------------------------------------------------------------------------------- 1 | export const CROSSMINT_LOGO_DEFAULT_COLORS = { 2 | light: { 3 | icon: { 4 | type: "gradient", 5 | from: "#5edd4d", 6 | to: "#05ce6c", 7 | }, 8 | text: "#222", 9 | }, 10 | dark: { 11 | icon: { 12 | type: "gradient", 13 | from: "#5edd4d", 14 | to: "#05ce6c", 15 | }, 16 | text: "#fff", 17 | }, 18 | } as const; 19 | 20 | export const CROSSMINT_LOGO_DEFAULTS = { 21 | colors: CROSSMINT_LOGO_DEFAULT_COLORS.light, 22 | displayType: "icon-and-text", 23 | } as const; 24 | 25 | export const CROSSMINT_LOGO_VIEWBOXES = { 26 | "icon-only": "0 0 86 86", 27 | "icon-and-text": "0 0 459.2 86", 28 | } as const; 29 | -------------------------------------------------------------------------------- /apps/auth/remix-ssr/app/routes/api.refresh.tsx: -------------------------------------------------------------------------------- 1 | import { createCrossmint, CrossmintAuth } from "@crossmint/server-sdk"; 2 | import type { ActionFunctionArgs } from "@remix-run/node"; 3 | 4 | export async function action({ request }: ActionFunctionArgs) { 5 | if (request.method !== "POST") { 6 | return new Response(null, { status: 405 }); 7 | } 8 | 9 | try { 10 | const crossmint = createCrossmint({ 11 | apiKey: process.env.SERVER_CROSSMINT_API_KEY || "", 12 | }); 13 | const crossmintAuth = CrossmintAuth.from(crossmint); 14 | const response = await crossmintAuth.handleCustomRefresh(request); 15 | 16 | return response; 17 | } catch (error) { 18 | console.error(error); 19 | return new Response(null, { status: 500 }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/common/auth/src/types/authmaterial.ts: -------------------------------------------------------------------------------- 1 | import type { SDKExternalUser } from "./user"; 2 | 3 | export type AuthMaterialBasic = { 4 | jwt?: string; 5 | refreshToken: string; 6 | }; 7 | 8 | export type AuthMaterial = { 9 | jwt: string; 10 | refreshToken: RefreshToken; 11 | }; 12 | 13 | export type AuthMaterialWithUser = AuthMaterial & { 14 | user: SDKExternalUser; 15 | }; 16 | 17 | export type AuthMaterialResponse = { 18 | jwt: string; 19 | refresh: RefreshToken; 20 | user: SDKExternalUser; 21 | }; 22 | 23 | export type AuthSession = { 24 | jwt: string; 25 | refreshToken: RefreshToken; 26 | userId: string; 27 | }; 28 | 29 | interface RefreshToken { 30 | secret: string; 31 | expiresAt: string; 32 | } 33 | 34 | export type OAuthProvider = "google" | "twitter"; 35 | -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/.env.template: -------------------------------------------------------------------------------- 1 | # REMINDER: When setting up the Crossmint API key, update JWT authentication by adding your preferred auth provider under "3P Auth Providers" 2 | NEXT_PUBLIC_CROSSMINT_API_KEY= 3 | # Bring your own auth (BYOA) keys (Not needed when using Crossmint Auth) 4 | NEXT_PUBLIC_PRIVY_APP_ID= 5 | NEXT_PUBLIC_DYNAMIC_ENV_ID= 6 | # EVM 7 | NEXT_PUBLIC_EVM_CHAIN="optimism-sepolia" 8 | # FIREBASE (optional - only necessary when testing with firebase) 9 | NEXT_PUBLIC_FIREBASE_API_KEY= 10 | NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= 11 | NEXT_PUBLIC_FIREBASE_PROJECT_ID= 12 | NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= 13 | NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= 14 | NEXT_PUBLIC_FIREBASE_APP_ID= 15 | # Playwright E2E 16 | MAILOSAUR_API_KEY= 17 | MAILOSAUR_SERVER_ID= 18 | MAILOSAUR_PHONE_NUMBER= 19 | TESTS_CROSSMINT_API_KEY= -------------------------------------------------------------------------------- /apps/wallets/quickstart-devkit/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | 43 | # Playwright 44 | node_modules/ 45 | /test-results/ 46 | /playwright-report/ 47 | /blob-report/ 48 | /playwright/.cache/ 49 | -------------------------------------------------------------------------------- /apps/payments/nextjs/app/payment-method-management/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { AuthButton } from "../../components/common/AuthButton"; 4 | import { ClientProviders } from "./components/ClientProviders"; 5 | import { useCrossmintAuth, CrossmintPaymentMethodManagement } from "@crossmint/client-sdk-react-ui"; 6 | 7 | export default function PaymentMethodManagementPage() { 8 | return ( 9 | 10 | 11 | 12 | 13 | ); 14 | } 15 | 16 | function PaymentMethodManagementWrapper() { 17 | const { jwt } = useCrossmintAuth(); 18 | 19 | if (jwt == null) { 20 | return
Please login to continue
; 21 | } 22 | 23 | return ; 24 | } 25 | -------------------------------------------------------------------------------- /packages/client/ui/react-native/src/types/auth.ts: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from "react"; 2 | import type { CrossmintAuthBaseContextType, CrossmintAuthBaseProviderProps } from "@crossmint/client-sdk-react-base"; 3 | import type { AuthMaterialWithUser, OAuthProvider, SDKExternalUser } from "@crossmint/common-sdk-auth"; 4 | 5 | export interface RNAuthContext extends CrossmintAuthBaseContextType { 6 | user?: SDKExternalUser; 7 | loginWithOAuth: (provider: OAuthProvider) => Promise; 8 | createAuthSession: (urlOrOneTimeSecret: string) => Promise; 9 | } 10 | 11 | export interface RNCrossmintAuthProviderProps extends CrossmintAuthBaseProviderProps { 12 | prefetchOAuthUrls?: boolean; 13 | authModalTitle?: string; 14 | children: ReactNode; 15 | appSchema?: string | string[]; 16 | } 17 | -------------------------------------------------------------------------------- /packages/common/base/src/apiKey/types.ts: -------------------------------------------------------------------------------- 1 | export const APIKeyUsageOriginPrefix = { 2 | CLIENT: "ck", 3 | SERVER: "sk", 4 | } as const; 5 | export type APIKeyUsageOriginPrefix = (typeof APIKeyUsageOriginPrefix)[keyof typeof APIKeyUsageOriginPrefix]; 6 | 7 | export const APIKeyEnvironmentPrefix = { 8 | DEVELOPMENT: "development", 9 | STAGING: "staging", 10 | PRODUCTION: "production", 11 | } as const; 12 | export type APIKeyEnvironmentPrefix = (typeof APIKeyEnvironmentPrefix)[keyof typeof APIKeyEnvironmentPrefix]; 13 | 14 | export type APIKeyPrefix = `${APIKeyUsageOriginPrefix}_${APIKeyEnvironmentPrefix}`; 15 | 16 | export const APIKeyUsageOrigin = { 17 | CLIENT: "client", 18 | SERVER: "server", 19 | } as const; 20 | export type APIKeyUsageOrigin = (typeof APIKeyUsageOrigin)[keyof typeof APIKeyUsageOrigin]; 21 | -------------------------------------------------------------------------------- /packages/client/wallets/walletconnect/src/types/UIConfig.ts: -------------------------------------------------------------------------------- 1 | import type { CoreTypes } from "@walletconnect/types"; 2 | 3 | export type CrossmintWalletConnectUIConfig = { 4 | colors?: CrossmintWalletConnectUIConfigColors; 5 | metadata: Omit & { icon: string }; 6 | }; 7 | 8 | export type CrossmintWalletConnectRequiredUIConfig = { 9 | colors: Required; 10 | metadata: CrossmintWalletConnectUIConfig["metadata"]; 11 | }; 12 | 13 | export type CrossmintWalletConnectUIConfigColors = { 14 | textPrimary?: string; 15 | textSecondary?: string; 16 | textLink?: string; 17 | textAccentButton?: string; 18 | accent?: string; 19 | background?: string; 20 | backgroundSecondary?: string; 21 | border?: string; 22 | danger?: string; 23 | }; 24 | -------------------------------------------------------------------------------- /packages/client/window/src/windows/Child.ts: -------------------------------------------------------------------------------- 1 | import type { EventMap } from "../EventEmitter"; 2 | import type { EventEmitterWithHandshakeOptions } from "../handshake"; 3 | import { HandshakeChild } from "../handshake/Child"; 4 | import { WindowTransport } from "../transport/WindowTransport"; 5 | 6 | export class ChildWindow extends HandshakeChild< 7 | IncomingEvents, 8 | OutgoingEvents 9 | > { 10 | constructor( 11 | parentWindow: Window, 12 | targetOrigin: string | string[], 13 | options?: Omit, "targetOrigin"> 14 | ) { 15 | const transport = new WindowTransport(parentWindow, targetOrigin); 16 | super(transport, options); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/common/base/src/logger/types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Log level enum 3 | */ 4 | export type LogLevel = "debug" | "info" | "warn" | "error"; 5 | 6 | /** 7 | * Context object that can be attached to logs 8 | */ 9 | export interface LogContext { 10 | [key: string]: unknown; 11 | } 12 | 13 | /** 14 | * Log entry structure 15 | */ 16 | export interface LogEntry { 17 | level: LogLevel; 18 | message: string; 19 | context: LogContext; 20 | timestamp: number; 21 | } 22 | 23 | /** 24 | * Sink interface for log output destinations 25 | */ 26 | export interface LogSink { 27 | /** 28 | * Unique identifier for the sink 29 | * Used to prevent duplicate sinks from being added 30 | */ 31 | id: string; 32 | /** 33 | * Write a log entry to the sink 34 | */ 35 | write(entry: LogEntry): void; 36 | } 37 | -------------------------------------------------------------------------------- /packages/client/ui/react-ui/src/components/CrossmintNFTDetail.tsx: -------------------------------------------------------------------------------- 1 | import { assertValidValidateNFTDetailProps, getNFTDetailSrc } from "@crossmint/client-sdk-base"; 2 | import type { NFTDetailProps } from "@crossmint/common-sdk-base"; 3 | 4 | import { LIB_VERSION } from "../consts/version"; 5 | 6 | export function CrossmintNFTDetail(props: NFTDetailProps) { 7 | assertValidValidateNFTDetailProps(props); 8 | 9 | const src = getNFTDetailSrc(props, LIB_VERSION); 10 | 11 | return ( 12 |