> For the complete documentation index, see [llms.txt](https://solieum.gitbook.io/solieum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solieum.gitbook.io/solieum/archive-programme-kit.md).

# archive programme kit

## 🚀 Overview

Solieum Layer 2 developers have access to a comprehensive toolkit to create smart contracts, including Solve, Solve Framework, and Solana Tool Suite. Solve is our own framework designed to enhance user experience, developed by Solieum Labs.

The Solieum SPK is a set of libraries and tools that simplify the process of building applications on the Solana blockchain. It provides pre-built functions and utilities for connecting to the Solieum network, managing accounts, and executing transactions. This makes it easier for developers to work with the Solieum Layer 2 ecosystem and create decentralized applications (dApps).

## 💡 Key Concepts

#### 📦 Software Programme Kits

The Solieum SPK is a collection of software Programming Kits that provide pre-built functions and utilities for rapid development.

#### 🔄 Layer 2 Network

The SPK enables developers to interact with the Solieum Layer 2 network, allowing them to send transactions, manage accounts, and access on-chain data.

#### ⚡ High Performance

Solieum Layer 2 is known for its high transaction throughput and low fees, making it an attractive platform for building scalable dApps.

#### 🔠 Multiple Languages

The Solieum SPK supports various programming languages, including Rust, C, and TypeScript, which are commonly used in blockchain development.

#### 🔗 On-chain and Off-chain

The SPK provides libraries for both on-chain (program development) and off-chain (client applications) development.

## 🧩 Main Components

| Component               | Description                                                                                                     |
| ----------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Solieum Web3.js SDK** | A JavaScript library for building Solieum applications across Node.js, web, and React Native platforms.         |
| **Rust SDK**            | Another popular SDK for Solieum, often used for building on-chain programs and interacting with the blockchain. |
| **CLI Tools**           | Command-line utilities for deploying, testing, and managing Solieum Layer 2 applications.                       |
| **Extension Libraries** | Additional modules for specific use cases like NFTs, DeFi, and gaming applications.                             |

## 🎯 Benefits of Using the Solieum SPK

{% stepper %}
{% step %}

### Simplified Development

The SPK makes it easier for developers to interact with the Solieum Layer 2 blockchain without having to handle low-level details.
{% endstep %}

{% step %}

### Faster Development

Pre-built functions and utilities reduce development time and effort, enabling quicker time-to-market.
{% endstep %}

{% step %}

### Access to Solieum Layer 2 Network

The SPK provides tools for connecting to the Solieum network and interacting with its various features.
{% endstep %}

{% step %}

### Scalability

Solieum's high-performance architecture and the SPK's efficient tools enable developers to build scalable dApps.
{% endstep %}

{% step %}

### Community Support

The Solieum Layer 2 ecosystem has a strong community of developers, and the SPK is well-documented and supported.
{% endstep %}
{% endstepper %}

## 🔧 Technical Implementation

<figure><img src="https://content.gitbook.com/content/9sknVijWtYbZXNBeIcYM/blobs/IGVQAhDAs2cyVJ7roAb3/Screenshot_22.png" alt="SPK Technical Architecture"><figcaption><p>Solieum SPK Architecture Overview</p></figcaption></figure>

### Installation

To get started with Solieum SPK, install the package using npm:

```bash
# For JavaScript/TypeScript developers
npm install @solieum/web3.js

# For React applications
npm install @solieum/web3.js @solieum/wallet-adapter-react
```

For Rust developers:

```bash
# Add to Cargo.toml
cargo add solieum-sdk
```

### Connecting to Solieum Layer 2

Here's how to establish a connection to the Solieum Layer 2 network:

```typescript
import { Connection, clusterApiUrl } from '@solieum/web3.js';

// Connect to Solieum Layer 2 testnet
const connection = new Connection(
  'https://api.testnet.solieum.com',
  'confirmed'
);

// Get the current block height
const blockHeight = await connection.getBlockHeight();
console.log(`Current block height: ${blockHeight}`);
```

### Creating and Managing Accounts

```typescript
import { 
  Connection, 
  Keypair, 
  SystemProgram, 
  Transaction,
  sendAndConfirmTransaction
} from '@solieum/web3.js';

// Generate a new account
const newAccount = Keypair.generate();
console.log(`New account address: ${newAccount.publicKey.toString()}`);

// Transfer tokens on Solieum Layer 2
async function transferTokens(from, to, amount) {
  const transaction = new Transaction().add(
    SystemProgram.transfer({
      fromPubkey: from.publicKey,
      toPubkey: to,
      lamports: amount,
    })
  );
  
  // Transactions on Solieum Layer 2 have significantly lower fees
  const signature = await sendAndConfirmTransaction(
    connection,
    transaction,
    [from]
  );
  
  console.log(`Transaction complete: https://explorer.solieum.com/tx/${signature}`);
  return signature;
}
```

### Interacting with Smart Contracts

```typescript
import { 
  Connection, 
  PublicKey, 
  Transaction, 
  TransactionInstruction,
  sendAndConfirmTransaction 
} from '@solieum/web3.js';

// Program ID for a Solieum Layer 2 smart contract
const programId = new PublicKey('So1iEumXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');

// Create an instruction to interact with the program
const instruction = new TransactionInstruction({
  keys: [
    { pubkey: payer.publicKey, isSigner: true, isWritable: true },
    // Add other account keys as needed by your program
  ],
  programId,
  data: Buffer.from([0, 1, 2, 3]) // Custom instruction data
});

// Create and send transaction
const transaction = new Transaction().add(instruction);
const signature = await sendAndConfirmTransaction(
  connection,
  transaction,
  [payer]
);
```

### Advanced: Utilizing Solieum Layer 2 Specific Features

```typescript
import { 
  Connection, 
  RollupManager,
  ConfirmOptions
} from '@solieum/web3.js';

// Special confirm options for Layer 2 rollups
const confirmOptions: ConfirmOptions = {
  skipPreflight: false,
  commitment: 'finalized',
  preflightCommitment: 'finalized',
  maxRetries: 5,
  rollupConfirmation: true // Solieum-specific option to wait for rollup confirmation
};

// Initialize rollup manager to interact with Layer 2 specifics
const rollupManager = new RollupManager(connection);

// Get current rollup state
const rollupState = await rollupManager.getRollupState();
console.log(`Current rollup ID: ${rollupState.currentRollupId}`);
console.log(`Transactions in current rollup: ${rollupState.transactionCount}`);
console.log(`Expected settlement time: ${rollupState.estimatedSettlementTime} seconds`);
```

## 📊 Performance Benchmarks

| Metric                    | Solana L1      | Solieum L2      | Improvement   |
| ------------------------- | -------------- | --------------- | ------------- |
| Transaction Throughput    | 65,000 TPS     | 1,000,000+ TPS  | 15x           |
| Transaction Cost          | \~0.000025 SOL | \~0.0000025 SOL | 10x reduction |
| Finality Time             | \~400ms        | \~200ms         | 2x faster     |
| Smart Contract Deployment | \~10 SOL       | \~1 SOL         | 10x cheaper   |

## 📚 Learning Resources

[📝 Read Documentation →](https://docs.solieum.com/spk/getting-started)

[💻 View Examples →](https://github.com/Solieum/examples)

[👥 Join Discord →](https://discord.gg/solieum)

[🎓 Start Learning →](https://learn.solieum.com/)
