> ## Documentation Index
> Fetch the complete documentation index at: https://docs.p2p.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started

> The P2P.ORG Signer SDK allows you to sign transactions for 15+ networks using a unified interface. This guide demonstrates how to configure a signer and sign an  transaction using the Hoodi testnet as an example.

## 1. Installation

Install the Signer SDK NPM package. Refer to [this link](https://www.npmjs.com/package/@p2p-org/signer-sdk) for more information.

## 2. Configuration

To initialize a signer, you need two sets of data: your Signer Configuration (sensitive keys) and your Network Parameters (RPC and public addresses).

<CodeGroup>
  ```javascript JavaScript theme={null}
  // 1. Signer Config: Contains sensitive private keys and network targeting
  const signerConfig = {
    ethereumPrivateKey: process.env.PRIVATE_KEY, // e.g., '0x...'
    networkName: 'hoodi', // Use 'mainnet' for production or 'hoodi' for testnet
  };

  // 2. Network Parameters: Public data for transaction preparation
  const parameters = {
    apiBase: 'https://api-test.p2p.org/api/v1',
    token: 'YOUR_P2P_API_TOKEN',
    rpcURL: 'https://ethereum-hoodi-rpc.publicnode.com',
    walletAddress: '0x88bf...'
  };
  ```
</CodeGroup>

## 3. Signing a transaction

The following function illustrates the standard workflow: fetching a fresh nonce from the blockchain, initializing the factory, and signing the payload.

<CodeGroup>
  ```javascript JavaScript theme={null}
  import { SignerFactory, Signers } from '@p2p-org/signer-sdk';
  import { ethers } from 'ethers';

  /**
   * @param unsignedTransactionData - The transaction object received from the Staking API
   */
  async function signTransaction(unsignedTransactionData) {
      // A. Prepare the provider to fetch on-chain metadata
      const provider = new ethers.providers.JsonRpcProvider(parameters.rpcURL);

      // B. Ensure the transaction has the correct Nonce for the wallet
      unsignedTransactionData['nonce'] = await provider.getTransactionCount(parameters.walletAddress);

      // C. Create a typed signer instance using the SignerFactory
      // We specify 'Signers.Ethereum' to handle EVM-compatible logic
      const signer = SignerFactory.createSigner(Signers.Ethereum, signerConfig);

      // D. Sign the transaction locally
      // The private key never leaves your environment
      const signedTx = await signer.sign(unsignedTransactionData);

      return signedTx;
  }
  ```
</CodeGroup>


## Related topics

- [Getting Started](/docs/staking-sei.md)
