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

# Try live examples

> Resolve real testnet names for G accounts, memos, muxed destinations and a hello-world contract.

Try [Nova Whois](https://nova-claim-app.throbbing-cloud-0f8e.workers.dev/whois) to see Soran resolve real names on Stellar testnet. Choose an example from the gallery to inspect its address, memo or muxed routing ID. You do not need to connect a wallet.

| Name           | Destination                       | Memo or routing ID                                         |
| -------------- | --------------------------------- | ---------------------------------------------------------- |
| `cyclops.nova` | Soroban C contract with `hello()` | No memo; `hello()` returns `Hello, world!`                 |
| `nikcle.nova`  | Classic G account                 | No memo                                                    |
| `mux.nova`     | Muxed M address                   | Embedded routing ID `42`; no separate memo                 |
| `robert.nova`  | Classic G account                 | Memo ID `12345`                                            |
| `alice.nova`   | Classic G account                 | Text memo `hello`                                          |
| `echo.nova`    | Classic G account                 | Hash memo containing the 32-byte SHA-256 digest of `hello` |

Use these names for demonstrations, not deposits. The [example manifest](https://nova-claim-app.throbbing-cloud-0f8e.workers.dev/examples/manifest.json) lists their complete values as a dated snapshot. Read them live when testing; records can change, storage can expire and testnet can reset.

## Read all destination types

Install the published Lookup SDK and Stellar SDK:

```sh theme={null}
npm install @sorandomains/lookup@0.8.0 @stellar/stellar-sdk@17.0.1
```

Save this as `examples.mjs`, then run `node examples.mjs`:

```js theme={null}
import { Soran } from "@sorandomains/lookup";

const soran = new Soran({
  network: "testnet",
  resolutionMode: "universal",
});

for (const name of [
  "cyclops.nova", "nikcle.nova", "mux.nova",
  "robert.nova", "alice.nova", "echo.nova",
]) {
  console.log(name, await soran.resolvePayment(name));
}
```

`resolvePayment` returns the current address and memo together through Universal Lookup. The configured `robert.nova` example is:

```json theme={null}
{
  "address": "GBHKTFVBDUA6RYP5JM4SPZ76OXYAAHV4QHUOFV4S4TK342FMVGPHA2WN",
  "memo": { "type": "id", "value": "12345" }
}
```

Memo ID `12345` is different from text memo `"12345"`. Preserve the returned type and value. For `echo.nova`, the hash bytes are `2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824`; do not hash that string again. See [payment handling](/sdk/resolving-names) before constructing a payment.

## Inspect the muxed example

`mux.nova` resolves to this complete M address:

```text theme={null}
M address: MDHHA2WBSH4ZKIAWALPY4KVOC57ZUT6W6HWS3JBUQ4KFJRT6US4MWAAAAAAAAAAAFKV2W
G account: GDHHA2WBSH4ZKIAWALPY4KVOC57ZUT6W6HWS3JBUQ4KFJRT6US4MXTZ5
Routing ID: 42
Separate memo: none
```

Routing ID `42` is part of this M address. Keep the full M address in a compatible payment flow; removing the ID changes the destination. A G address plus Memo ID `42` is a different instruction. The route has no separate balance or signing account. See [muxed accounts](/concepts/payment-destinations#muxed-accounts-what-is-and-is-not-supported).

## Check address-to-name lookup

The five wallet examples are configured with both a Nova reverse selection and a Primary selection. Copy a returned destination into Whois's address-to-name search, or run:

```js theme={null}
const muxedPayment = await soran.resolvePayment("mux.nova");
console.log(await soran.reverse("nova", muxedPayment.address)); // "mux.nova"
console.log(await soran.primaryOf(muxedPayment.address));       // "mux.nova"
```

Use this with the configured `soran` instance above. The complete M address selects its exact routing ID; its underlying G account and other IDs have independent elections. G elections identify the account without distinguishing separate customer memos.

Claiming establishes forward resolution. Reverse and Primary lookup also need a display-name election authorized by the destination account; they do not list every name a wallet owns. Handle an empty election result separately from a reported read failure. See [reverse and Primary semantics](/sdk/reverse-and-primary).

The minimal `cyclops.nova` contract supports the forward-resolution and method-call example below. It does not implement display-name election.

## Call a contract by name

Select `cyclops.nova` in Whois, then select **Run hello-world example**. Nova resolves the name to a C address and simulates its `hello()` method. The expected result is `Hello, world!`. This read does not sign or submit a transaction.

The example contract is `CCVKI6UYJDO34LO4D653IXCTPBGJOHJSJGSIOB4A46IH4ULNHS2MPQL7`. The app resolves `cyclops.nova` to its C address before invoking the contract.

```js theme={null}
import {
  Account, Contract, TransactionBuilder, rpc, scValToNative,
} from "@stellar/stellar-sdk";

const contractPayment = await soran.resolvePayment("cyclops.nova");
if (!contractPayment.address.startsWith("C") || contractPayment.memo.type !== "none") {
  throw new Error("The name no longer resolves to a memo-free contract");
}

const server = new rpc.Server("https://soroban-testnet.stellar.org");
// Public account used only as the source of an unsigned read simulation.
const source = new Account(
  "GCQXEMOVPGQQHBX7OS2ZMCCS7FSZC6Q6EAKQHP7G5DIWQWREW2V3BWU7", "0",
);
const tx = new TransactionBuilder(source, {
  fee: "100",
  networkPassphrase: "Test SDF Network ; September 2015",
}).addOperation(new Contract(contractPayment.address).call("hello"))
  .setTimeout(60).build();

const result = await server.simulateTransaction(tx);
if (!rpc.Api.isSimulationSuccess(result)
    || rpc.Api.isSimulationRestore(result) || !result.result) {
  throw new Error("Could not read hello()");
}
console.log(scValToNative(result.result.retval)); // "Hello, world!"
```

Use this with the configured `soran` instance above, or download the [standalone runnable example](https://nova-claim-app.throbbing-cloud-0f8e.workers.dev/examples/resolve-and-call.mjs). The [hello-world Rust source](https://nova-claim-app.throbbing-cloud-0f8e.workers.dev/examples/hello-world.rs) is also available.

## Inspect the contract calls

Expand **Developer details** below a Whois result to see the contract, arguments and decoded result. Name reads use `resolve_v2`; G/C identity reads use `reverse` and `primary_name`; M identity reads use `reverse_muxed` and `primary_name_muxed`. See the [on-chain reference](/api/onchain-resolution) for the full interface.

To add registration to your own app, use the [Holder SDK claim flow](/owner/automatic-claiming). Nova shows the Registrar's `claim(intent, proof)` call under **Exact transaction for wallet approval** before signing. After a claim, **Choose my wallet display name** opens the optional display-name setup.
