# Access your account through a seed & a keyring

### Prerequisites

Before getting started, please ensure that you have the following prerequisites in place:

1. [Create a Ternoa account](/getting-started/wallets/ternoa-wallet.md) with [Alphanet CAPS](broken://pages/ej9gceaLIhCN2PgUBh42) from the [faucet.](https://faucet.ternoa.network/)
2. Install and configure your preferred code editor (for this tutorial, we will be using Visual Studio Code \[VSC]).
3. Install [NodeJS v.14+](https://nodejs.org/en/download/), along with NPM.

{% hint style="success" %}
If you are not familiar with the process of creating a transaction on the Ternoa chain, we highly suggest first reading the Getting Started section of the documentation with a focus on the [Ternoa-js workflow](/getting-started/javascript-sdk/ternoa-js-library/workflow.md) and the two transaction [approaches](/getting-started/javascript-sdk/ternoa-js-library/workflow.md#to-build-applications-within-the-ternoa-sdk-we-provide-two-approaches-for-each-primitive-extrinsic).&#x20;
{% endhint %}

Most of our examples in this documentation use the **automated approach** and involve creating the Keyring to sign and submit a transaction.&#x20;

{% hint style="info" %}
&#x20;Polkadot ***Keyring's*** definition: *The Keyring allows you to manage a set of keys in a consistent environment, allows you to perform operations on these keys (such as sign/verify), and never exposes the secretKey to the outside world.*\
\
Learn more on keyring in the[ Polkadot's documentation.](https://polkadot.js.org/docs/keyring)&#x20;
{% endhint %}

### Generating a keyring

{% hint style="warning" %}
We assume you have already created a new wallet for development purposes with no CAPS on Ternoa Mainnet. You must use a development wallet with *NO REAL MONEY* in it when learning, practicing, and testing.\
\
**The 12 worlds' seeds must be stored in a .env.variable file. Be sure to NEVER make your seed publicly accessible or visible in a browser.**
{% endhint %}

```typescript
import { initializeApi, getKeyringFromSeed } from "ternoa-js";

const main = async () => { 
	try { 
		await initializeApi();	
		const ACCOUNT_SEED = "REPLACE_WITH_YOUR_SEED"; // 12 worlds seed
		const keyring = await getKeyringFromSeed(ACCOUNT_SEED);
		console.log(`The keyring address is ${keyring.address}`);
		process.exit(0)
	} catch (e) {
		console.error(e);
		process.exit(1)
	} finally {
		process.exit(0)
	}
};
main();
```

You can now provide your keyring as function parameters to create some transactions like we do to [mint an NFT.](/build-1/javascript/nft-features-and-pallets/basics-nft-and-collections/nft/mint-a-basic-nft.md) \
\
See more examples in the [NFT features & Pallets section. ](/build-1/javascript/nft-features-and-pallets.md)


---

# 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.ternoa.network/build-1/javascript/wallets/access-your-account-through-a-seed-and-a-keyring.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.
