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

# Offchain SDK

> Changelog for the Offchain SDK with version updates and changes.

<Update label="May 1, 2026" description="v1.0.13">
  * Added:
    * **New Blockchain Support**: Added support for two Substrate L1 chains:
      * Polkadot (`ChainName.Polkadot = "dot"`, coin type 354, SS58 prefix 0)
      * Vara Network (`ChainName.Vara = "vara"`, coin type 913, SS58 prefix 137)
  * Enhanced:
    * **SS58 Address Validation**: Introduced a shared `isValidSs58(value, leadingChars, minLen, maxLen?)` helper in `validation.ts` that validates leading characters, length range, and base58 charset. Powers both Polkadot and Vara address checks.
  * Testing:
    * Added positive and negative validation tests for both chains using real addresses computed via `@polkadot/util-crypto`. Cross-rejection tests confirm each chain's validator rejects the other's address format.
</Update>

<Update label="March 4, 2026" description="v1.0.12">
  * Fixed:
    * **Custom Auth Token Support**: When `x-auth-token` is supplied through `setCustomHeaders` / `customHeaders`, the client no longer requires `setApiKey` / `setDefaultApiKey` to be configured. Previously the SDK still threw `Api key is not present for name: ...` even when token-based auth was already provided through custom headers. Strict ENS-name validation is also relaxed for single-label names when token auth is in effect.
</Update>

<Update label="January 20, 2026" description="v1.0.11">
  * Added:
    * **Custom HTTP Headers**: New `setCustomHeaders(headers)` method on `OffchainClient` and matching `customHeaders` field on `OffchainClientConfig`. Headers set this way are applied to every outgoing request — useful for tracing IDs, multi-tenant routing, or additional auth metadata.
  * Testing:
    * Added integration tests covering custom-header propagation through the client.
</Update>

<Update label="December 2, 2025" description="v1.0.10">
  * Changed:
    * **Monad Mainnet Support**: Updated Monad coin type from `10143` (testnet) to `143` (mainnet) for production network compatibility
</Update>

<Update label="October 28, 2025" description="v1.0.9">
  * Added:
    * **New Blockchain Support**: Added support for Push Testnet (Chain ID: 42101)
</Update>

<Update label="October 21, 2025" description="v1.0.8">
  * Added:
    * **setDefaultEvmAddress Method**: Set a default EVM address for all EVM-compatible chains with a single call
    * **EVM Chain Metadata**: Added evm flag to chain metadata for EVM compatibility identification
  * Enhanced:
    * **Developer Experience**: Updated README and examples with setDefaultEvmAddress usage
    * **Multi-chain Support**: Method supports 17 EVM chains (Ethereum, Arbitrum, Optimism, Base, Polygon, BSC, Avalanche, Gnosis, zkSync, Linea, Scroll, Unichain, Berachain, WorldChain, Zora, Celo, Monad)
</Update>

<Update label="October 17, 2025" description="v1.0.7">
  * Added:
    * **Default EVM Chain**: Support for the default chain introduced in ENSIP-19 (Chain ID: 0)
</Update>

<Update label="October 16, 2025" description="v1.0.6">
  * Added:
    * **New Blockchain Support**: Added support for Monad (Chain ID: 10143)
</Update>

<Update label="August 21, 2025" description="v1.0.5">
  * Added:
    * **Optional API Key Configuration**: Added support for `defaultApiKey` and `domainApiKeys` during client initialization
    * **No-Parameter Client Creation**: Support for creating clients without parameters (defaults to mainnet)
  * Enhanced:
    * **Improved Developer Experience**: Better inline API key setup workflow
    * **Documentation Updates**: Updated documentation and examples to reflect new features
</Update>

<Update label="August 20, 2025" description="v1.0.4">
  * Fixed:
    * **Coin Type Corrections**:
      * Fixed Sui coin type from `101` to `784` (correct SLIP-44 identifier)
      * Fixed Starknet coin type from `234567891` to `9004` (correct SLIP-44 identifier)
      * Updated test script to include Sui address validation testing
  * Testing:
    * **Enhanced Test Coverage**:
      * Added Sui address record testing in manual test suite
      * Improved validation for blockchain-specific coin types
</Update>

<Update label="August 19, 2025" description="v1.0.3">
  * Added:
    * **New Blockchain Support**: Added support for 7 new blockchain networks:
      * Unichain
      * Berachain
      * WorldChain
      * Zora
      * Celo
      * Aptos
      * Algorand
  * Enhanced:
    * **Improved Address Validation**:
      * Enhanced Starknet address validation to support variable-length hex addresses (1-64 characters)
      * Improved Bitcoin address validation to support Legacy (P2PKH), Script (P2SH), Bech32 (P2WPKH/P2WSH), and Taproot (P2TR) formats
      * Updated Cosmos address validation to use proper bech32 format with 'cosmos1' prefix
      * Enhanced NEAR address validation to support both implicit accounts (64 hex chars) and named accounts (.near)
      * Improved Sui address validation to support variable-length hex addresses (1-64 characters)
      * Added Aptos address validation with variable-length hex support
      * Added Algorand address validation using Base32 format (58 characters)
  * Testing:
    * **Comprehensive Test Coverage**:
      * Added validation tests for all new blockchain chains
      * Enhanced Bitcoin address validation tests with multiple format support
      * Added Starknet address validation tests for both full and shortened addresses
      * Added Cosmos, NEAR, Sui, Aptos, and Algorand address validation tests
      * Added EVM-compatible chain address validation tests
</Update>

<Update label="August 5, 2025" description="v1.0.2">
  * Enhanced `README.md`:
    * Added Supported Chains section with a quick reference of available blockchain networks.
    * Added Error Handling section with try/catch examples and specific error classes.
</Update>

<Update label="August 5, 2025" description="v1.0.1">
  * Adopted Keep a Changelog format and Semantic Versioning.
  * Initialized `CHANGELOG` documentation for the `@thenamespace/offchain-manager` package.
</Update>

<Update label="August 5, 2025" description="v1.0.0">
  * Changed:
    * **BREAKING**: Package renamed from `@namespacesdk/offchain-manager` to `@thenamespace/offchain-manager`. This is the canonical package going forward.
    * Enhanced package description for better discoverability.
    * Updated repository information and added homepage.
    * Added comprehensive keywords (ens, ethereum, subnames, domains, web3, sdk, etc.).
    * Added engines specification requiring Node.js >=16.0.0.
    * Added publishConfig for public access.
  * Documentation:
    * Enhanced `README.md`:
      * Added comprehensive API key types documentation (Address-based vs Domain-based).
      * Updated all code examples with the new package name.
      * Improved environment setup instructions.
      * Added mixed usage examples for API keys.
      * Updated Namespace Dev Portal section with API key type explanations.
    * Improved `TESTING.md`:
      * Updated title and package references.
      * Fixed environment configuration examples.
      * Updated CI/CD workflow examples.
      * Improved code formatting and consistency.
  * Package improvements:
    * Repository field with proper GitHub organization link.
    * Homepage field pointing to `https://namespace.ninja`.
    * Bugs field for issue tracking.
    * PublishConfig for NPM organization publishing.
    * Enhanced metadata for better package discovery.
  * Fixed:
    * All import statements updated to use the new package name.
    * Documentation consistency across all files.
    * `package.json` validation and best practices compliance.
</Update>
