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

# Api reference

# TypeScript: API Reference

Full method surface for `@notareum/sdk`. All write methods require `signer` in the Notareum configuration; read methods need only `provider`.

## Factory

```typescript theme={"system"}
function Notareum(config: ClientConfig): NotareumInstance

interface ClientConfig {
  provider: Provider;
  signer?: Signer;
  contracts: ContractAddresses;
}

interface NotareumInstance {
  nota: NotaFileClient;
  registry: RegistryClient;
  verification: VerificationClient;
  staking: StakingClient;
  governance: GovernanceClient;
  fee: FeeClient;
}
```

## `NotaFileClient` (`ntm.nota`)

```typescript theme={"system"}
class NotaFileClient {
  create(options: CreateNotaOptions): NotaBuilder;
  parse(content: string): NotaFile;
  validate(nota: NotaFile): void;
  isValid(nota: NotaFile): boolean;
  serialize(nota: NotaFile): string;
}

class NotaBuilder {
  sign(signer: Signer): Promise<NotaBuilder>;
  validate(): NotaBuilder;
  serialize(): string;
  build(): NotaFile;
}
```

## `RegistryClient` (`ntm.registry`)

```typescript theme={"system"}
class RegistryClient {
  registerResource(
    resourceType: number,
    chainId: bigint | number,
    identifier: string,
    proofHash: string,
    alias?: string
  ): Promise<string>;

  getResource(resourceId: string): Promise<ResourceInfo>;
  resolveAlias(alias: string): Promise<string>;
  revokeResource(resourceId: string): Promise<string>;

  computeResourceId(
    resourceType: number,
    chainId: bigint | number,
    identifier: string
  ): string;

  addResourceType(typeId: number, name: string): Promise<string>;
  removeResourceType(typeId: number): Promise<string>;
  isValidResourceType(typeId: number): Promise<boolean>;
  getResourceTypeName(typeId: number): Promise<string>;
}
```

## `VerificationClient` (`ntm.verification`)

```typescript theme={"system"}
class VerificationClient {
  requestVerification(
    resourceId: string,
    level: VerificationLevel
  ): Promise<string>;

  submitAttestation(
    resourceId: string,
    approved: boolean
  ): Promise<string>;

  getVerificationRequest(
    requestId: bigint | number
  ): Promise<VerificationRequest>;

  getVerificationFee(level: VerificationLevel): Promise<bigint>;
}
```

## `StakingClient` (`ntm.staking`)

```typescript theme={"system"}
class StakingClient {
  stake(amount: bigint): Promise<string>;
  unstake(): Promise<string>;
  claimStake(): Promise<string>;

  getValidatorInfo(address: string): Promise<ValidatorInfo>;
  getTier(address: string): Promise<ValidatorTier>;
  getDailyVerificationsRemaining(address: string): Promise<bigint>;
  getTierThreshold(tier: ValidatorTier): Promise<bigint>;
}
```

## `GovernanceClient` (`ntm.governance`)

```typescript theme={"system"}
class GovernanceClient {
  lock(amount: bigint, duration: bigint): Promise<string>;
  extendLock(lockId: bigint, additionalDuration: bigint): Promise<string>;
  unlock(lockId: bigint): Promise<string>;

  getVotingPower(address: string): Promise<bigint>;
  getLock(lockId: bigint): Promise<VeNOTALock>;
  getTotalSupply(): Promise<bigint>;
}
```

## `FeeClient` (`ntm.fee`)

```typescript theme={"system"}
class FeeClient {
  getVerificationFee(level: number): Promise<bigint>;
  getAliasFee(): Promise<bigint>;
  getDisputeBond(): Promise<bigint>;
  getFeeCollector(): Promise<string>;
  getFeeConfig(): Promise<FeeConfig>;

  // Governance only
  setVerificationFee(level: number, fee: bigint): Promise<string>;
  setAliasFee(fee: bigint): Promise<string>;
}
```

## Enums and types

```typescript theme={"system"}
const ResourceType = {
  ADDRESS: 0,
  TRANSACTION: 1,
  CONTRACT: 2,
  IPFS: 3,
  NFT: 4,
  METADATA: 5,
} as const;

enum VerificationLevel { BASIC = 0, ENHANCED = 1, INSTITUTIONAL = 2 }
enum VerificationStatus { PENDING = 0, APPROVED = 1, REJECTED = 2, EXPIRED = 3 }
enum ValidatorTier { NONE = 0, BRONZE = 1, SILVER = 2, GOLD = 3, PLATINUM = 4 }
```

## Errors

Every client may throw one of the following:

* `SignerRequiredError`: thrown when a write method is called without a signer.
* `ContractCallError`: wraps on-chain reverts with decoded messages.
* `ConfigurationError`: invalid contract addresses or provider.
* `ResourceNotFoundError`: resolver or getter found nothing.

See [Error Codes](../../reference/error-codes.md) for a full mapping.

## Utilities

```typescript theme={"system"}
import {
  computeResourceId,
  registerResourceType,
  resolveResourceTypeId,
  resolveResourceTypeString,
  isValidResourceType,
} from "@notareum/sdk";
```

These helpers mirror the on-chain resource type registry and the keccak-based resource ID derivation. Call `computeResourceId` to preview a `resourceId` before paying gas to register it.
