# Creating CryptoKylin Account

Setting up a Kylin testnet account can sometimes be more an art than a science.  If you have any issues please reach out to us.

## **Free Account**

Create account using: <https://faucet.eosnation.io/docs>

{% hint style="warning" %}
Test accounts can only contain the characters a-z (lowercase), 1-5 and they **must be 12 characters.**
{% endhint %}

Example (change account name and public key):

{% hint style="info" %}
Below you'll see how to create a keypair
{% endhint %}

```bash
curl -X 'POST' \
  'https://faucet.eosnation.io/api/create?chain=kylin&account=heliosselene&key=EOS7npyU3nxstq9HumfSCVcmsFQxcy2cXtHhWMhXsPWAJWVtR9g9d' \
  -H 'accept: application/json' \
  -d ''
```

{% hint style="info" %}
If that guy is giving you flack, try this guy: <https://testnet-tools.eosargentina.io/kylin>
{% endhint %}

## **Get Free tokens**

Get 100 free EOS tokens / 24 hours

Example:

```bash
curl -X 'POST' \
  'https://faucet.eosnation.io/api/send?chain=kylin&to=heliosselene' \
  -H 'accept: application/json' \
  -d ''
```

## Get DAPP Tokens

Enter your account here: <https://kylin-dapp-faucet.liquidapps.io/>

## Setup Account

The following guide walks you through setting up an account, creating an EOSIO wallet with `keosd`, importing the private keys, buying RAM for your account, and staking EOS for CPU/NET so you can run transactions.

### Setup

```bash
# must be EOSIO account name format
# 12 characters a-z lowercase 1-5
export KYLIN_ACCOUNT=yourtestaccount

# Configure endpoint
export KYLIN_ENDPOINT=https://kylin.eosn.io

# Create wallet
cleos wallet create --file wallet_password.pwd
```

### Create account

Below we will create a public/private key pair.

```bash
curl http://faucet-kylin.blockzone.net/create/$KYLIN_ACCOUNT > keys.json
export ACTIVE_PRIVATE_KEY=`cat keys.json | jq -e '.data.account.active.privateKey'`
export OWNER_PRIVATE_KEY=`cat keys.json | jq -e '.data.account.owner.privateKey'`

# import keys
zeus key import $KYLIN_ACCOUNT --owner-private-key $OWNER_PRIVATE_KEY --active-private-key $ACTIVE_PRIVATE_KEY --network=kylin
cleos wallet import --private-key $ACTIVE_PRIVATE_KEY
```

{% hint style="warning" %}
Be sure to save your wallet password!
{% endhint %}

## Buy RAM, Stake CPU/NET

Now we will buy RAM so that we can deploy a smart contract, and we stake EOS for CPU/NET so that we can run transactions.

```bash
# below amounts use 1000 EOS total
cleos -u $KYLIN_ENDPOINT system delegatebw $KYLIN_ACCOUNT $KYLIN_ACCOUNT "50.0000 EOS" "350.0000 EOS" -p $KYLIN_ACCOUNT@active
cleos -u $KYLIN_ENDPOINT system buyram $KYLIN_ACCOUNT $KYLIN_ACCOUNT "600.0000 EOS" -p $KYLIN_ACCOUNT@active
```

## Set eosio.code permission

`eosio.code` allows a smart contract to sign actions itself, we will set this up under the `active` permission level.

```bash
cleos -u $KYLIN_ENDPOINT set account permission $KYLIN_ACCOUNT active $KYLIN_ACCOUNT --add-code
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.liquidapps.io/liquidapps-documentation/eosio-guides/testnet-creation-guides/creating-cryptokylin-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
