# NEAR · Integra

> On NEAR, the token transfer’s memo holds the ATR hash.

URL: https://integraledger.com/rails/near

Payment rail

## NEAR

On NEAR, the token transfer’s memo holds the ATR hash. [Source: lcp docs: rails⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md)

**Sources (1)**

[lcp docs: rails⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md)

### Where the ATR hash rides

On this rail, the ATR hash rides in the NEP-141 transfer’s memo.

#### The standard

Through MPP’s NEAR Intents method, the challenge carries it and the deposit carries nothing. [Source: lcp docs: rails⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md)

- The `memo` of the one NEP-141 `ft_transfer` in the NEP-366 delegate action the payer signs. [Source: lcp docs: rails⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md)

  `x402/exact/near`
- The challenge’s `externalId`. The deposit carries nothing. [Source: lcp docs: rails⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md)

  `mpp/charge/nearintents`

Entry points: `@integraledger/lcp/near` , `@integraledger/lcp/mpp` · Install beside the package: `@near-js/crypto, @near-js/transactions, borsh`

#### The data

Read from the published packages when the site was built; nothing here is typed by hand.

The ATR hash of the site’s example ATR, as this rail carries it

H’s LCP string, as the memo

lcp:sha256:0x8448dc1b716a5103287cb8f35e36b614ffd91e630ab8b7911833c54748ad5ca6

Computed from the site’s example ATR by this rail’s own helper in the package, when the site was built.

### What a payment on this rail proves

Of these 2 pairings, 1 have the buyer’s signature cover the ATR hash, 1 leave a public proof of it, and 1 let anyone read it back from the chain alone. [Source: lcp docs: pairings reference⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/reference/pairings.md)

Switch to Technical to see each pairing, and the sentence its record states about what a payment through it proves.

#### The standard

- **`x402/exact/near` Native Field Buyer signs H: yes H on chain: yes Public proof: yes Recoverable from chain: yes**

  Pattern: [Native Field (LCP §8.3.1)⁠ (opens in a new tab)](https://github.com/legal-context-protocol/legal-context-protocol/blob/c8df26d/spec/legal-context-protocol-v1.md#831-native-field)

  Where the ATR hash rides: The `memo` of the one NEP-141 `ft_transfer` in the NEP-366 delegate action the payer signs.

  What a payment through it proves: The payer signed a NEP-366 delegate action whose one ft_transfer carries this ATR's hash in its memo, in LCP string form. The runtime verified that signature and executed the transfer on the token contract, and the memo is on chain in the delegated call's arguments. This does not show that amount, receiver, token or timing match the ATR's content.

  LCP profile: [x402/exact/near/memo⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/lcp/profiles/x402-exact-near-memo.md)
- **`mpp/charge/nearintents` Opaque Challenge Buyer signs H: no H on chain: no Public proof: no Recoverable from chain: no**

  Pattern: [Opaque Challenge (LCP §8.3.4)⁠ (opens in a new tab)](https://github.com/legal-context-protocol/legal-context-protocol/blob/c8df26d/spec/legal-context-protocol-v1.md#834-opaque-challenge-parameter)

  Where the ATR hash rides: The challenge’s `externalId`. The deposit carries nothing.

  What a payment through it proves: Before this payment, the buyer signed and paid an agreement transaction carrying this ATR's hash on \<network>, recorded in \<transaction>. The seller's MPP challenge carried this ATR's hash in its externalId, bound by the seller's own key to a deposit address issued for that challenge only, and the seller reported delivery. The buyer's deposit does not carry the hash, and the buyer did not sign it. The NEAR Intents backend, not a contract the buyer signed, links the deposit to the seller.

Where a sentence names `<network>` and `<transaction>`, the pairing’s record fills them in: they name the agreement payment the buyer made first. [Source: lcp docs: pairings reference⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/reference/pairings.md) · [Source: lcp docs: the agreement URL⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/concepts/buyer-gate.md#the-agreement-url)

### Reading the settlement

The package reads a payment’s settlement through a reader you supply: the endpoint, the credentials, the timeouts and the retries are yours. A reader that fails never makes a payment read as failed. [Source: lcp docs: reading settlement⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md#reading-settlement)

**Sources (1)**

[lcp docs: reading settlement⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md#reading-settlement)

#### The standard

**Reader**

`NearReader`

**Its calls**

`EXPERIMENTAL_tx_status`, the final block height, `view_access_key`

**A settled read carries**

`final` when the status is `FINAL`, else `optimistic` [Source: lcp docs: reading settlement⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md#reading-settlement)

### The protocols that pay on it

- [x402](https://integraledger.com/protocols/x402)
- [MPP](https://integraledger.com/protocols/mpp)

[lcp docs: rails⁠ (opens in a new tab)](https://github.com/IntegraLedger/integra-protocol/blob/66274bf/docs/guides/rails.md)
