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

# Get Wallet Registration Nonce

> Initiates a wallet registration request for the specified user. This endpoint will return a `nonce` that must be signed by the private key of the wallet address you are registering against the user using the [SIWE EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) (Sign in with Ethereum) spec. We will apply this to both Ethereum and Solana. In the case of Solana, instead of `${domain} wants you to sign in with your Ethereum account:`, we will expect `${domain} wants you to sign in with your Solana account:` and also Chain ID will not be expected either for Solana. Once verified, we will attach the wallet to the user specified.
## Returns

A successful response returns an object with `nonce` and \`user_id\` properties.



## OpenAPI

````yaml post /v1/auth/wallets/registrations/nonce
openapi: 3.1.0
info:
  title: MoonKey Auth API
  description: >-
    Explore all the details of MoonKey Auth API. All of our APIs are RESTful and
    accept and return JSON.
  version: v1
servers:
  - url: https://api.moonkey.fun
    description: Production
    variables: {}
security:
  - Authorization: []
tags:
  - name: Users
    description: User management API
  - name: Magic Links
    description: ''
  - name: OTPs
    description: >-
      Send OTP (One-time passcodes) by all the supported delivery methods such
      as SMS, email.
  - name: OAuth
    description: ''
  - name: Wallets Login
    description: ''
  - name: Managed Wallets
    description: ''
  - name: Wallet Import
    description: >-
      Import existing wallets into the platform using secure HPKE encryption.
      This flow ensures raw entropy (seed phrases or private keys) never touches
      the server in plaintext.
externalDocs:
  url: ''
  description: ''
paths:
  /v1/auth/wallets/registrations/nonce:
    parameters: []
    post:
      tags:
        - Wallets Login
      summary: Get Wallet Registration Nonce
      description: >-
        Initiates a wallet registration request for the specified user. This
        endpoint will return a `nonce` that must be signed by the private key of
        the wallet address you are registering against the user using the [SIWE
        EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) (Sign in with
        Ethereum) spec. We will apply this to both Ethereum and Solana. In the
        case of Solana, instead of `${domain} wants you to sign in with your
        Ethereum account:`, we will expect `${domain} wants you to sign in with
        your Solana account:` and also Chain ID will not be expected either for
        Solana. Once verified, we will attach the wallet to the user specified.

        ## Returns


        A successful response returns an object with `nonce` and \`user_id\`
        properties.
      operationId: GetWalletRegistrationNonce
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetWalletRegistrationNonceRequest'
            examples:
              GetWalletRegistrationNonceReq:
                value:
                  wallet_type: ethereum
                  user_id: user_24wFP9pDa9YiMJLun94iKykoZs2
                  public_address: '0xF7E9D631bfBd90C19691566Db4AB96697A2663C6'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  app_id:
                    type: string
                    minLength: 1
                  user_id:
                    type: string
                    minLength: 1
                  public_address:
                    type: string
                    minLength: 1
                  wallet_type:
                    type: string
                    minLength: 1
                  challenge:
                    type: string
                    minLength: 1
                  updated_at:
                    type: number
                  created_at:
                    type: number
                required:
                  - id
                  - app_id
                  - user_id
                  - public_address
                  - wallet_type
                  - challenge
                  - updated_at
                  - created_at
              examples:
                GetWalletRegistrationNonceResp:
                  value:
                    id: walletrr_2BgK7k6hr0PCWNXEYrQ5IwACNtD
                    user_id: user_24wFP9pDa9YiMJLun94iKykoZs2
                    nonce: Oah2WPXGcKVEdJxpfrL1iFFUqqYuPu0q0z80z1NAB7U
                    user_created: false
components:
  schemas:
    GetWalletRegistrationNonceRequest:
      description: ''
      type: object
      properties:
        wallet_type:
          type: string
          minLength: 1
          description: >-
            Determines the type of wallet to register. Possible values:
            ethereum, solana (more coming soon!).
        public_address:
          type: string
          minLength: 1
          description: Public wallet address of the wallet.
        user_id:
          type: string
          minLength: 1
          description: >-
            Unique user ID to associate the wallet with. If left blank/omitted
            and no user is previously attached to this wallet, we will create a
            user. Otherwise. we will return the user_id of attached to this
            wallet in the response.
      required:
        - wallet_type
        - public_address
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Auth Platform API includes all the Auth related features. All Users,
        Phone Numbers, Emails, and OTPs are associated with an `App` as the
        container.


        Endpoints only accept App's `Secret API keys` other than certain
        endpoints that are used client side or via SDK that accept the
        `public_token`.


        ## Authentication using App Api Key


        ## Header:


        ```

        Authorization: Bearer {api_key}

        ```


        ## Authenticated Request


        ```curl

        curl \
          -X GET https://api.moonkey.fun/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
          -H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"
        ```

````