Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"group": "🌐 Developer Resources",
"pages": [
"resources/supported-chains-and-currencies",
"resources/near-blockchain",
"resources/smart-contracts",
"resources/community"
]
Expand Down
168 changes: 168 additions & 0 deletions resources/near-blockchain.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
---
title: "NEAR"
description: "Request Network's support for NEAR including native and fungible token payments"
---

import { CopyButton, ExternalLinkButton } from "/snippets/contract-buttons.jsx"

## Overview

Request Network supports payments on NEAR, a sharded, proof-of-stake blockchain that offers unique capabilities compared to EVM-compatible chains. NEAR's architecture enables more complex smart contract interactions through asynchronous callbacks and cross-contract calls.

Check warning on line 10 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L10

Did you really mean 'sharded'?

Check warning on line 10 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L10

Did you really mean 'blockchain'?

Check warning on line 10 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L10

Did you really mean 'NEAR's'?

<Note>
NEAR support is currently available through the **Request Network SDK only**. The Request Network API does not support NEAR blockchain interactions.

Check warning on line 13 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L13

Did you really mean 'blockchain'?
</Note>

## Key Differences from EVM Chains

NEAR has several important architectural differences that affect how payments work:

<CardGroup cols={2}>
<Card title="Asynchronous Callbacks" icon="arrows-rotate">
Unlike EVM chains where transactions are atomic, NEAR supports **asynchronous callbacks** that can span multiple transactions or blocks. This enables more complex payment flows but requires different handling.
</Card>

<Card title="Account-Based System" icon="user">
NEAR uses human-readable account names (like `alice.near`) instead of hex addresses. Smart contracts are deployed to named accounts and can be upgraded by their owners.
</Card>
</CardGroup>

<CardGroup cols={2}>
<Card title="Storage Deposits" icon="database">
To receive NEP-141 fungible tokens, accounts must first register with the token contract and pay a small storage deposit (~0.00125 NEAR) to cover storage costs.
</Card>

<Card title="Gas Model" icon="gas-pump">
NEAR uses a different gas model with TGas (TeraGas) units. Gas costs are predictable and much lower than Ethereum mainnet.

Check warning on line 36 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L36

Did you really mean 'TGas'?

Check warning on line 36 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L36

Did you really mean 'Ethereum'?

Check warning on line 36 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L36

Did you really mean 'mainnet'?
</Card>
</CardGroup>

## Supported Payment Types

### Native NEAR Payments

Direct payments using NEAR's native token through the payment proxy smart contract.

Check warning on line 44 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L44

Did you really mean 'NEAR's'?

**Features:**
- ✅ Direct NEAR token transfers with payment references
- ✅ Fee collection support
- ✅ Payment detection and indexing

### Fungible Token Payments (NEP-141)

Payments using NEAR's fungible token standard (NEP-141) equivalent to ERC-20 on Ethereum.

Check warning on line 53 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L53

Did you really mean 'NEAR's'?

Check warning on line 53 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L53

Did you really mean 'Ethereum'?

**Features:**
- ✅ Support for all NEP-141 compliant tokens
- ✅ Fee collection in the same token
- ✅ Payment detection and indexing
- ⚠️ Requires storage deposit registration

### Native Token Conversion Payments

Payments for requests denominated in one currency (typically fiat like USD) but paid in NEAR native tokens. On-chain oracles provide real-time price feeds to calculate the correct NEAR amount.

**Features:**
- ✅ Conversion payments denominated in USD, settled in NEAR
- ✅ Price conversion at the moment of payment, using onchain price feeds

Check warning on line 67 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L67

Did you really mean 'onchain'?
- ✅ Payment detection and indexing

## Smart Contract Addresses

### Mainnet (near)

Check warning on line 72 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L72

Did you really mean 'Mainnet'?

| Payment Type | Contract Address | Actions | Description |
|--------------|------------------|---------|-------------|
| **Native NEAR Payments** | `requestnetwork.near` | <div className="flex gap-1"><CopyButton text="requestnetwork.near" /><ExternalLinkButton href="https://nearblocks.io/address/requestnetwork.near" /></div> | Direct NEAR token payments with references |
| **Fungible Token Payments** | `pay.reqnetwork.near` | <div className="flex gap-1"><CopyButton text="pay.reqnetwork.near" /><ExternalLinkButton href="https://nearblocks.io/address/pay.reqnetwork.near" /></div> | NEP-141 token payments with fees |
| **Native Conversion Payments** | `native.conversion.reqnetwork.near` | <div className="flex gap-1"><CopyButton text="native.conversion.reqnetwork.near" /><ExternalLinkButton href="https://nearblocks.io/address/native.conversion.reqnetwork.near" /></div> | Fiat/token to NEAR conversions |

### Testnet (near-testnet)

Check warning on line 80 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L80

Did you really mean 'Testnet'?

| Payment Type | Contract Address | Actions | Description |
|--------------|------------------|---------|-------------|
| **Native NEAR Payments** | `dev-1631521265288-35171138540673` | <div className="flex gap-1"><CopyButton text="dev-1631521265288-35171138540673" /><ExternalLinkButton href="https://testnet.nearblocks.io/address/dev-1631521265288-35171138540673" /></div> | Direct NEAR token payments with references |
| **Fungible Token Payments** | `pay.reqnetwork.testnet` | <div className="flex gap-1"><CopyButton text="pay.reqnetwork.testnet" /><ExternalLinkButton href="https://testnet.nearblocks.io/address/pay.reqnetwork.testnet" /></div> | NEP-141 token payments with fees |
| **Native Conversion Payments** | `native.conversion.reqnetwork.testnet` | <div className="flex gap-1"><CopyButton text="native.conversion.reqnetwork.testnet" /><ExternalLinkButton href="https://testnet.nearblocks.io/address/native.conversion.reqnetwork.testnet" /></div> | Fiat/token to NEAR conversions |

## Payment Detection

Payment detection for NEAR transactions is handled through dedicated subgraphs:

Check warning on line 90 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L90

Did you really mean 'subgraphs'?

- **NEAR Mainnet**: [Request Payments Near Subgraph](https://thegraph.com/explorer/subgraphs/9yEg3h46CZiv4VuSqo1erMMBx5sHxRuW5Ai2V8goSpQL?view=Query&chain=arbitrum-one)

Check warning on line 92 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L92

Did you really mean 'Mainnet'?
- **NEAR Testnet**: [Request Payments Near Testnet Subgraph](https://thegraph.com/explorer/subgraphs/AusVyfndonsMVFrVzckuENLqx8t6kcXuxn6C6VbSGd7M?view=Query&chain=arbitrum-one)

Check warning on line 93 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L93

Did you really mean 'Testnet'?

These subgraphs index payment events and transaction data to enable efficient payment detection and status tracking.

Check warning on line 95 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L95

Did you really mean 'subgraphs'?

## Technical Considerations

### Asynchronous Callbacks

NEAR's asynchronous architecture means payment transactions may require multiple blockchain interactions:

Check warning on line 101 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L101

Did you really mean 'NEAR's'?

Check warning on line 101 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L101

Did you really mean 'blockchain'?

```javascript
// Example: Fungible token payment flow
1. Call ft_transfer_call on token contract
2. Token contract calls proxy contract
3. Proxy processes payment and logs event
4. Callback confirms or reverts transaction
```

This differs from EVM chains where the entire payment happens in a single atomic transaction.

### Storage Deposits

Before receiving NEP-141 tokens, accounts must register with the token contract:

<Warning>
**Important**: Payment addresses must have sufficient storage deposit registered with the token contract. The SDK automatically checks for this requirement and will throw an error if the recipient is not properly registered.
</Warning>

**Minimum Storage Deposit**: ~0.00125 NEAR per token contract

### Gas Considerations

<Tip>
NEAR uses a TGas (TeraGas) unit system and gas costs are predictable and much lower than Ethereum mainnet, typically costing fractions of a cent in USD terms.

Check warning on line 126 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L126

Did you really mean 'TGas'?

Check warning on line 126 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L126

Did you really mean 'Ethereum'?

Check warning on line 126 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L126

Did you really mean 'mainnet'?
</Tip>

## Integration Guide

### Prerequisites

1. **NEAR Wallet Connection**: Applications need to integrate with NEAR wallet providers
2. **SDK Installation**: Use `@requestnetwork/request-client.js` with NEAR support
3. **Account Registration**: Ensure payment recipients are registered for token contracts

### Basic Payment Flow

```javascript
import { RequestNetwork } from '@requestnetwork/request-client.js';

// Create request for NEAR native payment
const request = await requestNetwork.createRequest({
currency: {
type: 'ETH', // NEAR native uses ETH type
value: 'NEAR',
network: 'near'
},
expectedAmount: '1000000000000000000000000', // 1 NEAR in yoctoNEAR
paymentAddress: 'recipient.near'
});
```

## Limitations

<Warning>
**Current Limitations:**
- NEAR support is SDK-only (not available in Request Network API)
- Crosschain payments to/from NEAR are not supported

Check warning on line 159 in resources/near-blockchain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/near-blockchain.mdx#L159

Did you really mean 'Crosschain'?
- Advanced payment types like batch payments are not implemented
</Warning>

## Developer Resources

- [NEAR Documentation](https://docs.near.org/)
- [NEP-141 Fungible Token Standard](https://nomicon.io/Standards/Tokens/FungibleToken/Core)
- [NEAR Smart Contract Source Code](https://github.com/RequestNetwork/near-contracts)
- [Request Network SDK Documentation]()
8 changes: 8 additions & 0 deletions resources/supported-chains-and-currencies.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: "Supported Chains and Currencies"
description: "Complete list of supported blockchain networks and currencies for Request Network"

Check warning on line 3 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L3

Did you really mean 'blockchain'?
---

## Overview

Request Network supports payments across **10 EVM-compatible blockchain networks** with **553+ currencies** including major cryptocurrencies, stablecoins, and fiat currencies. This comprehensive coverage ensures global accessibility and flexibility for all payment scenarios.

Check warning on line 8 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L8

Did you really mean 'blockchain'?

Check warning on line 8 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L8

Did you really mean 'cryptocurrencies'?

Check warning on line 8 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L8

Did you really mean 'stablecoins'?

## Supported Blockchain Networks

Check warning on line 10 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L10

Did you really mean 'Blockchain'?

<CardGroup cols={2}>
<Card title="Ethereum" icon="ethereum">

Check warning on line 13 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L13

Did you really mean 'Ethereum'?
**Mainnet & Sepolia Testnet**

Check warning on line 14 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L14

Did you really mean 'Sepolia'?

**Native Token:** ETH
**Popular Tokens:** USDC, USDT, DAI, LINK, UNI
Expand All @@ -32,8 +32,8 @@
</CardGroup>

<CardGroup cols={2}>
<Card title="Arbitrum" icon="arbitrum">

Check warning on line 35 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L35

Did you really mean 'Arbitrum'?
**One & Sepolia Testnet**

Check warning on line 36 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L36

Did you really mean 'Sepolia'?

**Native Token:** ETH
**Popular Tokens:** USDC, USDT, ARB, GMX
Expand All @@ -43,7 +43,7 @@
</Card>

<Card title="Optimism" icon="optimism">
**Mainnet & Sepolia Testnet**

Check warning on line 46 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L46

Did you really mean 'Sepolia'?

**Native Token:** ETH
**Popular Tokens:** USDC, USDT, OP, SNX
Expand All @@ -55,7 +55,7 @@

<CardGroup cols={2}>
<Card title="Base" icon="base">
**Mainnet & Sepolia Testnet**

Check warning on line 58 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L58

Did you really mean 'Sepolia'?

**Native Token:** ETH
**Popular Tokens:** USDC, cbETH, DAI
Expand All @@ -66,17 +66,17 @@

<Card title="Additional Networks" icon="network">
**More Networks Available:**
- BSC (Binance Smart Chain)

Check warning on line 69 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L69

Did you really mean 'Binance'?
- Avalanche C-Chain
- Fantom Opera
- Gnosis Chain
- Celo

Check warning on line 73 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L73

Did you really mean 'Celo'?
</Card>
</CardGroup>

## Currency Categories

### Major Cryptocurrencies

Check warning on line 79 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L79

Did you really mean 'Cryptocurrencies'?

<Tabs>
<Tab title="Native Tokens">
Expand Down Expand Up @@ -170,7 +170,7 @@
**Recommended Currencies:**
- **Pricing:** USD, EUR, GBP (familiar fiat terms)
- **Settlement:** USDC, USDT, DAI (stable value)
- **Networks:** Polygon, Arbitrum (lower fees)

Check warning on line 173 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L173

Did you really mean 'Arbitrum'?

[Learn More →](/use-cases/invoicing)
</Card>
Expand All @@ -189,7 +189,7 @@
<Card title="🛒 Checkout" icon="shopping-cart">
**Recommended Currencies:**
- **Customer Choice:** Multiple payment options
- **Conversion:** USD pricing, crypto settlement

Check warning on line 192 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L192

Did you really mean 'crypto'?
- **Popular:** ETH, USDC, MATIC, BNB

[Learn More →](/use-cases/checkout)
Expand All @@ -198,8 +198,8 @@
<Card title="🔄 Subscriptions" icon="repeat">
**Recommended Currencies:**
- **Stability:** USDC, DAI (predictable values)
- **Low Fees:** Polygon, Arbitrum networks

Check warning on line 201 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L201

Did you really mean 'Arbitrum'?
- **Reliability:** Established stablecoins

Check warning on line 202 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L202

Did you really mean 'stablecoins'?

[Learn More →](/use-cases/subscriptions)
</Card>
Expand Down Expand Up @@ -264,7 +264,7 @@
<CodeGroup>
```javascript Native Tokens
// Format: {SYMBOL}-{NETWORK}
"ETH-mainnet" // Ethereum on Ethereum mainnet

Check warning on line 267 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L267

Did you really mean 'Ethereum'?

Check warning on line 267 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L267

Did you really mean 'mainnet'?
"MATIC-matic" // MATIC on Polygon mainnet
"ETH-arbitrum-one" // ETH on Arbitrum One
"ETH-optimism" // ETH on Optimism
Expand Down Expand Up @@ -295,18 +295,18 @@

<CodeGroup>
```javascript Validate Currency
import { validateCurrency } from '@requestnetwork/request-client.js';

Check warning on line 298 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L298

Did you really mean 'validateCurrency'?

// Check if currency is supported
const isValid = validateCurrency('USDC-matic');

Check warning on line 301 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L301

Did you really mean 'isValid'?
console.log(isValid); // true

// Get currency details
const currencyInfo = getCurrencyInfo('USDC-matic');

Check warning on line 305 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L305

Did you really mean 'currencyInfo'?
console.log(currencyInfo);
// {
// symbol: 'USDC',
// network: 'matic',

Check warning on line 309 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L309

Did you really mean 'matic'?
// type: 'ERC20',
// decimals: 6,
// address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
Expand All @@ -333,7 +333,7 @@
<AccordionGroup>
<Accordion title="Price Oracle Sources">
**Primary Data Sources:**
- Chainlink Price Feeds (on-chain)

Check warning on line 336 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L336

Did you really mean 'Chainlink'?
- CoinGecko API (market aggregation)
- CoinMarketCap API (market data)
- DEX aggregators (real-time trading data)
Expand All @@ -343,7 +343,7 @@

<Accordion title="Supported Conversion Pairs">
**Fiat to Crypto:**
- Any fiat currency → Any supported cryptocurrency

Check warning on line 346 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L346

Did you really mean 'cryptocurrency'?
- Real-time exchange rate calculation
- Slippage protection for large amounts

Expand Down Expand Up @@ -380,4 +380,12 @@
>
Start building with your preferred currencies and networks
</Card>

<Card
title="🌐 NEAR Blockchain"

Check warning on line 385 in resources/supported-chains-and-currencies.mdx

View check run for this annotation

Mintlify / Mintlify Validation (requestnetwork-first-draft) - vale-spellcheck

resources/supported-chains-and-currencies.mdx#L385

Did you really mean 'Blockchain'?
href="/resources/near-blockchain"
icon="globe"
>
Learn about NEAR blockchain support and unique features
</Card>
</CardGroup>
68 changes: 68 additions & 0 deletions snippets/contract-buttons.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
export const CopyButton = ({ text, title = "Copy Address" }) => {
const copyToClipboard = () => {
navigator.clipboard.writeText(text).then(() => {
console.log(`Copied ${text} to clipboard!`);
}).catch(err => {
console.error("Failed to copy: ", err);
});
Comment on lines +3 to +7
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console messages should provide more user-friendly feedback. Consider implementing visual feedback (toast notifications, temporary button state changes) instead of relying solely on console logs that users won't see.

Copilot uses AI. Check for mistakes.

};

return (
<button
onClick={copyToClipboard}
title={title}
className="inline-flex items-center justify-center w-8 h-8 text-gray-600 dark:text-gray-400 transition-all duration-300 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 active:scale-95 focus:outline-none focus:ring-2 focus:ring-opacity-50 no-underline contract-button"
style={{
'--primary-color': '#01B089'
}}
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
<style jsx>{`
.contract-button:hover {
color: var(--primary-color) !important;
}
.contract-button:focus {
color: var(--primary-color) !important;
box-shadow: 0 0 0 2px var(--primary-color) !important;
}
.contract-button:active {
color: var(--primary-color) !important;
}
`}</style>
Comment on lines +23 to +34
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same CSS styling block is duplicated between CopyButton and ExternalLinkButton components. Consider extracting this into a shared constant or moving it to a common stylesheet to reduce code duplication.

Copilot uses AI. Check for mistakes.

</button>
);
};

export const ExternalLinkButton = ({ href, title = "View on Block Explorer" }) => {
return (
<button
onClick={() => window.open(href, '_blank', 'noopener,noreferrer')}
title={title}
className="inline-flex items-center justify-center w-8 h-8 text-gray-600 dark:text-gray-400 transition-all duration-300 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 active:scale-95 focus:outline-none focus:ring-2 focus:ring-opacity-50 no-underline contract-button"
style={{
'--primary-color': '#01B089'
}}
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
<polyline points="15,3 21,3 21,9"></polyline>
<line x1="10" y1="14" x2="21" y2="3"></line>
</svg>
<style jsx>{`
.contract-button:hover {
color: var(--primary-color) !important;
}
.contract-button:focus {
color: var(--primary-color) !important;
box-shadow: 0 0 0 2px var(--primary-color) !important;
}
.contract-button:active {
color: var(--primary-color) !important;
}
`}</style>
</button>
);
};