> ## 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.

# Wallet address sharing

# Wallet Address Sharing

The most common crypto user-to-user interaction is "send me your address". It is also one of the most dangerous: a single swapped character routes funds irreversibly into the wrong place, and attackers exploit this by MITM'ing chat clients, spoofing identities, and poisoning clipboards. Notareum replaces raw address exchange with signed, verifiable `.nota` files and on-chain registry lookups.

## The problem today

Alice wants to pay Bob. She asks Bob for his address over chat. Bob pastes `0xabc...def`. Alice copies it, possibly through a compromised extension or clipboard manager, and sends funds. If anything corrupted the address along the way, the funds are gone.

Attack surfaces include:

* **Clipboard poisoning** by malicious browser extensions or installed malware.
* **Visually similar addresses** generated by vanity miners sharing a prefix and suffix.
* **Impersonation** of Bob by an attacker who has compromised Bob's chat account.
* **Typo-squatted ENS names** or paid copycats.

## The Notareum flow

```mermaid theme={"system"}
sequenceDiagram
    participant BobWallet
    participant BobSigner
    participant ChatApp
    participant AliceWallet
    participant Registry
    BobWallet->>BobSigner: create .nota for my address
    BobSigner-->>BobWallet: signed.nota
    BobWallet->>ChatApp: send signed.nota (file or QR)
    ChatApp->>AliceWallet: signed.nota delivered
    AliceWallet->>AliceWallet: parse, validate, check signature
    AliceWallet->>Registry: getResource(resourceId)
    Registry-->>AliceWallet: owner, level, revoked?, alias
    AliceWallet->>AliceWallet: show rich confirm screen
    AliceWallet->>BobWallet: funds
```

Alice's wallet no longer trusts the chat app or the clipboard. It trusts the signature on the `.nota` file and the on-chain record.

## End-to-end code

### Bob: produce a signed .nota for his address

```typescript theme={"system"}
import { Notareum } from "@notareum/sdk";
import { Wallet } from "ethers";

const bobSigner = new Wallet(process.env.BOB_PRIVATE_KEY!);
const ntm = Notareum({ provider: bobSigner.provider!, signer: bobSigner, contracts });

const signed = await ntm.nota
  .create({
    type: "address",
    chainName: "ethereum",
    chainId: 1,
    identifier: await bobSigner.getAddress(),
    alias: "bob.eth",
    name: "Bob Smith",
    description: "Personal wallet, KYC'd via CoolExchange",
    issuerName: "Bob Smith",
    issuerEntityType: "individual",
  })
  .validate()
  .sign(bobSigner);

const wire = signed.serialize();
// Bob ships `wire` via any channel. If Bob has previously registered
// his address on-chain at `bob.eth`, the alias alone is sufficient.
```

### Alice: consume a received `.nota` or alias

```typescript theme={"system"}
import { Notareum } from "@notareum/sdk";

const ntm = Notareum({ provider, contracts }); // no signer needed for reads

async function resolveRecipient(input: string) {
  // Path 1: input is a `.nota` file content
  if (input.trim().startsWith("{")) {
    const nota = ntm.nota.parse(input);
    ntm.nota.validate(nota);
    return {
      address: nota.resource.identifier,
      alias: nota.resource.alias,
      level: nota.verification?.level ?? "unverified",
      issuer: nota.issuer,
      source: "file",
    };
  }

  // Path 2: input is an alias like `bob.eth`
  const resourceId = await ntm.registry.resolveAlias(input);
  const info = await ntm.registry.getResource(resourceId);
  if (info.isRevoked) throw new Error("Address is revoked");
  return {
    address: /* decoded from identifier */ info.owner,
    alias: info.alias,
    level: info.verificationLevel,
    source: "registry",
  };
}
```

Alice's wallet uses this resolver on the confirm screen, showing Bob's name, verification badge, alias, and any warnings. If any check fails (signature mismatch, revoked record, unknown alias), the wallet blocks the send.

## Why this is better than ENS alone

* ENS resolves names to addresses but does not carry issuer identity or a verification level signal.
* ENS does not have a protocol-level revocation flag with governance-set consequences.
* `.nota` files can travel off-chain (no transaction needed for a one-off share), while still being verifiable the moment the recipient gets a provider.
* Notareum's on-chain registry and ENS can coexist: you can still register your ENS name as the alias.

## Related

* [Quick Start](../introduction/quickstart.md)
* [Your First .nota File guide](../guides/your-first-nota-file.md)
* [Payment Requests](payment-requests.md) for the amount-bearing variant
