# 1. Introduction

## Amadeus Protocol SDK Documentation

Welcome to the Amadeus Protocol SDK documentation. This guide will help you integrate the SDK into your applications and interact with the Amadeus blockchain.

### Overview

The Amadeus Protocol SDK is a TypeScript/JavaScript library that provides a complete toolkit for building applications on the Amadeus blockchain. It offers a unified interface for interacting with nodes, building transactions, managing keys, and querying blockchain data.

#### Key Features

* **Complete API Client**: Full-featured HTTP client for all Amadeus node endpoints
* **Transaction Building**: Easy-to-use transaction builder with signing support
* **Cryptographic Operations**: BLS12-381 key generation, signing, and verification
* **Canonical Serialization**: VecPack encoding/decoding for deterministic data representation
* **Password-Based Encryption**: Secure AES-GCM encryption for wallet data protection
* **Type Safety**: Complete TypeScript definitions for all APIs
* **Zero Dependencies**: Uses native fetch (no external HTTP libraries)
* **Encoding Utilities**: Base58 and Base64 encoding/decoding
* **Token Conversions**: Convert between atomic units and human-readable amounts

#### What You Can Do

* **Query Blockchain Data**: Get chain stats, entries, transaction history
* **Manage Wallets**: Check balances, query transaction events
* **Build Transactions**: Create and sign transactions for token transfers and contract calls
* **Interact with Contracts**: Read contract data, validate bytecode, query richlists
* **Network Information**: Get peer information, validator data, epoch scores
* **Secure Storage**: Encrypt sensitive data with password-based encryption

#### Architecture

The SDK is organized into several key modules:

* **AmadeusSDK**: Main SDK class providing access to all modules
* **TransactionBuilder**: Class for building and signing transactions
* **API Modules**: Chain, Wallet, Transaction, Contract, Epoch, Peer, Proof
* **Utilities**: Crypto, Encoding, Serialization, Conversion, Encryption

#### Quick Start

```typescript
import { AmadeusSDK, TransactionBuilder, generateKeypair } from '@amadeus-protocol/sdk'

// Initialize SDK
const sdk = new AmadeusSDK({
	baseUrl: 'https://nodes.amadeus.bot/api'
})

// Generate a keypair
const keypair = generateKeypair()

// Build and submit a transaction
const builder = new TransactionBuilder(keypair.privateKey)
const { txHash, txPacked } = builder.transfer({
	recipient: '5Kd3N...',
	amount: 10.5,
	symbol: 'AMA'
})

const result = await sdk.transaction.submit(txPacked)
```

### Documentation Structure

* **Getting Started**: Installation and basic setup
* **Core Concepts**: Understanding keypairs, addresses, transactions
* **Transaction Building**: Building and signing transactions
* **API Modules**: Complete API reference for all modules
* **Utilities**: Crypto, encoding, serialization, and conversion utilities
* **Examples**: Real-world usage examples
* **Best Practices**: Security and development best practices
* **Troubleshooting**: Common issues and solutions

### Package Information

* **Package**: `@amadeus-protocol/sdk`
* **Version**: Check [npm](https://www.npmjs.com/package/@amadeus-protocol/sdk)
* **License**: MIT
* **TypeScript**: Full TypeScript support with complete type definitions

### Resources

* **NPM Package**: [@amadeus-protocol/sdk](https://www.npmjs.com/package/@amadeus-protocol/sdk)
* **GitHub Repository**: <https://github.com/amadeusprotocol/amadeus-typescript-sdk>
* **Mainnet Explorer**: <https://explorer.ama.one>
* **Testnet Explorer**: <https://testnet.explorer.ama.one>

### Next Steps

1. [Install the SDK](/sdk/2.-getting-started.md)
2. [Learn the core concepts](/sdk/3.-core-concepts.md)
3. [Build your first transaction](/sdk/4.-transaction-building.md)
4. [Explore the API modules](/sdk/5.-api-modules.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.ama.one/sdk/1.-introduction.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.
