# Create Wallet

On Krypcore, creating your smart contract wallet is simple establish your wallet, configure security choices to tailor access, and enable smart features for smooth, decentralised control over your assets and transactions.

This creates a wallet using this method.&#x20;

## API Specification

## Create Wallet

<mark style="color:green;">`POST`</mark> `https://web3-proxy-dev.krypcore.com/api/v0/scWallet/createWallet`

Creates a new wallet under the given instance.&#x20;

#### Headers

| Name                                            | Type   | Description            |
| ----------------------------------------------- | ------ | ---------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User Auth Key obtained |
| DappId<mark style="color:red;">\*</mark>        | String | DappId                 |

#### Request Body

| Name                                         | Type   | Description   |
| -------------------------------------------- | ------ | ------------- |
| walletName<mark style="color:red;">\*</mark> | String | Wallet Name   |
| owner<mark style="color:red;">\*</mark>      | String | Owner Address |

{% tabs %}
{% tab title="200: OK Wallet successfully created" %}
```javascript
{
    "Data": {
        "address": "******",
        "walletId": "*****"
    },
    "Message": "wallet added successfully",
    "Status": "SUCCESS"
}
```
{% endtab %}

{% tab title="401: Unauthorized Failure in authentication" %}
```javascript
{
    "message": "Invalid API key in request"
}
```
{% endtab %}

{% tab title="400: Bad Request Mandatory parameter missing" %}
```
{
    "Data": null,
    "Message": "mandatory params missing",
    "Status": "FAILURE"
}
```
{% endtab %}
{% endtabs %}

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}
```bash

curl --location 'https://web3-proxy-dev.krypcore.com/api/v0/scWallet/createWallet' \
--header 'DappId: *****' \
--header 'Authorization: *****' \
--header 'Content-Type: application/json' \
--data '{"walletName":"ak10","owner":"0x39C1a4d1ff3cb5Ddf491db05E6d3a4DA61eD5b5f"}'
```
{% endtab %}

{% tab title="Node.js (Fetch)" %}
```javascript

var myHeaders = new Headers();
myHeaders.append("DappId", "*****");
myHeaders.append("Authorization", "*****");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "walletName": "ak10",
  "owner": "0x39C1a4d1ff3cb5Ddf491db05E6d3a4DA61eD5b5f"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://web3-proxy-dev.krypcore.com/api/v0/scWallet/createWallet", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```
{% endtab %}

{% tab title="Python " %}
```python

import requests
import json

url = "https://web3-proxy-dev.krypcore.com/api/v0/scWallet/createWallet"

payload = json.dumps({
  "walletName": "ak10",
  "owner": "0x39C1a4d1ff3cb5Ddf491db05E6d3a4DA61eD5b5f"
})
headers = {
  'DappId': '*****',
  'Authorization': '*****',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```
{% endtab %}

{% tab title="Golang" %}
```go

package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://web3-proxy-dev.krypcore.com/api/v0/scWallet/createWallet"
  method := "POST"

  payload := strings.NewReader(`{"walletName":"ak10","owner":"0x39C1a4d1ff3cb5Ddf491db05E6d3a4DA61eD5b5f"}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("DappId", "*****")
  req.Header.Add("Authorization", "*****")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
{% endtab %}
{% endtabs %}

