Skip to content

Creating a cloud wallet

@ We need to create a website where users can come, sign up and create a cloud wallet for themselves. They can login via username and password, create new wallets, ask the backend to sign a transaction on their behalf.

  • User signs up

    POST /api/v1/signup

    {
    "username": "harkirat",
    "password": "123456"
    }

    Returns Status 200

    {
    "publicKey": ""
    }

    Status 400

    {
    message: "User already exists"
    }
  • User signs in

    POST /api/v1/signin

    {
    "username": "harkirat",
    "password": "123456"
    }

    Returns Status 200

    {
    jwt: "jwt"
    }

    Status 401

    {
    message: "Incorrect credentials"
    }
  • Users asks to sign a txn

    POST /api/v1/txn/sign

    {
    message: "transaction_signature",
    retry?: true/false
    }

    Returns 200

    {
    id: "id_to_track_txn
    }
  • User asks for the status of a problem

    GET /api/v1/txn/?id=id Returns

    {
    signatures: ["xyz"],
    status: "processing" | "success" | "failed"
    }

Hints