# Welcome

Tresori is a **Wallet-as-a-Service (WaaS)** platform designed to help builders integrate secure digital wallets into their applications without dealing with private key management or complex blockchain infrastructure.

With Tresori, developers can focus on building great user experiences while Tresori handles wallet creation, transaction signing, and asset security behind the scenes. Our infrastructure is built using **enterprise-grade cryptography and modern security standards**, ensuring that private keys are never exposed or stored in a single location.

By abstracting away blockchain complexity and security risks, Tresori enables teams to ship faster, scale confidently, and deliver seamless Web3 experiences without requiring users to understand wallets, seed phrases, or gas mechanics.

### Quick Access

<table data-card-size="large" data-view="cards" data-full-width="true"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-bolt">:bolt:</i></h4></td><td><strong>Tresori Overview</strong> </td><td></td><td></td><td><a href="/pages/8p8S1CuygSRsHLaQ8ljF">/pages/8p8S1CuygSRsHLaQ8ljF</a></td></tr><tr><td><h4><i class="fa-leaf">:leaf:</i></h4></td><td><strong>Quick Start</strong></td><td></td><td></td><td><a href="/pages/PbYb0GukRhiS4qCHdRal">/pages/PbYb0GukRhiS4qCHdRal</a></td></tr><tr><td><h4><i class="fa-globe-pointer">:globe-pointer:</i></h4></td><td><strong>API Refrences</strong></td><td></td><td></td><td><a href="/spaces/ULLMmfdTHZwwY2wLyk44">/spaces/ULLMmfdTHZwwY2wLyk44</a></td></tr><tr><td></td><td><strong>Tresori MPC</strong></td><td></td><td></td><td><a href="/pages/TZudLv7ZV5Vq5QI0nxDc">/pages/TZudLv7ZV5Vq5QI0nxDc</a></td></tr></tbody></table>


# Tresori Overview

### **Introduction**

**Tresori** is a Wallet-as-a-Service (WaaS) platform designed to help developers and enterprises build, manage, and operate secure blockchain wallets without dealing with low-level blockchain complexity. It provides a unified console to manage projects, wallets, chains, gas sponsorship, transactions, and APIs across multiple networks.

At its core, Tresori abstracts away:

* Private key and wallet security
* Gas fee handling
* Multi-chain configuration
* Transaction lifecycle monitoring
* Operational visibility and auditability

This makes blockchain usable for **real users**, not just crypto-native audiences.

### Why Tresori Is Important

Blockchain adoption often fails not because of the technology, but because **wallets are hard to build, hard to use, and hard to secure**. Tresori exists to remove these barriers.

#### 1. It removes wallet complexity for builders

Building a wallet system requires deep expertise in cryptography, key management, gas mechanics, and security. Tresori provides this as a **ready infrastructure layer**, letting teams focus on their product instead of low-level blockchain plumbing.

#### 2. It enables gasless user experiences

Gas fees are one of the biggest adoption blockers. Tresori introduces **gas tanks and gas sponsorship**, so end users can perform transactions without owning crypto or understanding gas concepts. This is critical for mainstream adoption.

#### 3. It bridges Web2 UX with Web3 capabilities

Tresori enables familiar login and embedded wallet flows, making blockchain feel like a normal digital service rather than a technical hurdle. This is essential for enterprises and consumer-facing apps.

Modern blockchain adoption faces several practical challenges that limit real-world usability. Most users are uncomfortable managing seed phrases, installing wallet extensions, or bearing the risk of losing private keys, which creates friction and fear at the very first step of onboarding. Tresori addresses this by offering embedded wallets and custodial/MPC-based wallet options, abstracting private key management while maintaining strong security controls. As a result, users can access blockchain features seamlessly, often without realizing they are interacting with blockchain infrastructure.

Another major challenge is transaction abandonment caused by gas fees. Users frequently drop off when asked to acquire cryptocurrency solely to pay for transaction costs. Tresori resolves this through gasless transactions, where the application transparently sponsors gas fees using project-level gas tanks. This enables smooth user experiences for micro-payments, enterprise workflows, educational platforms, and citizen-facing applications without requiring users to hold crypto assets.

Security remains a critical concern, as a single private key compromise can lead to irreversible loss of funds and trust. Tresori mitigates this risk by implementing secure key management practices, including MPC-based custody, encrypted data storage, detailed audit logs, and role-based access controls, making it suitable for enterprise-grade compliance, governance, and operational oversight.

Finally, supporting multiple blockchains traditionally requires separate integrations, RPC management, and ongoing monitoring, significantly increasing development and maintenance effort. Tresori simplifies this through project-level chain and network configuration, allowing teams to enable or disable supported blockchains without modifying their application logic, ensuring scalability and flexibility as business needs evolve.


# Tresori MPC

#### What Tresori MPC Is

Tresori MPC is a secure, enterprise-grade wallet security model built on Multi-Party Computation (MPC) and Threshold Signature Schemes (TSS).\
It allows applications to sign blockchain transactions without ever creating, storing, or exposing a complete private key, not on the server, not on the client, not anywhere.

Instead of *one private key*, Tresori distributes **key shares** across multiple independent parties. A transaction is signed **collaboratively**, and only the final signature is produced, never the key itself.

> Think of it like a nuclear launch system:\
> no single person has the full code, yet actions can still be authorized safely.

#### Why Tresori Uses MPC

| Traditional Model  | Risk                        |
| ------------------ | --------------------------- |
| Single private key | Total loss if compromised   |
| Seed phrases       | User error, phishing, loss  |
| Central custody    | Single point of failure     |
| Browser extensions | Malware & injection attacks |

At a high level, Tresori MPC secures your wallet and transactions using three invisible cryptographic layers. As a user, you never see private keys, seed phrases, or complex security steps, yet your assets remain protected by some of the strongest cryptography available.


# ARCHITECTURE

## Overview

This is a **3-Party Threshold ECDSA MPC (Multi-Party Computation) Wallet** system built on AWS Nitro Enclaves. It enables distributed key generation and signing where no single party holds the complete private key, ensuring enhanced security for Ethereum wallet operations.

<figure><img src="/files/5ZNpIDER41nZSc8LO2tY" alt=""><figcaption></figcaption></figure>

### DKG (Distributed Key Generation) Flow

<table data-card-size="large" data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><p>Browser (<code>mpc-client.html</code>):</p><ul><li>Generate client polynomial: f_c(x) = a0 + a1*x</li><li>Compute evaluations: f_c(1), f_c(2), f_c(3)</li><li>Compute public commitment: G * a0</li><li>Generate ECDH keypair for encryption</li></ul></td></tr><tr><td>Parent Relays to EnclaveValidates the request body and calls <code>sendToEnclave({ type: 'dkgInit', data: {...} })</code>.</td></tr><tr><td>Enclave Processes DKG Init<br>Generates session ID, ECDH keypair, enclave and server polynomials, derives shared secret, stores pending DKG state in memory.</td></tr><tr><td>Browser Completes DKGDecrypts enclave share, combines: <code>Share 1 = f_c(1) + f_e(1) + f_s(1)</code>, encrypts client share 3, posts to <code>/api/dkg/contribute</code>.</td></tr><tr><td>Parent Generates KMS KeyCalls <code>generateDataKey()</code> from AWS KMS, receives <code>{ plaintextKey, encryptedKey }</code>, then relays with data key to enclave.</td></tr><tr><td>Enclave Completes DKG<br>Computes Share 2 &#x26; Share 3 via Lagrange, derives Ethereum address from combined public key, encrypts shares with AES-256-GCM.</td></tr><tr><td>Parent Stores &#x26; RespondsUploads <code>sessionId.json</code> with encrypted shares and data key to S3. Returns <code>{ ethereumAddress, combinedPublicKey }</code> to browser.</td></tr></tbody></table>

### Complete Signing Flow

## 3. Enclave Flow

The Nitro Enclave is an isolated VM instance with no network access and no persistent storage. All communication is via vsock only, and all cryptographic operations occur within this hardware-isolated environment.

### Enclave Architecture

```
┌─────────────────────────────────────────────────────────────────────────────┐
│                              NITRO ENCLAVE                                   │
│                          (Isolated VM Instance)                              │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │                        VSOCK Server (Port 5000)                      │   │
│   │                          src/vsock-server.ts                         │   │
│   └────────────────────────────────┬────────────────────────────────────┘   │
│                                    │                                        │
│                                    ▼                                        │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │                      Handler Router                                  │   │
│   │                    src/handlers/index.ts                             │   │
│   └────────────────────────────────┬────────────────────────────────────┘   │
│                                    │                                        │
│          ┌─────────────────────────┼─────────────────────────┐              │
│          │                         │                         │              │
│          ▼                         ▼                         ▼              │
│   ┌──────────────┐         ┌──────────────┐         ┌──────────────┐        │
│   │   Health     │         │   Key Gen    │         │   Rust       │        │
│   │   Handler    │         │   Handler    │         │   Handler    │        │
│   │ health.ts    │         │ keygen.ts    │         │ rust.ts      │        │
│   └──────────────┘         └──────────────┘         └──────────────┘        │
│                                    │                                        │
│                                    ▼                                        │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │                    In-Memory Session Storage                         │   │
│   │  ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐        │   │
│   │  │  pendingDKGs    │ │ enclaveSessions │ │ walletSessions  │        │   │
│   │  │  Map<string,    │ │ Map<string,     │ │ Map<string,     │        │   │
│   │  │   PendingDKG>   │ │  EnclaveSession>│ │  WalletSession> │        │   │
│   │  └─────────────────┘ └─────────────────┘ └─────────────────┘        │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │                    Cryptographic Operations                          │   │
│   │  • ECDH Key Exchange (prime256v1)                                    │   │
│   │  • AES-256-GCM Encryption/Decryption                                 │   │
│   │  • ECDSA Partial Signing (secp256k1)                                 │   │
│   │  • EC Point Addition for Public Key                                  │   │
│   │  • Lagrange Interpolation                                            │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │                    NSM Attestation (Rust)                            │   │
│   │                      /app/bin/hello_rust                             │   │
│   │  • Generate attestation document                                     │   │
│   │  • Communicate with Nitro Security Module                            │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```

### Request Types Handled by Enclave

| Type            | Handler              | Purpose                         |
| --------------- | -------------------- | ------------------------------- |
| `health`        | healthHandler        | Return enclave health status    |
| `status`        | statusHandler        | Return initialization status    |
| `dkgInit`       | dkgInitHandler       | Initialize DKG session          |
| `dkgContribute` | dkgContributeHandler | Complete DKG, generate shares   |
| `partialSign`   | partialSignHandler   | Create partial ECDSA signature  |
| `simpleSign`    | simpleSignHandler    | Simple signing (legacy)         |
| `signComplete`  | signCompleteHandler  | Complete signing (legacy)       |
| `getSession`    | getSessionHandler    | Retrieve session info           |
| `deleteSession` | deleteSessionHandler | Clear session data              |
| `init`          | initHandler          | Legacy single-step DKG          |
| `runRust`       | runRustHandler       | Execute Rust attestation binary |
| `compute`       | computeHandler       | Generic computation             |

***

## 4. Vsock Communication Flow

### What is Vsock?

Vsock (Virtual Socket) is a communication protocol that enables communication between a virtual machine and its hypervisor/host, or between virtual machines. In AWS Nitro Enclaves, vsock is the **only** communication channel between the parent EC2 instance and the enclave.

### Vsock Configuration

```javascript
// parent-client.js
const VSOCK_PORT = 5000;  // Must match enclave
const PARENT_CID = 3;     // Parent instance always uses CID 3

// Enclave CID is dynamically discovered:
// nitro-cli describe-enclaves → JSON[0].EnclaveCID
```

### Vsock Connection Lifecycle

```
┌─────────────────────────────────────────────────────────────────────────────┐
│                      VSOCK CONNECTION LIFECYCLE                              │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  PARENT INSTANCE                              NITRO ENCLAVE                 │
│  (parent-client.js)                           (vsock-server.ts)             │
│                                                                             │
│  ┌─────────────────────┐                      ┌─────────────────────┐       │
│  │ 1. Create Socket    │                      │ Listening on        │       │
│  │    VsockSocket()    │                      │ Port 5000           │       │
│  └──────────┬──────────┘                      └──────────┬──────────┘       │
│             │                                            │                  │
│             │  2. Connect to Enclave CID:PORT            │                  │
│             │     client.connect(cid, 5000)              │                  │
│             ├────────────────────────────────────────────▶                  │
│             │                                            │                  │
│             │                      3. Accept Connection  │                  │
│             │                         onConnection()     │                  │
│             ◀────────────────────────────────────────────┤                  │
│             │                                            │                  │
│  ┌──────────┴──────────┐                      ┌──────────┴──────────┐       │
│  │ 4. Send Request     │                      │ 5. Receive Data     │       │
│  │    writeTextSync()  │──────JSON Request───▶│    onData()         │       │
│  │    {type, data}     │                      │    Buffer accumulate│       │
│  └──────────┬──────────┘                      └──────────┬──────────┘       │
│             │                                            │                  │
│             │                                 ┌──────────┴──────────┐       │
│             │                                 │ 6. Parse & Process  │       │
│             │                                 │    JSON.parse()     │       │
│             │                                 │    processRequest() │       │
│             │                                 │    Route to handler │       │
│             │                                 └──────────┬──────────┘       │
│             │                                            │                  │
│  ┌──────────┴──────────┐                      ┌──────────┴──────────┐       │
│  │ 8. Receive Response │                      │ 7. Send Response    │       │
│  │    onData()         │◀─────JSON Response───│    writeTextSync()  │       │
│  │    Parse JSON       │     + newline        │    {success, data}  │       │
│  └──────────┬──────────┘                      └──────────┬──────────┘       │
│             │                                            │                  │
│  ┌──────────┴──────────┐                      ┌──────────┴──────────┐       │
│  │ 9. Close Connection │                      │ 10. Close Socket    │       │
│  │    client.end()     │                      │     setTimeout 10ms │       │
│  └─────────────────────┘                      └─────────────────────┘       │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```

### Vsock Request/Response Protocol

Vsock (Virtual Socket) is the **only** communication channel between the parent EC2 instance and the Nitro Enclave. Each request opens a new connection, sends JSON, waits for a newline-terminated JSON response, then closes.

```typescript
// src/types/vsock.types.ts

interface VsockRequest {
  type: RequestType;      // Handler identifier (e.g., 'dkgInit', 'partialSign')
  data?: any;             // Request-specific payload
}

interface VsockResponse {
  success: boolean;       // Operation success status
  data?: any;             // Response payload
  error?: string;         // Error message if failed
  timestamp: string;      // ISO timestamp
}
```

### Parent → Enclave Communication Code

```javascript
// parent-client.js - sendToEnclave()

async function sendToEnclave(request) {
  return new Promise((resolve, reject) => {
    const cid = getEnclaveCID();  // Dynamic CID discovery
    const client = new VsockSocket();
    let responseData = '';

    const timeout = setTimeout(() => {
      client.end();
      reject(new Error('Request timeout'));
    }, 30000);  // 30 second timeout

    client.on('data', (buf) => {
      responseData += buf.toString();
      if (responseData.includes('\n')) {
        const response = JSON.parse(responseData.trim());
        clearTimeout(timeout);
        client.end();
        resolve(response);
      }
    });

    client.connect(cid, VSOCK_PORT, () => {
      client.writeTextSync(JSON.stringify(request));
    });
  });
}
```

### Enclave Vsock Server Code

```typescript
// src/vsock-server.ts

class EnclaveVsockServer {
  constructor(port: number = 5000) {
    this.server = new VsockServer();

    this.server.on('connection', (socket: VsockSocket) => {
      let dataBuffer = '';

      socket.on('data', async (data: Buffer) => {
        dataBuffer += data.toString();

        // Prevent buffer overflow
        if (dataBuffer.length > 10240) {
          dataBuffer = '';
          return;
        }

        try {
          const request = JSON.parse(dataBuffer);
          const response = await this.processRequest(request);
          socket.writeTextSync(JSON.stringify(response) + '\n');

          setTimeout(() => socket.close(), 10);
        } catch (e) {
          // Not valid JSON yet, wait for more data
        }
      });
    });

    this.server.listen(port);
  }
}
```

## 5. Security Architecture

### 3-Party Threshold Setup

```
┌─────────────────────────────────────────────────────────────────────────────┐
│                        3-PARTY SHARE DISTRIBUTION                            │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   SHARE 1 (Client)          SHARE 2 (Active)         SHARE 3 (Backup)       │
│   ═══════════════           ════════════════          ════════════════       │
│                                                                             │
│   ┌─────────────┐          ┌─────────────────┐       ┌─────────────────┐    │
│   │   Browser   │          │  Nitro Enclave  │       │  Nitro Enclave  │    │
│   │  (Local)    │          │  (Encrypted in  │       │  (Encrypted in  │    │
│   │             │          │   S3 + KMS)     │       │   S3 + KMS)     │    │
│   └─────────────┘          └─────────────────┘       └─────────────────┘    │
│                                                                             │
│   • Stored in browser       • Stored encrypted in     • Stored encrypted    │
│     localStorage             AWS S3                    in AWS S3            │
│   • Never leaves device     • Decrypted only in       • For recovery only   │
│   • Required for signing     enclave                  • 2-of-3 threshold    │
│                             • Required for signing                          │
│                                                                             │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   SIGNING REQUIRES: Share 1 (Client) + Share 2 (Enclave)                    │
│   RECOVERY USES:    Share 1 (Client) + Share 3 (Enclave) OR                 │
│                     Share 2 (Enclave) + Share 3 (Enclave)                   │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```

### Encryption Layers

```
┌─────────────────────────────────────────────────────────────────────────────┐
│                          ENCRYPTION LAYERS                                   │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   Layer 1: ECDH Key Exchange (Browser ↔ Enclave)                            │
│   ═════════════════════════════════════════════                             │
│   • Curve: prime256v1 (P-256)                                               │
│   • Purpose: Encrypt sensitive share contributions during DKG               │
│   • Protection: Man-in-the-middle during DKG handshake                      │
│                                                                             │
│   Layer 2: AES-256-GCM (Share Storage)                                      │
│   ════════════════════════════════════                                      │
│   • Algorithm: AES-256-GCM (authenticated encryption)                       │
│   • Key Source: AWS KMS GenerateDataKey                                     │
│   • Purpose: Encrypt shares before S3 storage                               │
│   • Protection: Shares at rest in S3                                        │
│                                                                             │
│   Layer 3: AWS KMS (Key Management)                                         │
│   ════════════════════════════════                                          │
│   • Purpose: Generate and manage data encryption keys                       │
│   • Key ID: 33b03d30-4e5d-4460-a971-91c975b7b82f                            │
│   • Protection: Data keys never stored in plaintext                         │
│                                                                             │
│   Layer 4: Nitro Enclave (Hardware Isolation)                               │
│   ═══════════════════════════════════════════                               │
│   • Purpose: Isolated execution environment                                 │
│   • Protection: Memory isolation, no persistent storage, attestation        │
│   • Communication: vsock only (no network access)                           │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```

### Data Flow Security

```
┌─────────────────────────────────────────────────────────────────────────────┐
│                     WHAT EACH PARTY CAN ACCESS                               │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   BROWSER (Client)                                                          │
│   ├── ✅ Share 1 (plaintext)                                                │
│   ├── ✅ Public key                                                         │
│   ├── ✅ Ethereum address                                                   │
│   ├── ✅ Session ID                                                         │
│   └── ❌ Share 2, Share 3                                                   │
│                                                                             │
│   PARENT INSTANCE (Relay)                                                   │
│   ├── ✅ Encrypted shares (ciphertext only)                                 │
│   ├── ✅ Encrypted KMS data keys                                            │
│   ├── ✅ Public key, Ethereum address                                       │
│   ├── ✅ Session metadata                                                   │
│   └── ❌ Plaintext shares, plaintext data keys                              │
│                                                                             │
│   NITRO ENCLAVE                                                             │
│   ├── ✅ All shares (temporarily, in memory)                                │
│   ├── ✅ Plaintext data keys (temporarily)                                  │
│   ├── ✅ All cryptographic operations                                       │
│   └── ❌ Network access, persistent storage                                 │
│                                                                             │
│   AWS S3                                                                    │
│   ├── ✅ Encrypted Share 2                                                  │
│   ├── ✅ Encrypted Share 3                                                  │
│   ├── ✅ Encrypted KMS data key                                             │
│   └── ❌ Any plaintext cryptographic material                               │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```


# 3-Party MPC Wallet

Tresori is a professional-grade Multi-Party Computation (MPC) wallet service designed to protect your digital assets with institutional-level security. Unlike conventional crypto wallets — where a single private key control all your funds — Tresori splits control across three independent parties, ensuring that no single point of failure can ever compromise your wallet.

Secure threshold ECDSA for Ethereum. The private key is split into 3 shares across Client, Server (relay), and Nitro Enclave. Any 2 shares can sign, but the full key is **never reconstructed**.

<a class="button primary">Client: Share 1</a><a class="button primary">Server: Relay Only</a><a class="button primary">Enclave: Share 2 + 3</a><a class="button primary">2-of-3 Threshold</a>

***

<table data-header-hidden data-full-width="false"><thead><tr><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><p>The Core Promise</p><p>Your private key is NEVER fully assembled in any one place — not on your device, not on our server, not anywhere. Tresori signs transactions using partial contributions from separate parties, and the complete private key simply does not exist in reconstructed form at any point.</p></td></tr></tbody></table>

***

### 🛡️Zero Knowledge Key Derivation + Server Relay Architecture

The combined private key is **never computed**. Client communicates with Server only - Server relays to Enclave. Client ↔ Enclave data is **end-to-end encrypted**.

### 🔌Service Connections

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>🌐<strong>Client</strong></td><td><ul><li>Active signing party</li><li>Generates partial sig s₁</li><li>Combines final signature</li><li>User interface</li></ul></td></tr><tr><td><strong>Server (Relay)</strong></td><td><ul><li>Relay/Proxy only</li><li>Forwards to Enclave</li><li>Contributes to DKG</li><li>Cannot compute shares</li></ul></td></tr><tr><td><strong>Nitro Enclave</strong></td><td><ul><li>Holds Share 2 (active)</li><li>Holds Share 3 (backup)</li><li>Attestation verified</li><li>All crypto processing</li></ul></td></tr></tbody></table>

### Distributed Key Generation&#x20;

Generate a new MPC wallet. Each party generates its own secret and shares polynomial evaluations. The combined public key is derived via EC point addition - **the private key is never assembled**.

When you create a new Tresori wallet, the system uses a cryptographic process called Distributed Key Generation (DKG). Each of the three parties independently generates its portion of the key. The combined Ethereum address is derived without any party ever seeing the complete private key.

<table data-header-hidden data-full-width="false"><thead><tr><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><p>•        Your key share (Share 1) is generated in your browser and stored only on your device.</p><p>•        The Enclave independently generates and holds Share 2 (active) and Share 3 (backup).</p><p>•        No party ever transmits a complete key to another.</p><p>•        Your Ethereum address is computed from the combined public key — the same address you will use for all transactions.</p></td></tr></tbody></table>

```mermaid
sequenceDiagram
    participant Client as Client (Browser - Share d1)
    participant Enclave2 as Enclave (Share d2 - Active)
    participant Enclave3 as Enclave (Share d3 - Backup)

    Note over Client,Enclave3: Distributed Key Generation (3-Party MPC)

    Client->>Client: Generate Secret (Polynomial f1)
    Enclave2->>Enclave2: Generate Secret (Polynomial f2)
    Enclave3->>Enclave3: Generate Secret (Polynomial f3)

    Client->>Enclave2: Send Share Evaluations
    Client->>Enclave3: Send Share Evaluations

    Enclave2->>Client: Send Share Evaluations
    Enclave2->>Enclave3: Send Share Evaluations

    Enclave3->>Client: Send Share Evaluations
    Enclave3->>Enclave2: Send Share Evaluations

    Note over Client: Compute Share d1
    Note over Enclave2: Compute Share d2
    Note over Enclave3: Compute Share d3

    Note over Client,Enclave3: Public Key = EC Point Addition of all contributions

    Client->>Client: Derive Ethereum Address
    Enclave2->>Client: Return Session ID
```

### Recover Client Share (Secret Resharing)

Lost your client share? Recover it using the enclave's Share 2 & Share 3 stored in S3. The enclave uses **proactive secret sharing** to generate a fresh set of shares for the same private key; old shares are invalidated and replaced.

#### How Recovery Works

```mermaid
sequenceDiagram
    participant S3
    participant KMS
    participant Enclave

    S3->>KMS: Fetch Encrypted Shares
    KMS->>Enclave: Decrypt Data Key

    Note over Enclave: Decrypt Shares (2,3)
    Note over Enclave: Recover Share 1 (Lagrange Interpolation)
    Note over Enclave: Reconstruct Private Key
    Note over Enclave: Apply Resharing Polynomial

    Enclave-->>S3: Store New Encrypted Shares
    S3->>S3: Delete Old Shares
```

### ✍️ Sign Message (Client + Enclave Share 2)

Create a valid Ethereum signature using Share 1 (Client) and Share 2 (Enclave via Server relay). Partial signatures are combined using Lagrange interpolation; **the private key is never reconstructed**.

<figure><img src="/files/OpA0ZYZwAeL8OmXRrnpp" alt=""><figcaption></figcaption></figure>

```mermaid
sequenceDiagram
    participant Client
    participant Enclave

    Note over Client,Enclave: MPC Signing (Private Key Never Reconstructed)

    Client->>Client: Input Message
    Client->>Client: Hash Message (keccak256)
    Client->>Client: Generate Nonce (k)

    Client->>Client: Create Partial Signature s1
    Client->>Enclave: Send Signing Request (hash, nonce data)

    Enclave->>Enclave: Generate Partial Signature s2

    Enclave-->>Client: Return Partial Signature s2

    Client->>Client: Combine s1 + s2 (Lagrange Interpolation)

    Client->>Client: Generate Final Signature (r, s, v)

    Client->>Client: Verify Signature
```

### Security Properties

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td> <strong>No Key Reconstruction</strong></td><td>The combined private key d = s<sub>c</sub> + s<sub>s</sub> + s<sub>e</sub> is <strong>never computed</strong>. Only partial signatures are combined using Lagrange interpolation.</td><td><a href="https://images.unsplash.com/photo-1593062037896-764e9f52029e?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHwzfHxnZWFyfGVufDB8fHx8MTc3NDc5MTc0NHww&#x26;ixlib=rb-4.1.0&#x26;q=85">https://images.unsplash.com/photo-1593062037896-764e9f52029e?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHwzfHxnZWFyfGVufDB8fHx8MTc3NDc5MTc0NHww&#x26;ixlib=rb-4.1.0&#x26;q=85</a></td></tr><tr><td> <strong>Server is Relay Only</strong></td><td>Server holds NO shares - it only relays encrypted data between Client and Enclave. Server cannot read f_c(3) or compute any shares.</td><td><a href="https://images.unsplash.com/photo-1560732488-6b0df240254a?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHw2fHxzZXJ2ZXJ8ZW58MHx8fHwxNzc0NzkxODAyfDA&#x26;ixlib=rb-4.1.0&#x26;q=85">https://images.unsplash.com/photo-1560732488-6b0df240254a?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHw2fHxzZXJ2ZXJ8ZW58MHx8fHwxNzc0NzkxODAyfDA&#x26;ixlib=rb-4.1.0&#x26;q=85</a></td></tr><tr><td><strong>Enclave Holds Both Shares</strong></td><td>Share 2 (active signing) and Share 3 (backup) are both securely stored in the Nitro Enclave. Attestation verifies enclave integrity.</td><td><a href="https://images.unsplash.com/photo-1521159936751-ff7c25fd187b?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHwxfHxzZWNlcmV0fGVufDB8fHx8MTc3NDc5MTg2M3ww&#x26;ixlib=rb-4.1.0&#x26;q=85">https://images.unsplash.com/photo-1521159936751-ff7c25fd187b?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHwxfHxzZWNlcmV0fGVufDB8fHx8MTc3NDc5MTg2M3ww&#x26;ixlib=rb-4.1.0&#x26;q=85</a></td></tr><tr><td><strong>End-to-End Encryption</strong></td><td>Client ↔ Enclave communication uses ECDH key exchange + AES-256-GCM. Server relays encrypted data but CANNOT read it.</td><td><a href="https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHwyfHxlbmNyeXB0aW9ufGVufDB8fHx8MTc3NDc5MTkyMXww&#x26;ixlib=rb-4.1.0&#x26;q=85">https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHwyfHxlbmNyeXB0aW9ufGVufDB8fHx8MTc3NDc5MTkyMXww&#x26;ixlib=rb-4.1.0&#x26;q=85</a></td></tr><tr><td><strong>Demo Nonce</strong></td><td>This demo uses a shared nonce for simplicity. Production systems should use distributed nonce generation via MPC.</td><td><a href="https://images.unsplash.com/photo-1667984436031-ea1d9ff307ec?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHw2fHxjcnlwdG9ncmFwaHl8ZW58MHx8fHwxNzc0NzkyMTE1fDA&#x26;ixlib=rb-4.1.0&#x26;q=85">https://images.unsplash.com/photo-1667984436031-ea1d9ff307ec?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHw2fHxjcnlwdG9ncmFwaHl8ZW58MHx8fHwxNzc0NzkyMTE1fDA&#x26;ixlib=rb-4.1.0&#x26;q=85</a></td></tr><tr><td> <strong>Simulated Enclave</strong></td><td>The Nitro Enclave is simulated for demo purposes. Production should use real AWS Nitro Enclaves with attestation.</td><td><a href="https://images.unsplash.com/photo-1741958193874-6ef299f6b053?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHw1fHxEYXRhYmFzZXxlbnwwfHx8fDE3NzQ3OTIyMTR8MA&#x26;ixlib=rb-4.1.0&#x26;q=85">https://images.unsplash.com/photo-1741958193874-6ef299f6b053?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHw1fHxEYXRhYmFzZXxlbnwwfHx8fDE3NzQ3OTIyMTR8MA&#x26;ixlib=rb-4.1.0&#x26;q=85</a></td></tr></tbody></table>


# Tresori Smart Wallet

In Tresori, a Smart Wallet is a programmable, policy-driven digital wallet that combines smart contracts, MPC-based key custody, and enterprise-grade controls to securely manage crypto assets without exposing or relying on a single private key.

Unlike traditional wallets (EOA wallets) that are controlled by **one private key**, a Tresori Smart Wallet is:

* **Code-controlled**
* **Policy-enforced**
* **Threshold-secured**
* **Enterprise-ready**

Think of it as a **self-governing wallet** that follows rules, approvals, and risk controls automatically.

### How a Tresori Smart Wallet is Architected

#### Tresori Control Plane

The Policy & Automation Engine is the governance layer of Tresori that controls who can do what, under which conditions, and with what level of risk. It sits above the Smart Wallet and ensures that every transaction follows predefined organizational, security, and compliance rules before any signing or blockchain interaction occurs.

* **Transaction rules:** Spending limits, allowed assets, approved destinations, and network restrictions
* **Approval flows:** Multi-level, conditional, and threshold-based approvals
* **Role-based permissions:** Fine-grained access control without shared keys
* **Compliance checks:** Pre-transaction validation against regulatory and internal policies
* **Risk scoring:** Contextual risk assessment with automatic escalation or blocking

#### **How it Works**

* **Evaluated before signing:** All policies are checked before the MPC signing starts
* **Enforced before broadcast:** Transactions are revalidated before being sent on-chain
* **Logged for auditability:** Every action and decision is immutably recorded

This engine transforms Tresori wallets into **enterprise-grade control systems**, enabling secure, automated, and compliant digital asset operations without exposing private keys or relying on manual oversight.

#### Smart Wallet vs Traditional Wallet

| Feature                 | Traditional Wallet | Tresori Smart Wallet |
| ----------------------- | ------------------ | -------------------- |
| **Private Key**         | Single key         | MPC key shares       |
| **Programmability**     | No                 | Yes                  |
| **Multi-Approval**      | Manual             | Native               |
| **Policy Enforcement**  | None               | On-chain + off-chain |
| **Enterprise Controls** | Weak               | Strong               |
| **Recovery Options**    | Limited            | Advanced             |
| **Gas Abstraction**     | No                 | Yes                  |


# Quickstart Guide

Tresori is a project-based wallet and key management platform.

**Welcome to Tresori!** This guide will help you get set up with the Tresori account and project. If you have any questions, don’t hesitate to reach out to us.

### Prerequisites

Before a user can start using Tresori, the following prerequisites must be completed in sequence.


# User Onboarding

## Option-1: If user Don't have Account on Kalp Studio Ecosystem

**Step-1:** Click on <https://www.kalp.studio/>

When users access the URL, they are automatically redirected to the Kalp Studio ecosystem landing page, as shown in the image below.

<figure><img src="/files/TeaDDiau6WrpVL4AR5VA" alt=""><figcaption></figcaption></figure>

**Step-2:** Click on the **“Launch App”** button located in the top-right corner of the landing page.\
Once the user clicks this button, they are redirected to the Login / Sign-Up page, where they can authenticate or create a new account.

<figure><img src="/files/awAPFc8YjhQjeAXmJHBk" alt=""><figcaption></figcaption></figure>

**Step-3:** Once the user clicks the button, they are redirected to the Login / Sign-Up page, where they must enter the registered email address and password provided during the sign-up process.&#x20;

<figure><img src="/files/MQgzFlU7d2ikrxnc1ftY" alt=""><figcaption></figcaption></figure>

**Step-4:** If the user does not have an account, click on **“Register Now”** to create a new login ID.

<figure><img src="/files/xlFl72ZT6dnyCmXaUq1S" alt=""><figcaption></figcaption></figure>

The **Create Kalp Studio Account** page allows new users to register and gain access to the Kalp Studio ecosystem. Users must complete all mandatory fields to successfully create an account.

**Step-5:** Once the user clicks on **“Register Now”**, they are redirected to the Kalp Studio platform registration page, where they are required to provide basic details to create an account.

<figure><img src="/files/rXU3A5dYYSQJV1MuiKB5" alt=""><figcaption></figcaption></figure>

> The “Register” button remains disabled until the user completes all mandatory steps required for account registration as shown in the image below.

<figure><img src="/files/memzRnZxdBsdMSmaHxLp" alt=""><figcaption></figcaption></figure>

#### Registration Fields

* **Name**\
  Users must enter their full name as it will be associated with their Kalp Studio account.
* **Email Address**\
  Users are required to provide a valid email address.

  * After entering the email, users must click **“Verify Email”**.

  A verification step is mandatory before proceeding further. Until the email is verified, account registration cannot be completed.

<figure><img src="/files/m6CtJ58CMWDSLTnjWxfG" alt=""><figcaption></figcaption></figure>

**Step-6:** Upon clicking **“Verify Email”**, the system sends a one-time password (OTP) to the registered email address for verification. After successful OTP verification, the **“Create Password”** field is enabled, allowing the user to set a password for the account. It will also shows that user's mail id is verified.

<figure><img src="/files/r83mRxAirxXkz80UmA8k" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fOHxEYIqZ4OvZ7pDFlIQ" alt=""><figcaption></figcaption></figure>

* **Create Password**\
  Users must create a secure password for their account.
  * The password field includes a visibility toggle to view or hide the entered password.
* **Referral Code (Optional)**\
  Users may enter a referral code if they have one.
  * This field is optional and can be left blank.

#### Terms & Privacy Acceptance

* By clicking **“Register”**, users confirm that they agree to Kalp Studio’s **Terms & Conditions** and **Privacy Policy**.
* Links to both documents are provided for review before account creation.

<figure><img src="/files/M48k7XxLDOhKmMoIHLiY" alt=""><figcaption></figcaption></figure>

#### Register Button Behavior

* The **“Register”** button remains **disabled** until:
  * All mandatory fields are completed
  * The email address is successfully verified
* Once all requirements are met, the button becomes active, allowing the user to complete registration.

<figure><img src="/files/U5FLx9W5XFV3bk4m8FK1" alt=""><figcaption></figcaption></figure>

**Step-7: Final step**

After clicking the “Register” button, the user completes the registration process and is redirected to a confirmation page. saying "Email Verified" and ask user to navigate to Kalp studio Console.

<figure><img src="/files/NfhVNxrQK0RivOBvtChG" alt=""><figcaption></figcaption></figure>

When the user clicks the “Welcome” button, they are redirected to the Kalp Studio Console Dashboard, where they can explore all available applications and services.

<figure><img src="/files/mvfflL25lZs1nfOvMYnA" alt=""><figcaption></figcaption></figure>

## Option-2: If user have Account on Kalp Studio Ecosystem

#### **case-1: If User is logged out**

**Step-1:** Click on <https://portal.kalp.studio/dashboard>

Once the user accesses the URL, they will land on the login page.

<figure><img src="/files/V9mEj1eFdKI4qcuILRyM" alt=""><figcaption></figcaption></figure>

**Step-2:** After entering valid and correct credentials, users are redirected to the KalpStudio Console Dashboard, which serves as the central workspace for managing projects, connecting wallets, and exploring available products and services.

<figure><img src="/files/UIgLHRL2bhqVxGkpWPKJ" alt=""><figcaption></figcaption></figure>

#### **case-2: If User is logged in**

Users will be directly land on the dashboard page.

<figure><img src="/files/UIgLHRL2bhqVxGkpWPKJ" alt=""><figcaption></figcaption></figure>


# Accessing Tresori

There are two ways for users to access the Tresori Wallet-as-a-Service (WaaS).

**Option-1: From the Kalp Studio Dashboard**&#x20;

As users scroll down the dashboard, they can explore the range of products and services available on Kalp Studio. To proceed, users should select *Tresori*, which is displayed at the top of the page.

<figure><img src="/files/qF0rfSn0z79i3poBRvZZ" alt=""><figcaption></figcaption></figure>

**Step-1:** Click on the ***Explore*** button to access and leverage the full capabilities of Tresori.

<figure><img src="/files/r28Zk9gswhXdGGPZcDz3" alt=""><figcaption></figcaption></figure>

**Step-2:** Once the user clicks on the ***Explore*** button, it will redirect them to the Tresori's dashboard, as shown below in the image.

<figure><img src="/files/YxXlyN6uvJArMzDO6fGm" alt=""><figcaption></figcaption></figure>

**Option-2: Direct Url access**

Alternatively, users can directly access Tresori by visiting <https://tresori.kalp.studio/> in their browser.

<figure><img src="/files/YmchClQDqKLYkIph4fne" alt=""><figcaption></figcaption></figure>


# Dashboard

When a user logs in to **Tresori**, they land on the **Dashboard**, which is designed to give them an immediate understanding of their Tresori account status and a clear path to begin working.

The **Dashboard** provides a high-level snapshot of your wallet infrastructure and ongoing activity. It is the first screen users see after logging into Tresori.

The **Dashboard is divided into four main sections**, each serving a distinct purpose in the user interaction:

1. **Quick Actions**
2. **Overview Metrics**
3. **Recent Projects**
4. **Recent Activity**

Among these, **Quick Actions** is the **starting point** for most users.

#### **Quick Actions Section** <a href="#id-2.1-quick-actions-section" id="id-2.1-quick-actions-section"></a>

This section provides shortcuts for frequently used actions:

* **Create Project**\
  Start a new wallet integration project within Tresori.
* **Generate API Key**\
  Create API keys required for authenticating and integrating Tresori services.
* **Embedded Wallet**\
  Configure embedded wallets, including social login and external wallet options.
* **View Docs**\
  Access comprehensive API documentation and integration guides.

<figure><img src="/files/8zrEkD8EiFx8UHvKtiRR" alt=""><figcaption></figcaption></figure>

### Overview Metrics

The Overview section gives a snapshot of platform usage:

* **Total Projects** – Displays the number of projects created.
* **Active Wallets** – Shows the count of currently active wallets.
* **Total Transactions** – Indicates the total number of transactions processed.

These metrics help users quickly assess the current state of their wallet ecosystem.

<figure><img src="/files/QdVzffCONNwkATVNfPnz" alt=""><figcaption></figcaption></figure>

### Recent Projects

This section lists recently created projects with key details such as:

* Project Name
* Number of Wallets
* Transaction Count
* Project Status (Active/Inactive)
* Creation Date

Users can click **View All** to see the complete list of projects.

<figure><img src="/files/oWs4pKdxh3ZgTvUB45Tl" alt=""><figcaption></figcaption></figure>

### Recent Activity

The **Recent Activity** panel displays a timeline of important events, such as:

* Project creation
* Configuration updates
* System-level actions

This helps users track changes and stay informed about recent operations.

<figure><img src="/files/MusnU1hAeYLNSigqa8UD" alt=""><figcaption></figcaption></figure>

### Left Navigation Panel

The left sidebar enables seamless navigation across all Tresori features:

* **Dashboard** – Provides a high-level overview of wallet activity, projects, and usage metrics.
* **Projects** – Create, view, and manage wallet integration projects.
* **Chains & Networks** – Configure supported blockchain networks for your projects.
* **Embedded Wallet** – Set up and manage embedded wallets, including social login and external wallet configurations.
* **Connect Widget** – Configure wallet connection widgets for application integration.
* **Wallets** – View and manage created wallets across projects.
* **Subscriptions** – Manage subscription plans and billing details.
* **Transaction Monitoring** – Track wallet transactions and monitor activity.
* **API Keys** – Generate and manage API keys for secure integrations.
* **Analytics** – View usage metrics and performance insights.
* **Gas Tank** – Manage gas sponsorship and gasless transaction settings.
* **Documentation** – Access developer guides and API references.
* **Activities** – Review recent actions and system events.

<figure><img src="/files/nf3LFVrq4zxP2fBLX6X2" alt=""><figcaption></figcaption></figure>


# Create Project

As a user, the first step to using Tresori is creating a project. A project acts as the foundational unit where all configurations and resources are grouped.

**Step-1:** Clicks on **Create Project Tab** on the main screen or click on **+New project** as shown in the image below.

<figure><img src="/files/LlguK2mYQbcLnBs9FkqS" alt=""><figcaption></figcaption></figure>

**Step-2:** As soon as the user clicks on it, they will be redirected to the Project Creation screen as shown below.

<figure><img src="/files/SAxlC1eP96Qn5n0HlcJd" alt=""><figcaption></figcaption></figure>

**Step-3:** Here, the user needs to provide basic details:

* Project Nam&#x65;**(mandatory)**
* Project Description

<figure><img src="/files/n6dFPsC5YaMlBVDxybFO" alt=""><figcaption></figcaption></figure>

**Step-4: Wallet Configuration**

When creating a new project in Tresori, users are required to choose a **wallet type** that best fits their application’s security, compliance, and user-experience requirements.

User need to select a wallet type that they want to associate and configure with this specific project:

* Self-Custodial
* Custodial
* MPC

<figure><img src="/files/jrkpOo3lsBlu6OPodBVL" alt=""><figcaption></figcaption></figure>

The platform also provides a comparative view of different wallet types, helping users quickly understand which wallet model best suits their project requirements. By default, the wallet type is set to **Self-Custodial**, ensuring full control and ownership for the user. However, users can easily reconfigure this setting and switch to an alternative wallet type based on their operational, security, or compliance needs.

<figure><img src="/files/weKwAfgMRvDZM6t5EWdD" alt=""><figcaption></figcaption></figure>

### Wallet Configuration

#### **Custodial Wallet Configuration**

This helps you decide **who manages private keys** for your application and **which infrastructure provider** will be responsible for secure key storage and transaction signing.

By selecting a custodial wallet:

* Platform (a trusted provider) manages private keys on behalf of users
* End users get a simpler, Web2-like experience
* Security, compliance, and operational responsibility are handled at the infrastructure level

**Available Providers**

1. Kalp Studio (Default / Managed)
2. Fireblocks
3. BitGo
4. HashiCorp Vault
5. Nitro Enclaves
6. Google Cloud HSM

**Coming Soon Providers:** This gives users visibility into Tresori's future enterprise custody roadmap.

1. Coinbase Custody
2. Anchorage Digital
3. Copper
4. Gemini Custody

Once the user selects any platform other than Kalp Studio, the following screen will be displayed.

Here we have selected **"Fireblocks"** and this configuration enables secure wallet creation, transaction signing, and asset management using Fireblocks’ infrastructure. All fields in this modal define how Tresori authenticates and communicates with the Fireblocks APIs.

<figure><img src="/files/d08kK9mDysAJzBChVuag" alt=""><figcaption></figcaption></figure>

**API Key (Required)**

The **API Key** is the primary identifier issued by Fireblocks for your workspace. Tresori uses this key to authenticate every request made to Fireblocks on behalf of your project. This field is mandatory, and without a valid API key, the integration cannot be established.

<figure><img src="/files/7cEqRBFZpuHbeKHK8aUT" alt=""><figcaption></figcaption></figure>

**Base Path (Required)**

The **Base Path** specifies the Fireblocks API endpoint that Tresori should use. This usually depends on your Fireblocks environment (for example, production or sandbox). Providing the correct base path ensures that all wallet operations, transaction requests, and status updates are routed to the correct Fireblocks environment.

<figure><img src="/files/2JZlgaekYKiCixT0fLul" alt=""><figcaption></figcaption></figure>

**API Secret Key (Optional)**

The **API Secret Key** is an optional but recommended field used for enhanced security. When provided, it enables stronger request signing and verification between Tresori and Fireblocks. This adds an extra layer of protection for sensitive operations such as transaction approvals and wallet management.

<figure><img src="/files/fi1wyQjMOfwqoR47yk3A" alt=""><figcaption></figcaption></figure>

Once User provide all the mandatory detials Click **Save Configuration** button securely stores the provided Fireblocks credentials for the selected project. Once saved, Tresori can start using Fireblocks as the custodial provider for wallet creation, transaction execution, and asset custody.

<figure><img src="/files/c8ezZOBJI3a9W3yR5DbY" alt=""><figcaption></figcaption></figure>

#### **MPC Wallet Configuration**

When setting up a new project in Tresori, this screen allows you to configure your project using an MPC (Multi-Party Computation) Wallet. This option is designed for applications that require advanced security, distributed key management, and institutional-grade controls.

MPC (Multi-Party Computation) enables **distributed key management**, where cryptographic key shares are generated, stored, and used independently.

#### Integration Type (Key Storage & Security Providers)

This section provides multiple options to the users to choose **where and how MPC key shares are stored and protected**.&#x20;

1. KS Providers (Kalp Studio – Managed)
2. AWS KMS
3. AWS S3 (Encrypted Storage)
4. HashiCorp Vault
5. Nitro Enclaves
6. Google Cloud HSM

**Coming Soon Providers:** This gives users visibility into Tresori’s future enterprise roadmap and indicates future support.

1. Azure Key Vault
2. Google Cloud KMS

Once the user selects any platform other than Kalp Studio, the following screen will be displayed.

<figure><img src="/files/IISbbuYeWH8gOEt0BiUy" alt=""><figcaption></figcaption></figure>

Here we have selected **AWS KMS**, and this configuration enables secure key management, cryptographic signing, and encryption operations using **Amazon Web Services Key Management Service**. All fields in this modal define how Tresori securely identifies, accesses, and interacts with AWS KMS APIs to perform key-related operations within the selected project.

**ARN Key (Required)**

The **ARN Key** refers to the **Amazon Resource Name (ARN)** of the AWS KMS key that will be used by Tresori. This uniquely identifies the KMS key within your AWS account. Tresori relies on this ARN to locate and securely invoke the correct key for cryptographic operations such as transaction signing or data encryption.

<figure><img src="/files/N4lhTyPNRI2aePYQGG8L" alt=""><figcaption></figcaption></figure>

**Region (Required)**

The **Region** specifies the AWS region where the KMS key is hosted (for example, `us-east-1`, `eu-west-1`, etc.). AWS KMS keys are region-specific, so this value must exactly match the region of the provided ARN.

<figure><img src="/files/vrtFZoCaW6DkyM6Q1K6P" alt=""><figcaption></figcaption></figure>

Once User provide all the mandatory detials Clicking **Save Configuration** securely stores the AWS KMS details for the selected project. Once saved, Tresori can begin using the specified AWS KMS key for secure key management and cryptographic workflows within that project.

<figure><img src="/files/WfgOb4s9VXQr6oPxoxi3" alt=""><figcaption></figcaption></figure>

After finalizing the wallet configuration, users can seamlessly configure transaction costing using a **one-click setup**. This feature automatically determines and applies the appropriate transaction cost parameters, simplifying the onboarding process and reducing configuration complexity.

**Step-5: Enable/ Disable Gasless transactions**

While creating a new project in Tresori, users are given the option to **enable Gasless Transactions**.\
This option allows the project to sponsor blockchain transaction fees on behalf of end users, removing the need for users to hold or manage native gas tokens.

This option is a part of the **project configuration step**, indicating that gas sponsorship is a **project-level capability**, not a per-transaction toggle.

**Note:** Its an optional action while creating the new project

<figure><img src="/files/c781M3nMw79S9gYYWOXI" alt=""><figcaption></figcaption></figure>

Once enabled, **Gas Tank** is automatically associated with the project, and all supported transactions initiated under this project can be gas-sponsored

**Step-6:Project status**

It represents the operational state of a project in Tresori that determines whether a project is allowed to perform actions such as wallet creation, API access, transaction execution, and gas sponsorship.

From a user’s perspective, **Project Status acts as an on/off control** for an entire project environment.

<figure><img src="/files/1VzrtRtKdT0W8PXgMDIC" alt=""><figcaption></figcaption></figure>

**Step-6: Complete project Creation**

The final step is to click on the **“Create Project”** Button for the completion of the project.

<figure><img src="/files/ddIat94OJIDaDrqxHYg9" alt=""><figcaption></figcaption></figure>

### &#x20;Smart Wallet

A Smart Wallet is a programmable, contract-based wallet deployed on the blockchain instead of being controlled by a single private key.\
Unlike traditional EOAs (Externally Owned Accounts), Smart Wallets are governed by smart contract logic, enabling advanced features such as automation, policy enforcement, and gas abstraction.

In Tresori, Smart Wallets are designed for modern Web3 applications that require flexibility, scalability, and enhanced user experience.

<figure><img src="/files/dMm3qRqBUyddAtNy76lp" alt=""><figcaption></figcaption></figure>

#### Supported Network (Current)

> **Ethereum (Sepolia Testnet)**

Smart Wallet support is currently available on **Ethereum Sepolia.** Additional networks are **actively under development** and will be rolled out incrementally.

This allows developers to test advanced wallet logic safely before mainnet deployment


# Project

To begin using Tresori, users must first create a project. A project acts as a centralized workspace where all wallet-related configurations and resources are grouped.

The Projects section enables users to create and manage multiple projects, each corresponding to a specific application or environment. From here, users can configure wallets, manage API keys, customize the embedded wallet experience, and track transaction activity.

Each entry in the **Projects** list provides a summarized view of key project-level information to help users quickly understand the status and usage of their wallet integrations.

* **Project Name**\
  represents the unique name assigned to the project at the time of creation, allowing users to easily identify and differentiate between multiple applications or environments.
* **Wallets**\
  indicates the total number of wallets that have been created or are currently associated with the project, giving visibility into user adoption and wallet usage.
* **Transactions**\
  Displays the cumulative number of transactions executed within the project, helping users track activity and operational scale.
* **Last Modified Date**\
  shows the most recent date on which the project configuration was updated, enabling users to quickly identify recently changed or active projects.
* **Status**\
  It is represented by a toggle that indicates whether the project is enabled or disabled. Only enabled projects are eligible for API key generation, embedded wallet configuration, and active wallet integrations. Disabled projects remain inactive and are hidden from selection dropdowns across the platform.
* **Settings**\
  It provides access to additional project-level actions, such as edit and View project details.

When user click on the ellipsis menu (⋮) it will show the uer level informtion to get the basic information and editable actions.

<figure><img src="/files/wLmqtcG16XNcDtuv4Cc3" alt=""><figcaption></figcaption></figure>

1. **View**

When the user clicks the **View** button, a **Project Details** panel opens, displaying high-level information about the selected project, as shown in the image below.

The Project Details view provides a **centralized snapshot** of the project’s identity, configuration status, and infrastructure setup, enabling users to quickly assess whether the project is ready for integration or deployment.

**Basic Information**

* **Project Name**\
  Displays the user-defined name of the project (e.g., *KKR*), making it easy to identify the application or environment.
* **Project ID**\
  A system-generated unique identifier assigned to the project.\
  This ID is used internally for API references, integrations, and system-level tracking.
* **Description**\
  A short description provided by the user to give additional context about the project (e.g., *TEST KKR*).

**Configuration Details**

* **Wallet Type**\
  Indicates the wallet model used by the project (e.g., **MPC**).
* **Status**\
  Shows whether the project is currently **Active** or inactive.
* **Gasless Transactions**\
  Displays whether gasless transactions are enabled or disabled for the project.
* **Redirect URL**\
  Indicates whether a redirect URL has been configured for authentication or post-login flows.
* **Domain**\
  Shows the configured domain for the project. If not set, it is marked as *Not configured*.

**Provider Information**

* **KS Provider**\
  Displays the key storage provider being used (e.g., Kalp Studio’s managed storage).
* **Storage Mode**\
  Indicates whether Tresori’s managed infrastructure is being used.
* **Provider Status**\
  Shows whether the provider configuration is currently active.

**Timestamps**

* **Created At**\
  Displays the exact date and time when the project was created.

<figure><img src="/files/qE3VvzCIJN0hexp1QbZW" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/c3oogw9ulaK2k4js7vMq" alt=""><figcaption></figcaption></figure>

2. **Edit**

When a user clicks the Settings menu for a project and selects Edit, they are redirected to the Edit Project screen. This screen enables users to modify and update the project’s configuration as application needs or business requirements evolve.

The Edit Project screen provides comprehensive control over the wallet setup, allowing users to update project details, change wallet types, and enable or disable gasless transactions—all without the need to create a new project.

**Basic Information**

This section allows users to update the core project details. These details help maintain clarity when managing multiple projects

* **Project Name**\
  Displays the existing project name.\
  This helps users quickly identify the project they are editing.
* **Description**\
  Allows users to update or refine the project description to better reflect its purpose or environment.

**Wallet Configuration**

This section lets users configure the wallet model and key management approach for the project.

**Wallet Type Selection**

Users can choose between different wallet types based on their use case:

* **Self Custodial**
* **Custodial**
* **MPC (Multi-Party Computation)**

The currently selected wallet type is visually highlighted.

**Gasless Transactions Configuration**

* **Gasless Transactions Toggle**
  * Allows users to enable or disable gasless transactions for the project.
  * When enabled, end users can interact with the application without paying gas fees, improving onboarding and user experience.

<figure><img src="/files/YNRmhJm3rlvkLU3qT2Gp" alt=""><figcaption></figcaption></figure>

It also provides filtering options to help users quickly locate and manage projects based on wallet type and project status. These filters are especially useful when working with multiple projects across different environments.

The **All Types** dropdown allows users to filter projects based on the **wallet type** configured for each project.

**Available Options:**

* **All Types**
  * This is the default view and displays all projects, regardless of the wallet type used.
* **Self Custodial**
  * Shows only projects configured with **self-custodial wallets**.
* **Custodial**
  * Displays projects using **custodial wallets**, where the platform manages keys securely.
* **MPC**
  * Filters projects configured with **MPC (Multi-Party Computation) wallets**.

<figure><img src="/files/EhQ5EDmDAvzzgAEVRdXT" alt=""><figcaption></figcaption></figure>

The **All Status** dropdown allows users to filter projects based on their **current operational state**.

**Available Options:**

* **All Status**
  * This is the default selection and displays all projects, regardless of whether they are active or inactive.
* **Active**
  * Shows only projects that are currently enabled and operational.
* **Inactive**
  * Displays projects that are currently disabled.

<figure><img src="/files/3HLedjx1AllaGcWfOpYC" alt=""><figcaption></figcaption></figure>


# Chain & Networks

The **Chains & Networks** section allows users to configure and manage the blockchain networks that are enabled for a specific project. This section defines where wallets can be created and where transactions can be executed, giving users fine-grained control over supported blockchains.

**Select Project**

Users must first choose a project from the **Select Project** dropdown.

<figure><img src="/files/zmUEQny4YeSpIIxTCtWX" alt=""><figcaption></figcaption></figure>

Once a project is selected, the **Blockchain Networks Configuration** panel becomes active. This panel allows users to enable or disable blockchain networks for the selected project.

<figure><img src="/files/TkLfJMw7kKFXKxXxbaWs" alt=""><figcaption></figcaption></figure>

#### Supported Blockchain Networks

1. **Arbitrum**
2. **Avalanche**
3. **Base**
4. **Blast**
5. **BNB Smart Chain (BSC)**
6. **Celo**
7. **Conflux**
8. **Ethereum (ETH)**
9. **Kalp**
10. **Linea**
11. **Mantle**
12. **opBNB**
13. **Optimism**
14. **Palm**
15. **Polygon**
16. **Scroll**
17. **Sei**
18. **Starknet**
19. **Sonic**
20. **Solana**
21. **TRON**
22. **Unichain**
23. **zkSync**

**Network Environment**

* **Mainnet** – Used for production-grade transactions involving real assets.
* **Testnet** – Used for development, testing, and QA without real value transfer.

Users can switch between Mainnet and Testnet to configure networks independently for each environment.

<figure><img src="/files/sYSn8FDWphCyzUk3bbmX" alt=""><figcaption></figcaption></figure>

Users can select and configure one or more blockchain networks for the chosen project based on their specific requirements.

Each selected network becomes available exclusively within that project, allowing users to tailor network access and behavior according to their use case while maintaining isolation from other projects.

Users have the flexibility to enable blockchain networks based on project needs. Networks can be activated individually using the corresponding toggle controls, or all networks can be enabled simultaneously with a single click using the **“Enable All”** option, simplifying bulk configuration.

<figure><img src="/files/65HJnD1oObFf8KOzWaRP" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fZPMV24Ta2bn9fxgQH4e" alt=""><figcaption></figcaption></figure>


# Embedded Wallet

The **Embedded Wallet** section allows users to configure and customize the embedded wallet user interface for their application and generate the required integration code. This feature enables seamless wallet experiences within applications without requiring users to manage external wallets or private keys directly.

**Step-1: Select Project**

At the top of the screen, users must select a project to proceed with embedded wallet configuration.

<figure><img src="/files/vKnVSGsGspEyVGvhxZGU" alt=""><figcaption></figcaption></figure>

* The **Select Project** dropdown lists all eligible and enabled projects.
* A project must be selected before any embedded wallet settings can be configured.
* If no project is selected, the system displays a prompt instructing the user to choose a project.

> **Note:** Embedded wallet configuration is project-specific. Each project can have its own wallet UI settings and integration setup.&#x20;

Once the user selects that specific project, the wallet-specific related configuration will also be enabled, as shown in the image below.

<figure><img src="/files/00WJlGrJN661xrciBGcQ" alt=""><figcaption></figcaption></figure>

#### Wallet Type Selection

**MPC (Multi-Party Computation)**

When **MPC** is selected:

* The wallet is created using **distributed key shares**
* No single private key ever exists in full
* Signing operations require multiple cryptographic parties
* Keys are protected even if one component is compromised

<figure><img src="/files/FX1Dy7tY1NMnn2ikVsrE" alt=""><figcaption></figcaption></figure>

When the user selects the MPC, they need to provide the Specific details for the wallet configuration as well.

**Step-1:** **Select Blockchain**

This dropdown defines **which blockchain ecosystem** the embedded wallet will operate on.

* **ARBITRUM**
* **AVALANCHE**
* **BASE**
* **BLAST**
* **BSC** (Binance Smart Chain)
* **CELO**
* **CONFLUX**
* **ETH** (Ethereum)
* **KALP**
* **LINEA**
* **MANTLE**
* **OPBNB**
* **OPTIMISM**
* **PALM**
* **POLY** (Polygon)
* **SCROLL**
* **SEI**
* **STARKNET**
* **SWELLCHAIN**
* **TRON**
* **UNICHAIN**
* **ZKSYNC**

> Note: The displayed list of chains dynamically depends on the blockchain networks that the user has enabled for the selected project.&#x20;
>
> For more: Go to [Chain & Networks](/chain-and-networks)

**Step-2:**&#x20;

Once the user selects a blockchain, the associated networks are automatically displayed, allowing the user to proceed with the required configuration settings.

<figure><img src="/files/PaqF6QtxRd7xocNK6Sed" alt=""><figcaption></figcaption></figure>

**Smart Wallet**

When **Smart Wallet** is selected:

* Wallets are deployed as **on-chain smart contracts**
* Transactions are executed via programmable logic
* Supports automation, policies, and gas abstraction
* Enables account-abstraction-style user experiences

The configuration is organized into multiple tabs:

<figure><img src="/files/lJOSNMHnCEeckfjme6NQ" alt=""><figcaption></figcaption></figure>

* **Theme**: Customize colors, typography, and visual styling.
* **Branding**: Configure logos and brand identity elements.
* **Layout**: Control wallet UI structure and positioning.
* **Features**: Enable or disable supported wallet capabilities.

#### Color Theme

The **Theme** section under Embedded Wallet allows users to customize the visual appearance of the embedded wallet UI to match their application’s branding. All changes are reflected instantly in the **Live Preview**, enabling real-time visualization before deployment.

<figure><img src="/files/Ok0R8njtzSwaBY25Mdki" alt=""><figcaption></figcaption></figure>

This section allows users to define the wallet’s look and feel:

* **Primary Color** – Used for main action buttons and highlights.
* **Secondary Color** – Applied to secondary actions and accents.
* **Background Color** – Sets the overall wallet background.
* **Text Color** – Controls readability and contrast.
* **Border Radius (px)** – Adjusts the roundness of UI components.
* **Font Family** – Selects the typography style for the wallet UI.
* **Dark Mode Support** – Toggle to enable or disable dark mode compatibility.

These settings ensure visual consistency with the host application.

### Live Preview

The **Live Preview** panel displays a real-time representation of how the embedded wallet will appear to end users.

<figure><img src="/files/A0xNq4Dhc7zFqAIZ9MRp" alt=""><figcaption></figcaption></figure>

* Reflects all theme changes instantly.
* Displays wallet login options such as:
  * Social login (e.g., Google)
  * Email or phone-based login
  * External wallet connections (e.g., MetaMask, WalletConnect)

This allows users to validate UI changes before saving or deploying them.

#### Branding Configuration

The **Branding** section allows users to customize the embedded wallet interface with their organization’s identity. This ensures the wallet experience feels native to the application and builds user trust through consistent branding.

**Step-1: Provide Logo URL**

<figure><img src="/files/DRmd8R9EcujoRhkMeuoo" alt=""><figcaption></figcaption></figure>

* Allows users to provide a direct URL to their company logo.
* The logo is displayed within the embedded wallet interface.
* Recommended formats include PNG or SVG for optimal clarity.

**Step-2: Set Company Name**

* Displays the organization’s name within the wallet UI.
* Helps reinforce brand identity during user authentication and wallet interactions.

Once the company name is entered, it automatically appears in the live preview panel, allowing users to instantly see how it will look.

<figure><img src="/files/GZT9CEZciKlMjflYg0N1" alt=""><figcaption></figcaption></figure>

**Step-3: Show Logo**

* Toggle to enable or disable the display of the company logo in the wallet UI.

<figure><img src="/files/HQ1bppcypXOWzNi6V1cR" alt=""><figcaption></figcaption></figure>

* When disabled, the wallet is displayed without custom branding imagery.

<figure><img src="/files/eQTqjfHG4ie98h3MsCJZ" alt=""><figcaption></figcaption></figure>

**Step-4: Show “Powered by Kalp Studio”**

* Controls the visibility of the “Powered by Kalp Studio” attribution.

<figure><img src="/files/X6SwzHMSenWIhCCg8VQY" alt=""><figcaption></figcaption></figure>

* Can be enabled or disabled based on branding and compliance requirements.

<figure><img src="/files/Jr4jPxc2FVY9jaAzfGEP" alt=""><figcaption></figcaption></figure>

**Step-5: Enable T\&C & Privacy Policy**

* When enabled, users are required to acknowledge the Terms & Conditions and Privacy Policy.

<figure><img src="/files/tfrgRN69U2UqdQHueU8W" alt=""><figcaption></figcaption></figure>

* This is recommended for regulatory compliance and transparency.

#### Layout & Behavior

The **Layout & Behavior** section allows users to control how the embedded wallet interface is structured and how login options are presented to end users. This helps tailor the wallet experience based on user preferences, security needs, and application design.

**Logo Position**

<figure><img src="/files/9R25ehGthvEumA6N1dIJ" alt=""><figcaption></figcaption></figure>

* It allows users to define where the logo appears within the wallet UI. This gives them two options:
  * **Left-Allign**

<figure><img src="/files/q2WOYMlnPzic9coDK5Mr" alt=""><figcaption></figcaption></figure>

* **Centre-Allign**

<figure><img src="/files/GdGgsyH1nOol1G4xlm0i" alt=""><figcaption></figcaption></figure>

**Show Social Login**

* When it is enabled, social authentication options such as Google will be displayed, reducing onboarding friction and improving user adoption.

<figure><img src="/files/fwuBhha5B3XP9NvKwH41" alt=""><figcaption></figcaption></figure>

* When it is disabled.

<figure><img src="/files/RhEguWzTbeOrKLfKG7pZ" alt=""><figcaption></figcaption></figure>

**Show External Wallet**

The Show External Wallet option allows users to enable or disable support for connecting third-party wallets within the embedded wallet interface. When this option is enabled, end users can authenticate and interact with the application using external wallets such as MetaMask and WalletConnect, in addition to other available login methods.

**Enable**

When it is enabled, it gives the option to connect the wallet with third-party wallet applications, as shown below.

<figure><img src="/files/B6QQFyAdWjSVCdFzt8Ih" alt=""><figcaption></figcaption></figure>

**Disabled**

When it is disabled, it only gives the default configuration of user onboarding as shown below in the image.&#x20;

<figure><img src="/files/piPwSPWqFmhGsSVWsJnA" alt=""><figcaption></figcaption></figure>

#### Features&#x20;

The **Features** tab allows users to configure which **external wallet providers** can be used alongside the embedded wallet, giving end users flexibility in how they connect and authenticate.

<figure><img src="/files/trJmXt0C0nk5qNapMglG" alt=""><figcaption></figcaption></figure>

Let users **select and manage third-party wallet integrations** that will be available to end users during login.\
**Available Wallet Providers:**

* **MetaMask**
  * Enables users to connect using the MetaMask browser extension or mobile wallet.
* **WalletConnect**
  * Allows users to connect a wide range of mobile wallets via QR code or deep linking.

Each wallet provider includes an **on/off toggle**, allowing precise control over which external wallets are supported.

#### **Toggle Behavior**

* **Enabled (ON):**
  * The selected wallet appears as a login option in the embedded wallet UI. Users can authenticate using their existing external wallet.

<figure><img src="/files/tMjYvn9ZC5avxrfTLyZX" alt=""><figcaption></figcaption></figure>

* **Disabled (OFF):**
  * The wallet option is hidden from the login screen.

<figure><img src="/files/bjop6huBjGAxrZ31kYpJ" alt=""><figcaption></figcaption></figure>

All changes are applied **instantly** and reflected in the **Live Preview** panel.

#### Integration Code

The Integration Code section provides ready-to-use code snippets that allow users to embed the Tresori wallet directly into their application. The generated code automatically reflects the selected project, enabled wallet features, and UI configurations.

Tresori supports two integration approaches:

* **HTML / JavaScript** – For plain HTML, vanilla JavaScript, or any web framework.
* **React / TypeScript** – For modern React-based applications.

Users can switch between these options using the tabs provided.

<figure><img src="/files/GjluqsiYXFnIadISJLAw" alt=""><figcaption></figcaption></figure>

#### Save & Reset Actions

The **Save Configuration** action stores all current theme and UI customization settings for the selected project. Once saved, these settings are applied to the embedded wallet and reflected in the generated integration code, ensuring consistency across all environments where the wallet is used.

The **Reset** action restores all theme customizations to their default values. This allows users to discard any unsaved changes and quickly return to the default configuration, making it for correcting unintended modifications.

<figure><img src="/files/9XIckA3i7nM6PXrANKbJ" alt=""><figcaption></figcaption></figure>


# Connect Widget

The Connect Widget allows users to configure and customize the “Connect Wallet” button that appears in their application. This widget acts as the primary entry point for end users to connect their wallet and begin interacting with the application.

Before configuring the widget, users must associate it with a specific project.

* **Select a Project**
  * Choose the project for which the connect wallet button will be used.
  * The widget configuration and behavior will follow the wallet settings defined in the selected project.

> This ensures the connect button is correctly linked to the intended wallet configuration and environment.

<figure><img src="/files/sliMacigkH9QieNfwyQs" alt=""><figcaption></figcaption></figure>

As soon as user select the project it will show the details of all availble API keys associated with that project.

<figure><img src="/files/WqTK0gjvlXrOo8U3OHPf" alt=""><figcaption></figcaption></figure>

#### Configuration

This section allows users to customize the **appearance and behavior** of the connect wallet button.

The configuration is divided into two parts:

* **Widget Config** (button styling)
* **Modal Config** (wallet connection popup behavior)

**Widget Configuration**

<figure><img src="/files/dPLodRaQgaZlERDB9oBY" alt=""><figcaption></figcaption></figure>

Used to customize the visual appearance of the connect button.

* **Background Color**
  * Users acan defines the background color of the button.
  * Users can provide hex color values for precise brand matching.
* **Font Color**
  * Controls the text color displayed on the button.
* **Font Type**
  * Allows users to select the font style used in the button text.
* **Show Wallet Icon**
  * Toggle to display or hide the wallet icon next to the button text.
  * Enhances visual clarity and user recognition.

A **live button preview** is shown at the bottom, allowing users to instantly see how the button will appear after configuration.

<figure><img src="/files/usKZVYCd53P0PDfKqMAJ" alt=""><figcaption></figcaption></figure>

#### Modal Configuration

The Modal Configuration section allows users to customize the wallet connection modal that appears when an end user clicks the Connect Wallet button. This modal defines how users authenticate and which login options are available.

**Modal Content Settings**

These fields control the text displayed at the top of the wallet connection modal.

* **Modal Title**
  * Defines the heading shown on the wallet connection popup.
  * Example: *Connect Your Wallet*
* **Modal Description**
  * Provides a short instruction or message to guide users.
  * Example: *Choose your preferred way to connect*

> These fields help align the wallet connection experience with your application’s tone and branding.

<figure><img src="/files/k2RwHWKyoiVoWcAZ2ODu" alt=""><figcaption></figcaption></figure>

#### Authentication Methods

This section allows users to enable or disable different **wallet authentication options** available to end users.

<figure><img src="/files/l5J8hnDSq7U2UjWx3lgn" alt=""><figcaption></figcaption></figure>

**Social Login**

* Enables social authentication methods for users.
* When enabled, users can sign in using their Google account (Default).

**Social Providers**

* Allows users to toggle individual providers (e.g., Google) on or off.

<figure><img src="/files/e3DZEB1VVAmQ4RwM17wd" alt=""><figcaption></figcaption></figure>

**Email Login**

<figure><img src="/files/EGZP65lcwoC8cqgACG4R" alt=""><figcaption></figcaption></figure>

* Allows users to sign in using their **email address**.
* Suitable for users who prefer traditional authentication methods.

**Phone Login**

<figure><img src="/files/HApZ8pUNAHQu2HvvTdVR" alt=""><figcaption></figcaption></figure>

* Enables authentication using a **phone number**.
* Useful for mobile-first applications and regions where phone-based login is common.

**External Wallets**

<figure><img src="/files/5LqKc4lN1gnpgEWLNVl9" alt=""><figcaption></figcaption></figure>

* Enables connections to **third-party wallets**.
* **Supported Wallets:**
  * MetaMask
  * WalletConnect
* Each wallet can be enabled or disabled independently.

> Only the authentication methods that are enabled here will appear in the wallet connection modal.

#### Code Export

The Code Export section provides ready-to-use integration code for embedding the Connect Wallet button and modal into your application. The generated code automatically reflects all configurations defined in the Widget Config and Modal Config sections.

Users can choose the integration format that best fits their application stack. This section provides step-by-step instructions embedded directly within the code snippet.

**Available Formats:**

* **HTML / JavaScript**
  * Ideal for plain HTML websites or applications using vanilla JavaScript.
* **React / TypeScript**
  * Designed for modern frontend applications built with React and TypeScript.

Switching between these tabs updates the code snippet accordingly.


# Wallet

The **Wallets** section in Tresori is the central place to create, manage, and monitor wallets associated with your blockchain applications. This section provides visibility into all wallets created under a specific project and helps you track wallet activity across different supported blockchain networks.

The **Wallet Management** page is designed to give users full control over project-level wallets. It allows you to manage wallet creation, view wallet details, and analyze wallet-related activity in a structured and project-specific manner. Wallets are always tied to a project, ensuring clear separation between environments, applications, or use cases.

At the top of the page, users must choose a project using the **Select Project** dropdown.\
This step is mandatory because wallets are managed on a per-project basis.

<figure><img src="/files/VIY8Ryyiigz2qZbOi22B" alt=""><figcaption></figcaption></figure>

* Only **enabled projects** appear in the dropdown.

<figure><img src="/files/4XN3IwNiPXWlnbnFRMLK" alt=""><figcaption></figcaption></figure>

* Once a project is selected, the system loads all wallets associated with that project.&#x20;

<figure><img src="/files/EvisdBexmRNZ5SOmsbcc" alt=""><figcaption></figcaption></figure>

#### Project & API Key Selection

This section displays the API keys associated with the wallet for the selected project. Users must first select the relevant project and API key, after which they can use the dropdown to view all active API keys linked to that specific project and wallet.

* **Select Project**
  * Choose the project whose wallets you want to manage.
  * All wallet data shown on the page is scoped to the selected project.

<figure><img src="/files/M2bPJl8CqJtPKh6hHBcm" alt=""><figcaption></figcaption></figure>

* **API Key**
  * Select the API key associated with the project.
  * Ensures that wallet creation and operations are securely linked to the correct environment.

<figure><img src="/files/1JjPLrPyRtjQl5WRuRob" alt=""><figcaption></figcaption></figure>

#### Wallet Summary&#x20;

In the middle of the page, key metrics provide a quick snapshot of wallet activity.

* **Total Wallets**
  * Displays the total number of wallets created for the selected project.
  * Includes an indicator showing how many wallets are currently active.

<figure><img src="/files/SpResGVRitVBKKTHmkaK" alt=""><figcaption></figcaption></figure>

* **Total Transactions**
  * Shows the total number of transactions executed across all wallets in the project.

<figure><img src="/files/6rZu1ge5cNvlOufXiscR" alt=""><figcaption></figcaption></figure>

* **Wallet Types**
  * Provides a breakdown of wallets by type:
    * **Self Custodial**
    * **Custodial**
    * **MPC**
    * **Smart Wallet**
  * Helps users understand how wallets are distributed across different security models.

<figure><img src="/files/4uw49MjDWqgYAJQnMMIT" alt=""><figcaption></figcaption></figure>

#### Search and Filter Options

Users can easily locate wallets using built-in filters.

* **Search Wallets:** Search wallets by identifier or relevant metadata (Public Address).

<figure><img src="/files/0ABZEG1jKvTjQIbiFkB5" alt=""><figcaption></figcaption></figure>

* **Wallet Type Filter:** Filter wallets by type (Self-Custodial, Custodial, or MPC).

<figure><img src="/files/5g8YSD5YI3QCJupEYuDp" alt=""><figcaption></figcaption></figure>

* **Time Filter:** Filter wallets based on their creation timeframe (e.g., all time).
  * Available Time Ranges
    * **All Time**\
      Displays all wallets created since the project was first set up.
    * **Last 7 Days**\
      Shows only wallets created within the past 7 days.
    * **Last 30 Days**\
      Filter wallets created in the last 30 days, useful for monthly growth analysis.
    * **Last 90 Days**\
      Displays wallets created over the past 90 days, helping identify longer-term trends.

<figure><img src="/files/HzWQ4VKbjfjQbWVSxeoQ" alt=""><figcaption></figcaption></figure>

#### Wallet List Section

This section displays all wallets created under the selected project.

* If **no wallets exist**, an empty state is shown with a prompt to get started **“No wallets created yet” +Create Your First Wallet** button
* Once wallets are created, this area will list:
  * Wallet identifiers
  * Wallet type
  * Status and activity details

<figure><img src="/files/tEwFyo8rwozVy1AEVP5F" alt=""><figcaption></figcaption></figure>


# Subscription

The Subscription section provides a complete view of the user’s current Tresori plan, billing status, renewal timeline, and purchase history. This section helps users manage their plan, track subscription activity, and upgrade services as their application scales.

### Current Subscription Details

<figure><img src="/files/jSgEGFYSF09kWBYWkUKt" alt=""><figcaption></figcaption></figure>

At the top of the page, users can view the details of their active subscription.

**Product Name & Status**

This section displays the subscribed product (e.g., **Tresori**) along with its current status. An Active status indicates that the subscription is valid and all associated features are available for use.

**Plan Information**

The Plan field shows the name and pricing model of the current subscription (for example, *Monthly Plan – $0.00* ). This helps users understand the tier they are currently on and the associated cost.

**Subscription Start Date**

This indicates the date on which the current subscription became active. It is useful for tracking plan duration and billing cycles.

**Renewal Date**

The Renewal Date specifies when the subscription will renew or expire. This helps users plan upgrades, downgrades, or cancellations in advance.

**Upgrade Plan**

The Upgrade Plan button allows users to move to a higher-tier plan to unlock additional features, higher limits, or enterprise capabilities as required.

### Purchase History

<figure><img src="/files/AGtSxLA4f68ahdAjcL3e" alt=""><figcaption></figcaption></figure>

The Purchase History section provides a detailed log of all subscription-related transactions.

This section enables users to track billing records, verify payments, and maintain transparency for accounting or audit purposes.

#### Filters & Controls

<figure><img src="/files/AF5LhmQkPv62pHteu7kQ" alt=""><figcaption></figcaption></figure>

Users can filter purchase history using:

* **Status filter** (e.g., Success, Failed, and Pending)

<figure><img src="/files/vSpfJ2I6ezY4rfEcGmWY" alt=""><figcaption></figcaption></figure>

* **Date Range picker** to view transactions within a specific period

<figure><img src="/files/vTIlfeGi6ygElZXUCLXk" alt=""><figcaption></figcaption></figure>

These controls make it easier to locate specific transactions.


# Transaction Monitoring

The Transaction Monitoring section provides a centralized view to track, review, and analyze wallet transactions associated with a specific project. This feature helps users maintain operational visibility, monitor transaction flow, and ensure transparency across supported blockchain networks.

Users must begin by selecting a project from the **Select Project** dropdown. Transaction data is scoped **per project**, ensuring that only transactions generated within the selected project are displayed. Until a project is selected, transaction details remain unavailable.

The **Transaction Monitoring** page provides a consolidated and real-time view of all wallet transactions for a selected project. It enables users to track transaction activity, monitor statuses, and analyze blockchain interactions across enabled networks from a single interface.

<figure><img src="/files/vGnzl0xjnGE2IfifiHtJ" alt=""><figcaption></figcaption></figure>

As soon as a user selects a project, the system automatically displays high-level transaction metrics for that project, providing an immediate overview of blockchain activity, including transaction volume, status, and overall usage.

<figure><img src="/files/kd7iVdrxTWw6D7pmu3R7" alt=""><figcaption></figcaption></figure>

**Total Transactions**\
This shows the total number of transactions initiated within the selected project across all enabled networks.

**Completed Transactions**\
Displays the count of transactions that have been successfully confirmed on the blockchain.

**Failed Transactions**\
Indicates the number of transactions that were unsuccessful due to issues such as insufficient gas, network errors, or rejected signatures.

**Pending Transactions**\
Shows transactions that are still awaiting confirmation on the blockchain network.

#### Recent Transactions Section

<figure><img src="/files/XXguzoqfkzpxSqKO0zYv" alt=""><figcaption></figcaption></figure>

It displays a detailed, transaction level view for the selected project.

**Search & Filters**\
Users can search transactions using the search bar and filter results by transaction status (e.g., completed, failed, pending). This makes it easy to locate specific transactions.

Users can enter a transaction hash to search for and retrieve high-level information related to a specific transaction, including its status, associated network, and key transaction details.

<figure><img src="/files/OwLlOOmMfywoV63xKnFN" alt=""><figcaption></figcaption></figure>

**Transaction Table Columns**

<figure><img src="/files/4oTxkwjfd8U9tffTLRIB" alt=""><figcaption></figcaption></figure>

Each transaction entry includes:

* **Type** – The nature of the transaction.
* **Hash** – The unique transaction hash generated on the blockchain.
* **From** – The sender wallet address.
* **To** – The recipient wallet address or contract.
* **Amount** – The value transferred.
* **Network** – The blockchain network on which the transaction occurred.
* **Status** – Current transaction state.
  * Completed&#x20;
  * Pending
  * Failed
* **Gas Used** – The gas consumed to execute the transaction.
* **Timestamp** – The date and time when the transaction was initiated.

If no transactions are available, a message is displayed indicating that no transactions were found for the selected project.

**Refresh & Pagination**

The **Refresh** button allows users to manually reload transaction data to fetch the latest updates. Pagination controls at the bottom of the table help navigate through large transaction histories efficiently.


# API Keys

The **API Keys** page allows users to generate, manage, and secure API keys required to integrate Tresori Wallet-as-a-Service (WaaS) into their applications. These keys enable secure communication between your application and Tresori services.

**Step-1:** Navigate to the API key section on the dashboard's left side menu.

<figure><img src="/files/75YV3xBhvUaOud62fWs6" alt=""><figcaption></figcaption></figure>

**Step-2:** At the top of the page, users must select a project to manage its API keys. Select the project from the dropdown menu for which they want to generate the API keys.

<figure><img src="/files/8wnuPDTb9YUKTNjnJ9po" alt=""><figcaption></figcaption></figure>

> **Note:** *Only enabled projects are available for API key generation. Disabled projects will not appear in the project selection list.*

<figure><img src="/files/bcsYgMDM2AGAvcudQOaX" alt=""><figcaption></figcaption></figure>

### API Keys Section

<figure><img src="/files/5DZR2mvoUqZ0C8FLCSQE" alt=""><figcaption></figcaption></figure>

This section displays all API keys associated with the selected project.

* If no API keys exist for this spevific Project, a **“No API Keys”** message is displayed.
* Users can generate their first API key by clicking the **Generate API Key** button.

<figure><img src="/files/Pw5OKLOkSy9J2QUFYuEp" alt=""><figcaption></figcaption></figure>

* Once generated, API keys will be listed here with relevant details (such as status and creation date).

**Step-3:** Click on **"Generate API Key"**&#x20;

**Step-4:** Once click the button user will get a modal pop-up, to provide Name of API key.

<figure><img src="/files/Bo4frDVtOeSXvewVzgfY" alt=""><figcaption></figcaption></figure>

Upon providing a valid key name, the *Generate Key* button is activated, allowing the user to proceed.

<figure><img src="/files/s4xDH4xu6GvvulibpIRz" alt=""><figcaption></figcaption></figure>

This screen is displayed once an API key has been successfully generated for the selected project.

As soon as user hit the **"Create Key"** button the system will create a key and redirected to the API key Page.

<figure><img src="/files/KCvXd41NnQE5D8sy6gIb" alt=""><figcaption></figcaption></figure>

#### Key Details Displayed

* **API Key Name** – Shows the name assigned to the API key (e.g., *TEST KKR*).
* **Status** – Indicates whether the API key is **Active** or **Inactive**.

<figure><img src="/files/gtLNOX5htMQ7CCr2tCnx" alt=""><figcaption></figcaption></figure>

The **Masked API Key Value** ensures security by displaying only a partial portion of the API key, preventing full exposure.&#x20;

Users can temporarily reveal the complete key using the **View** icon when required, while the **Copy** icon allows them to securely copy the API key for use in their application without manually exposing it.

<figure><img src="/files/xUDmNIeClBK9nvnJnots" alt=""><figcaption></figcaption></figure>

#### Generate Additional Keys

* Users can create more API keys for the same project by clicking **Generate API Key**.
* Multiple keys can be maintained to support different environments (e.g., development, staging, production).

<figure><img src="/files/cFcRkXxnJSdq4MCw2bfD" alt=""><figcaption></figcaption></figure>


# Analytics

The Analytics section provides users with detailed insights into wallet usage, user engagement, and transaction performance for their projects. It helps teams monitor adoption, measure effectiveness, and make data-driven decisions.

The Analytics dashboard is project-specific. Users must select a project to view its analytics data.

**Select Project**

* Users must choose a project from the **Select Project** dropdown.
* Analytics data is displayed only after a project is selected.

> This ensures metrics are always aligned with the correct project configuration.

Once a project is selected, the **Wallet Analytics** section displays key wallet-related metrics.

#### Key Metrics

<figure><img src="/files/GLT8yNElVEdIH92xPRNf" alt=""><figcaption></figcaption></figure>

**This Analytics is devide into two section "Wallet Analytics" and "Transacion"**

* **Total Wallets**
  * Displays the total number of wallets created under the selected project.
  * Includes a daily change indicator (e.g., “+0 today”).
* **Active Wallets**
  * Shows the number of wallets that are currently active and interacting with the application.
* **New Today**
  * Indicates the number of new wallets created on the current day.
* **Conversion Rate**
  * Represents the percentage of users who successfully completed wallet creation after initiating the connection flow.

#### Wallet Type Distribution

The Wallet Type Distribution section provides a detailed breakdown of wallets created within a selected project based on the wallet architecture in use. This view helps teams understand user preferences, security posture adoption, and infrastructure utilization across different wallet models.

#### Supported Wallet Types:

* **Self Custodial**
* **Custodial**
* **MPC (Multi-Party Computation)**

For each supported wallet type, the dashboard displays:

* **Total number of wallets** created under that wallet type
* **Percentage share** of the total wallets in the project

This data is calculated in real time and updates as new wallets are created or existing ones become active.

> This helps teams assess which wallet model is most commonly used and whether their configuration aligns with user behavior.

### Transaction Analytics

The Transaction Analytics section provides detailed insights into transaction activity within the selected project, enabling users to monitor transaction volume, performance, cost efficiency, and reliability across wallet integrations. Once a project is selected, the dashboard displays real-time and historical transaction metrics, offering a clear view of how transactions are executed and utilized within the project.

#### Key Transaction Metrics

<figure><img src="/files/UyeJnRGjwyAli0cMf3ju" alt=""><figcaption></figcaption></figure>

**Total Transactions**

Displays the total number of transactions initiated within the selected project, along with a daily change indicator (e.g., **+0 today**). Helps track overall transaction activity and adoption trends, making it easier to identify growth patterns or usage drops over time.

**Success Rate**\
Shows the percentage of transactions that were successfully completed out of all initiated transactions. Reflects transaction reliability and network stability. A low success rate may indicate issues such as network congestion, insufficient gas, smart contract failures, or user-initiated rejections.

**Average Gas Fee**\
Represents the average gas fee paid per transaction during the selected timeframe. It helps to evaluate transaction cost efficiency and assess network selection, gas optimization strategies, and the impact of gasless transactions.\
For gasless-enabled projects, this value may appear as zero or near zero for end users.

**Today’s Volume**

Indicates the total transaction volume processed on the current day, typically measured in the native or configured token. Supports real-time operational monitoring by highlighting daily activity spikes or drops, enabling quicker response to usage changes.


# Gas Tank

The **Gas Tank** is a core TreSori feature that enables **gasless transactions** by allowing applications to sponsor blockchain transaction fees on behalf of end users. Instead of requiring users to hold native tokens (ETH, BNB, etc.) for gas, transactions are funded from a centralized gas balance managed through the Gas Tank.

This capability significantly improves user onboarding and experience, especially for Web2-native users who are unfamiliar with blockchain mechanics.

The **Gas Tank** feature is enabled only when the user enables the “Gasless Transactions” configuration option during project creation and completes the gas fee configuration for that project.

For more, go to **Create Project >** **Step-5: Enable/ Disable Gasless transactions.**

### Gas Tank Management (USDT)

The Gas Tank operates using **USDT** as the funding currency, abstracting away network-specific gas tokens.

<figure><img src="/files/KFRYKLIILoela4NBIu6b" alt=""><figcaption></figcaption></figure>

#### Supported Token Standards & Networks

The Gas Tank supports multiple USDT standards on different mainnet blockchains, including:

* **TRC20 (Tron Mainnet)**
* **BSC20 (BNB Smart Chain Mainnet)**
* **ERC20 (Ethereum Mainnet)**

Each network displays:

<figure><img src="/files/zYy6CdPUn0oDsHZG5KyZ" alt=""><figcaption></figcaption></figure>

* Wallet address for deposit
* Current USDT balance
* Approximate USD value
* Primary / non-primary status

Tresori follows a decentralized approach and does not rely on a single resource, enabling users to interact with blockchain networks and applications seamlessly, without dependency-related limitations or interruptions.

Users can set any Gas Tank wallet as the primary wallet responsible for sponsoring gas fees and supporting operational transactions for the project.

Click the **“Set Primary”** button displayed at the top of the selected Gas Tank wallet.

<figure><img src="/files/ICjSk6aKv91Mpudvemzj" alt=""><figcaption></figcaption></figure>

As soon as users click on it the system will set that wallet primary and change the position of the wallet tank as well.

<figure><img src="/files/RyVuXa7A9czaLmkDXLbU" alt=""><figcaption></figcaption></figure>

#### Token Priority Settings

<figure><img src="/files/QA49S0zXGEEv8kporm8O" alt=""><figcaption></figcaption></figure>

The **Token Priority Settings** section allows users to define the **order in which gas balances are consumed**.

**How Priority Works**

* Networks are checked sequentially based on priority order.
* Users can set any supported network as **Primary**.
* Priority ensures optimal reliability and cost control.

A clear informational note explains that priority directly affects how gasless transactions are processed.

<figure><img src="/files/revySbHp8CbwgWlY0px5" alt=""><figcaption></figcaption></figure>

### Depositing Funds

Depositing funds into the **Gas Tank** ensures that gasless transactions continue to function smoothly by maintaining an adequate USDT balance. TreSori provides both a **Quick Deposit** option and a **Deposit Funds** action to make funding simple, transparent, and flexible.

TreSori provides two ways to deposite fund.

1. By clicking on the **"Deposit Funds"** button (top-right), provides a direct action to add gas funds to the system.
2. **Quick Deposit**&#x20;

The **Quick Deposit** panel is designed for fast and convenient funding of the Gas Tank. It displays the wallet address for the selected network where users can deposit **USDT** directly. Once the transfer is completed on-chain, the deposited amount is automatically credited to the Gas Tank balance for that specific network.

<figure><img src="/files/VcudVAlgLYFlobRnuP00" alt=""><figcaption></figcaption></figure>

For transparency and tracking, the Quick Deposit panel also displays **recent deposits**, allowing users to verify successful transfers and maintain visibility into their funding activity.

<figure><img src="/files/mMoDzhNsaoQT7gTNNgHk" alt=""><figcaption></figcaption></figure>

How to perform Quick Deposit

**Step-1:** Click on the "Deposit USDT" button.

<figure><img src="/files/mCuXy2wIVGEosjRRPoP7" alt=""><figcaption></figcaption></figure>

As soon as the user clicks on the tab, a panel is displayed that allows them to perform a quick deposit, as shown in the image below.

<figure><img src="/files/VG5Gpsz1UrzWzbG8UYul" alt=""><figcaption></figcaption></figure>

**Step-2:** User need to select the Token Network for which they want to do a quick deposite

<figure><img src="/files/IZErbhxiKncSD33pTqdE" alt=""><figcaption></figcaption></figure>

Once the network is selected the associated Wallet address will be displayed

<figure><img src="/files/O2CfyU7SKDPxHFtPJzwj" alt=""><figcaption></figcaption></figure>

**Step-3:** Enter the amount

<figure><img src="/files/o8y4ArqN2NfcXAxuV4sZ" alt=""><figcaption></figcaption></figure>

Once an amount is feeded the "Deposit Fund" button will be enabled.

<figure><img src="/files/d0WOMXGYMeWGWyeWkMAu" alt=""><figcaption></figcaption></figure>

**Step-4:** Click on "Deposit Fund" for the final step.

Once the user submits all required information, a QR code for fund deposit is displayed on the screen. The user can then scan the QR code using their mobile wallet application to deposit the required amount.

<figure><img src="/files/Zbzneke9C3tTGXpgo5d9" alt=""><figcaption></figcaption></figure>

#### Analytics


# Activities

The Activities section serves as a centralized audit log for all system-level actions, configuration changes, and operational events within Tresori. It allows users to track what actions occurred, when they occurred, and their execution status. Activities are displayed in a chronological timeline, with each entry representing a specific action performed in the system along with detailed status information.

<figure><img src="/files/D3G3rQNRDDAKf21Uj7n4" alt=""><figcaption></figcaption></figure>

Activities are grouped by **date** (e.g., *Tuesday, January 27, 2026*) and displayed in reverse chronological order, with the most recent actions shown first.

Each activity entry provides the following information:

* **Activity Name**
  * Describes the action performed
  * Example: *Connect widget updated: Default*
* **Status Indicator**
  * Shows whether the action was successful or failed
  * Example: **Success**
* **Description**
  * Provides context about the activity
  * Example: *Connect widget for project “KKR” has been updated*
* **Project Reference**
  * Indicates the project associated with the activity
  * Example: *Project: KKR*
* **Timestamp**
  * Displays the exact time when the activity occurred
* **View Details**
  * Allows users to expand or view more detailed information about the specific action

#### Search Activities

<figure><img src="/files/TfPG2AbgIqCftjiQfCUn" alt=""><figcaption></figcaption></figure>

Users can search activities using the **Search activities** input. It helps them to quickly locate specific events such as:

* Widget updates
* Configuration changes
* Project-level actions


# Editor

GitBook has a powerful block-based editor that allows you to seamlessly create, update, and enhance your content.

<figure><img src="https://gitbookio.github.io/onboarding-template-images/editor-hero.png" alt=""><figcaption></figcaption></figure>

### Writing content

GitBook offers a range of block types for you to add to your content inline — from simple text and tables, to code blocks and more. These elements will make your pages more useful to readers, and offer extra information and context.

Either start typing below, or press `/` to see a list of the blocks you can insert into your page.

### Add a new block

{% stepper %}
{% step %}

#### Open the insert block menu

Press `/` on your keyboard to open the insert block menu.
{% endstep %}

{% step %}

#### Search for the block you need

Try searching for “Stepper”, for exampe, to insert the stepper block.
{% endstep %}

{% step %}

#### Insert and edit your block

Click or press Enter to insert your block. From here, you’ll be able to edit it as needed.
{% endstep %}
{% endstepper %}


# Markdown

GitBook supports many different types of content, and is backed by Markdown — meaning you can copy and paste any existing Markdown files directly into the editor!

<figure><img src="https://gitbookio.github.io/onboarding-template-images/markdown-hero.png" alt=""><figcaption></figcaption></figure>

Feel free to test it out and copy the Markdown below by hovering over the code block in the upper right, and pasting into a new line underneath.

```markdown
# Heading

This is some paragraph text, with a [link](https://docs.gitbook.com) to our docs. 

## Heading 2
- Point 1
- Point 2
- Point 3
```

{% hint style="info" %}
If you have multiple files, GitBook makes it easy to import full repositories too — allowing you to keep your GitBook content in sync.
{% endhint %}


# Images & media

GitBook allows you to add images and media easily to your docs. Simply drag a file into the editor, or use the file manager in the upper right corner to upload multiple images at once.

<figure><img src="https://gitbookio.github.io/onboarding-template-images/images-hero.png" alt=""><figcaption><p>Add alt text and captions to your images</p></figcaption></figure>

{% hint style="info" %}
You can also add images simply by copying and pasting them directly into the editor — and GitBook will automatically add it to your file manager.
{% endhint %}


# Interactive blocks

In addition to the default Markdown you can write, GitBook has a number of out-of-the-box interactive blocks you can use. You can find interactive blocks by pressing `/` from within the editor.

<figure><img src="https://gitbookio.github.io/onboarding-template-images/interactive-hero.png" alt=""><figcaption></figcaption></figure>

### Tabs

{% tabs %}
{% tab title="First tab" %}
Each tab is like a mini page — it can contain multiple other blocks, of any type. So you can add code blocks, images, integration blocks and more to individual tabs in the same tab block.
{% endtab %}

{% tab title="Second tab" %}
Add images, embedded content, code blocks, and more.

```javascript
const handleFetchEvent = async (request, context) => {
    return new Response({message: "Hello World"});
};
```

{% endtab %}
{% endtabs %}

### Expandable sections

<details>

<summary>Click me to expand</summary>

Expandable blocks are helpful in condensing what could otherwise be a lengthy paragraph. They are also great in step-by-step guides and FAQs.

</details>

### Embedded content

{% embed url="<https://www.youtube.com/watch?v=YILlrDYzAm4>" %}

{% hint style="info" %}
GitBook supports thousands of embedded websites out-of-the-box, simply by pasting their links. Feel free to check out which ones[ are supported natively](https://iframely.com).
{% endhint %}


# Integrations

GitBook integrations allow you to connect your GitBook spaces to some of your favorite platforms and services. You can install integrations into your GitBook page from the *Integrations* menu in the top left.

<figure><img src="https://gitbookio.github.io/onboarding-template-images/integrations-hero.png" alt=""><figcaption></figcaption></figure>

### Types of integrations

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Analytics</strong></td><td>Track analytics from your docs</td><td><a href="https://www.gitbook.com/integrations#analytics">https://www.gitbook.com/integrations#analytics</a></td><td></td><td></td></tr><tr><td><strong>Support</strong></td><td>Add support widgets to your docs</td><td><a href="https://www.gitbook.com/integrations#support">https://www.gitbook.com/integrations#support</a></td><td></td><td></td></tr><tr><td><strong>Interactive</strong></td><td>Add extra functionality to your docs</td><td><a href="https://www.gitbook.com/integrations#interactive">https://www.gitbook.com/integrations#interactive</a></td><td></td><td></td></tr><tr><td><strong>Visitor Authentication</strong></td><td>Protect your docs and require sign-in</td><td><a href="https://www.gitbook.com/integrations#visitor-authentication">https://www.gitbook.com/integrations#visitor-authentication</a></td><td></td><td></td></tr></tbody></table>


# Developer Platform

Learn more about documenting APIs in GitBook.

GitBook automatically generates pages and endpoints for your OpenAPI spec. Fully customizable and equipped with testing capabilities, your documentation has never been more powerful.

The API reference below is automatically generated from a demo OpenAPI spec in this space.

<table data-card-size="large" data-view="cards" data-full-width="false"><thead><tr><th align="center"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td align="center"><h4>Install SDK</h4></td><td><a href="/files/fSuUAMzavH5wyGX29zhB">/files/fSuUAMzavH5wyGX29zhB</a></td></tr><tr><td align="center"><h4>Postman Collection</h4></td><td><a href="/files/gpaZMczF53qfwJeoeHW1">/files/gpaZMczF53qfwJeoeHW1</a></td></tr></tbody></table>

{% columns %}
{% column width="50%" %} <a href="https://www.npmjs.com/package/@kalp_studio/tresori-sdk-js" class="button primary">TypeScript</a><a href="https://www.npmjs.com/package/@kalp_studio/tresori-sdk-js" class="button primary">Javascript</a><a href="https://pub.dev/packages/tresori_sdk" class="button primary">Flutter</a>
{% endcolumn %}

{% column width="50%" %}
{% embed url="<https://documenter.getpostman.com/view/51313652/2sBXcBohsN>" %}
{% endcolumn %}
{% endcolumns %}


# Supported Blockchains and Network

<table data-header-hidden><thead><tr><th width="94.60003662109375"></th><th width="240.4000244140625"></th><th width="212.4000244140625"></th><th></th></tr></thead><tbody><tr><td><strong>S. No.</strong></td><td><strong>Blockchain</strong></td><td><strong>Network</strong> </td><td><strong>Chain ID</strong></td></tr><tr><td>1.</td><td>Arbitrum</td><td>mainnet</td><td>42161</td></tr><tr><td></td><td>Arbitrum</td><td>sepolia</td><td>421614</td></tr><tr><td>2.</td><td>Avalanche</td><td>mainnet</td><td>43114</td></tr><tr><td></td><td>Avalanche</td><td>fuji</td><td>43113</td></tr><tr><td>3.</td><td>Base</td><td>mainnnet</td><td>8453</td></tr><tr><td></td><td>Base</td><td>sepolia</td><td>84532</td></tr><tr><td>4.</td><td>Blast</td><td>mainnet</td><td>81457</td></tr><tr><td></td><td>Blast</td><td>sepolia</td><td>168587773</td></tr><tr><td>5.</td><td>BSC</td><td>mainnet</td><td>56</td></tr><tr><td></td><td>BSC</td><td>testnet</td><td>97</td></tr><tr><td>6.</td><td>Conflux</td><td>testnet</td><td>71</td></tr><tr><td>7.</td><td>ETH</td><td>mainnet</td><td>1</td></tr><tr><td></td><td>ETH</td><td>sepolia</td><td>11155111</td></tr><tr><td>8.</td><td>KALP</td><td>mainnet</td><td>19031997</td></tr><tr><td></td><td>KALP</td><td>newtestnet</td><td>19031998</td></tr><tr><td>9.</td><td>Linea</td><td>mainnet</td><td>59144</td></tr><tr><td></td><td>Linea</td><td>sepolia</td><td>59141</td></tr><tr><td>10.</td><td>Mantle</td><td>mainnet</td><td>5000</td></tr><tr><td></td><td>Mantle</td><td>sepolia</td><td>5003</td></tr><tr><td>11.</td><td>Mint</td><td>mainnet</td><td>2357</td></tr><tr><td>12.</td><td>OPBNB</td><td>mainnet</td><td>204</td></tr><tr><td></td><td>OPBNB</td><td>testnet</td><td>5611</td></tr><tr><td>13.</td><td>Optimism</td><td>mainnet</td><td>10</td></tr><tr><td></td><td>Optimism</td><td>sepolia</td><td>11155420</td></tr><tr><td>14.</td><td>Palm</td><td>mainnet</td><td>11297108109</td></tr><tr><td></td><td>Palm</td><td>testnet</td><td>11297108099</td></tr><tr><td>15.</td><td>Polygon</td><td>amoy</td><td>80002</td></tr><tr><td></td><td>Polygon</td><td>mainnet</td><td>137</td></tr><tr><td>16.</td><td>Scroll</td><td>mainnet</td><td>534352</td></tr><tr><td></td><td>Scroll</td><td>sepolia</td><td>534351</td></tr><tr><td>17.</td><td>SEI</td><td>Testnet</td><td>713715</td></tr><tr><td>18.</td><td>Swellchain</td><td>testnet</td><td>1923</td></tr><tr><td>19.</td><td>Tron</td><td>mainnet</td><td>728126428</td></tr><tr><td></td><td>Tron</td><td>shasta</td><td>201910292</td></tr><tr><td></td><td>Tron</td><td>nile</td><td>201910292</td></tr><tr><td>20.</td><td>Unichain</td><td>sepolia</td><td>1301</td></tr><tr><td>21.</td><td>zksync</td><td>mainnet</td><td>324</td></tr><tr><td></td><td>zksync</td><td>sepolia</td><td>300</td></tr></tbody></table>


# Welcome to the GitBook Petstore API

This GitBook API documentation template serves as a starting point for creating clear, interactive, and user-friendly API documentation.

Use this template to explore best practices in structuring your docs, showcasing endpoints, and guiding users through your API. Everything here can be adapted to fit your own product.

#### How this demo works

This reference is automatically generated from an OpenAPI spec uploaded to this GitBook space. GitBook reads the spec and creates a page for each tag, with interactive endpoint blocks for every operation — no manual authoring required.

A few things worth noticing as you explore:

* **Page groups** — tags with no endpoints (like *Store* and *Pets*) become navigation sections automatically, keeping related endpoints grouped without any extra configuration.
* **Auto-split pages** — `##` headings inside `info.description` are automatically split into separate pages in the navigation, which is how this welcome section is structured.
* **Stability badges** — some endpoints are marked `experimental` or `beta` using the `x-stability` extension. You'll see these highlighted on the endpoint itself.
* **Deprecation warnings** — `GET /pets/{petId}` is marked deprecated with a sunset date, surfaced as a warning banner on that endpoint's page.
* **Code samples** — each endpoint includes hand-written examples in cURL, JavaScript, and Python via `x-codeSamples`, supplementing the auto-generated snippets.
* **Try it panel** — most endpoints have a live testing panel on the right. `GET /store/orders` has it disabled via `x-hideTryItPanel` to show that control is per-endpoint.

To use this template for your own API, replace the spec with your own OpenAPI file and adjust the `info.description` to match your product.


# Servers & Authentication

#### Servers

{% tabs %}
{% tab title="Production" %}
**Base URL** `https://petstore.example.com/v1`
{% endtab %}

{% tab title="Staging" %}
**Base URL** `https://staging.petstore.example.com/v1`
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Both servers are available in the **Try it** panel on each endpoint page. Use the server switcher in the top-right of the panel to toggle between Production and Staging without leaving the docs.
{% endhint %}

#### Authentication

All requests must include your API key in the `Authorization` header:

```
Authorization: Bearer YOUR_API_KEY
```

{% hint style="info" %}
Generate an API key from your [account dashboard](https://petstore.example.com/dashboard/keys). Keys are scoped to a single workspace.
{% endhint %}


# Getting started

{% stepper %}
{% step %}

### Create an account

Sign up at [petstore.example.com](https://petstore.example.com) — it's free.
{% endstep %}

{% step %}

### Get your API key

Head to your dashboard and copy your key from the **API Keys** section.
{% endstep %}

{% step %}

### Make your first request

Call `GET /pets` to verify connectivity and see available pets.
{% endstep %}
{% endstepper %}


# Error responses

All errors follow a consistent structure:

```json
{
  "error": {
    "code": "not_found",
    "message": "The requested resource could not be found.",
    "status": 404
  }
}
```

| Status | Meaning                                   |
| ------ | ----------------------------------------- |
| `400`  | Bad request — check your request body     |
| `401`  | Unauthorized — missing or invalid API key |
| `403`  | Forbidden — insufficient permissions      |
| `404`  | Not found                                 |
| `429`  | Rate limited — back off and retry         |
| `500`  | Server error                              |

{% hint style="warning" %}
This API is for demo purposes only — **don't** use it in production.
{% endhint %}


# Store


# Orders

Place and manage customer orders.

## List orders

> Returns all orders placed in the store. Does not currently support filtering or pagination.\
> \
> {% hint style="info" %}\
> Filtering and pagination are planned for v2. Subscribe to the \[changelog]\(<https://petstore.example.com/changelog>) for updates.\
> {% endhint %}<br>

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"orders"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"schemas":{"Order":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique order identifier."},"petId":{"type":"integer","format":"int64","description":"The ID of the animal in this order."},"quantity":{"type":"integer","description":"Number of units ordered."},"shipDate":{"type":"string","format":"date-time","description":"Expected or actual ship date in ISO 8601 format."},"complete":{"type":"boolean","description":"Whether the order has been fulfilled."}}},"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/store/orders":{"get":{"summary":"List orders","description":"Returns all orders placed in the store. Does not currently support filtering or pagination.\n\n{% hint style=\"info\" %}\nFiltering and pagination are planned for v2. Subscribe to the [changelog](https://petstore.example.com/changelog) for updates.\n{% endhint %}\n","tags":["orders"],"operationId":"listOrders","responses":{"200":{"description":"An array of orders.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Cancel an order

> Cancels an order by ID. Only orders with a status of \`pending\` can be cancelled — orders that have already shipped cannot be reversed.

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"orders"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}}},"paths":{"/store/orders/{orderId}":{"delete":{"summary":"Cancel an order","description":"Cancels an order by ID. Only orders with a status of `pending` can be cancelled — orders that have already shipped cannot be reversed.","tags":["orders"],"operationId":"cancelOrder","parameters":[{"name":"orderId","in":"path","required":true,"description":"The ID of the order to cancel.","schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"Order cancelled successfully."},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Order cannot be cancelled — it has already shipped."}}}}}}
```


# Inventory

Track and update stock levels for pets in the store.

## List inventory

> Returns current stock levels for all pets in the store.

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"inventory"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"schemas":{"InventoryItem":{"type":"object","required":["petId","quantity","status"],"properties":{"petId":{"type":"integer","format":"int64","description":"The ID of the animal this entry tracks."},"quantity":{"type":"integer","description":"Current stock count."},"status":{"$ref":"#/components/schemas/PetStatus"}}},"PetStatus":{"type":"string","enum":["available","pending","sold"]},"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/inventory":{"get":{"summary":"List inventory","description":"Returns current stock levels for all pets in the store.","tags":["inventory"],"operationId":"listInventory","responses":{"200":{"description":"An array of inventory entries.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Update stock level

> Updates the stock quantity for a specific pet. Use this to record new arrivals, returns, or manual adjustments.\
> \
> {% hint style="warning" %}\
> This endpoint is \*\*experimental\*\* — the request shape may change before it reaches stable.\
> {% endhint %}<br>

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"inventory"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"schemas":{"InventoryUpdate":{"type":"object","required":["quantity"],"properties":{"quantity":{"type":"integer","description":"The new stock count."}}},"InventoryItem":{"type":"object","required":["petId","quantity","status"],"properties":{"petId":{"type":"integer","format":"int64","description":"The ID of the animal this entry tracks."},"quantity":{"type":"integer","description":"Current stock count."},"status":{"$ref":"#/components/schemas/PetStatus"}}},"PetStatus":{"type":"string","enum":["available","pending","sold"]},"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}},"responses":{"BadRequest":{"description":"The request body is missing required fields or contains invalid values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/inventory/{petId}":{"patch":{"summary":"Update stock level","description":"Updates the stock quantity for a specific pet. Use this to record new arrivals, returns, or manual adjustments.\n\n{% hint style=\"warning\" %}\nThis endpoint is **experimental** — the request shape may change before it reaches stable.\n{% endhint %}\n","tags":["inventory"],"operationId":"updateInventory","parameters":[{"name":"petId","in":"path","required":true,"description":"The ID of the pet to update stock for.","schema":{"type":"integer","format":"int64"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUpdate"}}}},"responses":{"200":{"description":"Updated inventory entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItem"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```


# Pets


# Animals

Browse and manage individual animals available for adoption.

## List all animals

> Returns a paginated list of all animals in the store. Use \`limit\` to control page size and \`status\` to filter by availability.

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"animals"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"schemas":{"PetStatus":{"type":"string","enum":["available","pending","sold"]},"Pets":{"type":"array","items":{"$ref":"#/components/schemas/Pet"}},"Pet":{"allOf":[{"$ref":"#/components/schemas/NewPet"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier assigned on creation."}}}]},"NewPet":{"type":"object","required":["name","categoryId"],"properties":{"name":{"type":"string","description":"The animal's name."},"categoryId":{"type":"integer","format":"int64","description":"The ID of the category this animal belongs to."},"status":{"$ref":"#/components/schemas/PetStatus"}}},"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/pets":{"get":{"summary":"List all animals","description":"Returns a paginated list of all animals in the store. Use `limit` to control page size and `status` to filter by availability.","tags":["animals"],"operationId":"listPets","parameters":[{"name":"limit","in":"query","description":"Maximum number of animals to return. Defaults to 20, max 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"status","in":"query","description":"Filter by availability status.","schema":{"$ref":"#/components/schemas/PetStatus"}}],"responses":{"200":{"description":"A paginated list of animals.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pets"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Add an animal

> Adds a new animal to the store. The \`name\` and \`categoryId\` fields are required.

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"animals"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"schemas":{"NewPet":{"type":"object","required":["name","categoryId"],"properties":{"name":{"type":"string","description":"The animal's name."},"categoryId":{"type":"integer","format":"int64","description":"The ID of the category this animal belongs to."},"status":{"$ref":"#/components/schemas/PetStatus"}}},"PetStatus":{"type":"string","enum":["available","pending","sold"]},"Pet":{"allOf":[{"$ref":"#/components/schemas/NewPet"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier assigned on creation."}}}]},"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}},"responses":{"BadRequest":{"description":"The request body is missing required fields or contains invalid values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/pets":{"post":{"summary":"Add an animal","description":"Adds a new animal to the store. The `name` and `categoryId` fields are required.","tags":["animals"],"operationId":"createPet","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPet"}}}},"responses":{"201":{"description":"Animal added successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Get an animal

> Returns details for a single animal by ID.\
> \
> {% hint style="danger" %}\
> \*\*This endpoint is deprecated\*\* and will be removed on \*\*5 December 2030\*\*. Use \`GET /pets\` with a \`status\` filter instead.\
> {% endhint %}<br>

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"animals"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"schemas":{"Pet":{"allOf":[{"$ref":"#/components/schemas/NewPet"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier assigned on creation."}}}]},"NewPet":{"type":"object","required":["name","categoryId"],"properties":{"name":{"type":"string","description":"The animal's name."},"categoryId":{"type":"integer","format":"int64","description":"The ID of the category this animal belongs to."},"status":{"$ref":"#/components/schemas/PetStatus"}}},"PetStatus":{"type":"string","enum":["available","pending","sold"]},"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/pets/{petId}":{"get":{"summary":"Get an animal","description":"Returns details for a single animal by ID.\n\n{% hint style=\"danger\" %}\n**This endpoint is deprecated** and will be removed on **5 December 2030**. Use `GET /pets` with a `status` filter instead.\n{% endhint %}\n","tags":["animals"],"operationId":"getPet","parameters":[{"name":"petId","in":"path","required":true,"description":"The ID of the animal to retrieve.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"The requested animal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"deprecated":true}}}}
```


# Categories

Manage the species and breed categories used to classify pets.

## List categories

> Returns all categories available for classifying pets (e.g. dog, cat, rabbit).

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"categories"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"schemas":{"Category":{"allOf":[{"$ref":"#/components/schemas/NewCategory"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier assigned on creation."}}}]},"NewCategory":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The category name (e.g. Dog, Cat, Rabbit)."},"description":{"type":"string","description":"A short description of the category."}}},"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/categories":{"get":{"summary":"List categories","description":"Returns all categories available for classifying pets (e.g. dog, cat, rabbit).","tags":["categories"],"operationId":"listCategories","responses":{"200":{"description":"An array of categories.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Category"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Create a category

> Adds a new category for classifying pets.

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"categories"}],"servers":[{"url":"https://petstore.example.com/v1","description":"Production"},{"url":"https://staging.petstore.example.com/v1","description":"Staging"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Pass your API key as a Bearer token in the `Authorization` header."}},"schemas":{"NewCategory":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The category name (e.g. Dog, Cat, Rabbit)."},"description":{"type":"string","description":"A short description of the category."}}},"Category":{"allOf":[{"$ref":"#/components/schemas/NewCategory"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier assigned on creation."}}}]},"Error":{"type":"object","required":["code","message","status"],"properties":{"code":{"type":"string","description":"A machine-readable error code."},"message":{"type":"string","description":"A human-readable description of the error."},"status":{"type":"integer","description":"The HTTP status code."}}}},"responses":{"BadRequest":{"description":"The request body is missing required fields or contains invalid values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/categories":{"post":{"summary":"Create a category","description":"Adds a new category for classifying pets.","tags":["categories"],"operationId":"createCategory","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCategory"}}}},"responses":{"201":{"description":"Category created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```


# Help Center

<h2 align="center">Need Help?</h2>

<p align="center">Can't find what you are looking for? We're here to help.</p>

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-leaf">:leaf:</i></h4></td><td><strong>Getting started</strong></td><td>Get help with the basics</td><td><a href="/spaces/FS0LGFwBpTDPwKyrdgBn/pages/8p8S1CuygSRsHLaQ8ljF">/spaces/FS0LGFwBpTDPwKyrdgBn/pages/8p8S1CuygSRsHLaQ8ljF</a></td></tr><tr><td><h4><i class="fa-plug">:plug:</i></h4></td><td><strong>Integrations</strong></td><td>Extend your workflow</td><td><a href="/spaces/ULLMmfdTHZwwY2wLyk44/pages/trLwwmumlaofzMKwR3fr">/spaces/ULLMmfdTHZwwY2wLyk44/pages/trLwwmumlaofzMKwR3fr</a></td></tr></tbody></table>

<h2 align="center">Community</h2>

<p align="center">Connect with Tresori across our community channels.</p>

<p align="center"><a href="https://t.me/tresoriofficial" class="button primary" data-icon="telegram"></a><a href="https://linkedin.com/company/tresori-kalp" class="button primary" data-icon="linkedin"></a><a href="https://x.com/TreSori_kalp" class="button primary" data-icon="x-twitter"></a></p>


