> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Server Wallets Quickstart ⚡

> Create server wallets on Story in under 5 minutes

In this quickstart, you will create new user wallets on Story.

<Note> This quickstart is under development as new features are added to the Story Protocol daily. </Note>

## Preparation Steps

<Steps>
  <Step title="Create a Developer Account and Project">
    <Snippet file="create-developer-account.mdx" />
  </Step>

  <Step title="Get an API Key">
    Create a server-side API key with these scopes:
    `wallets.create`,
    `wallets:transactions.create`,
    `wallets:transactions.sign`.

    This allows your API key to create new server wallets.
  </Step>
</Steps>

## Create Server Wallets

<Steps>
  <Step title="Choose a Wallet Type">
    Below is a summary of available wallet types and their characteristics:

    | Custodial | Type               | Admin Signer               |
    | --------- | ------------------ | -------------------------- |
    | True      | `evm-smart-wallet` | `evm-fireblocks-custodial` |
    | False     | `evm-smart-wallet` | `evm-keypair`              |
  </Step>

  <Step title="Create a Wallet">
    <CodeGroup>
      ```typescript createWallet.ts theme={null}
      const response = await fetch("https://staging.crossmint.com/api/2022-06-09/wallets", {
          method: "POST",
          headers: {
              "X-API-KEY": "<YOUR_API_KEY>",
              "Content-Type": "application/json",
          },
          body: JSON.stringify({
              type: "<WALLET_TYPE>",
              // Here you can pass a user ID, email, phone number, twitter handle etc. depending on how the user is identified in your application
              linkedUser: "email:user@example.com",
              config:{
                  adminSigner: {type: "<ADMIN_SIGNER>"},
              }
          }),
      });

      const wallet = await response.json();
      console.log("Wallet created:", wallet);
      ```

      ```typescript response theme={null}
      {
          type: 'evm-smart-wallet',
          config: {
              adminSigner: {
                  type: 'evm-fireblocks-custodial',
                  address: '0xc55C0a7695DC5D9322aE5204AED91BF13c3412F2',
                  locator: 'evm-fireblocks-custodial:0xc55C0a7695DC5D9322aE5204AED91BF13c3412F2'
              }
          },
          address: '0x8B11c6D3a7115A462a91183824c83574c9190E06',
          linkedUser: 'email:user@example.com',
          createdAt: '2025-02-07T21:34:29.109Z'
      }
      ```
    </CodeGroup>

    Now, run the script:

    <CodeGroup>
      ```bash TypeScript theme={null}
      npx tsx createWallet.ts
      ```
    </CodeGroup>
  </Step>
</Steps>

## Send Arbitrary Transaction

<Steps>
  <Step title="Prepare the transaction">
    Set up a Story Protocol client using the wallet created in the previous step and prepare a transaction to create a new NFT collection

    <CodeGroup>
      ```typescript prepareTransaction.ts theme={null}
      const client = StoryClient.newClient({
          transport: http(RPC_PROVIDER_URL),
          account: wallet.address,
      });

      const creationTx = await client.nftClient.createNFTCollection({
          name: "A collection of IP fantasy assets",
          symbol: "XMT",
          contractURI: "ipfs://QmXYnQJjUxojhh6NKkxPkcXNKFo4pU2hxUyJjqzTcQL9rE",
          isPublicMinting: true,
          mintOpen: true,
          mintFeeRecipient: wallet.address,
          txOptions: {
              encodedTxDataOnly: true,
          },
      });
      ```
    </CodeGroup>
  </Step>

  <Step title="Send the transaction">
    Send the prepared transaction to Crossmint's API, which handles the blockchain interaction. The transaction creates the NFT collection on Story Protocol's network without requiring user's signature or handling of gas fees.

    <CodeGroup>
      ```typescript createTransaction.ts theme={null}
      const response = await fetch(`https://staging.crossmint.com/api/2022-06-09/wallets/${wallet.address}/transactions`, {
          method: "POST",
          headers: {
              "X-API-KEY": "<YOUR_API_KEY>",
              "Content-Type": "application/json",
          },
          body: JSON.stringify({
              params: {
                  call: {
                      // Encoded transaction data
                      data: creationTx.encodedTxData.data,
                      // Transaction destination
                      to: creationTx.encodedTxData.to,
                  },
                  chain: "story-testnet",
              },
          }),
      });

      const transaction = await response.json();
      console.log("Transaction created:", transaction.id);
      ```
    </CodeGroup>

    <Note>
      Story Protocol transactions through Crossmint smart wallets are completely gas-free! You can focus on building your
      application without worrying about managing gas fees or token balances.
    </Note>
  </Step>

  <Step title="Monitor Transaction Status">
    Check the transaction status using the transaction ID.

    <CodeGroup>
      ```javascript checkStatus.js theme={null}
      const response = await fetch(
          `https://staging.crossmint.com/api/2022-06-09/wallets/${wallet.address}/transactions/${transaction.id}`,
          {
              method: "GET",
              headers: {
                  "X-API-KEY": "<YOUR_API_KEY>",
              },
          }
      );

      const status = await response.json();
      console.log("Status:", status.status);
      ```
    </CodeGroup>
  </Step>
</Steps>
