# Getting Started

## What is the 1Money Network?

**The 1Money Network is the world’s first Layer 1 blockchain designed exclusively for stablecoin payments and real-world assets (RWA).** It overcomes critical blockchain limitations that impede wider stablecoin/RWA adoption, including reliance on speculative native tokens for network access, slow settlement times, volatile gas fees, and compliance risks. The 1Money Network is engineered to solve all of these issues, resulting in the fastest, cheapest, and most compliant protocol dedicated solely to stablecoin and RWA use cases.


# Overview

## Why 1Money Network?

Key features that set the 1Money Network apart from existing payment solutions include:

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Build Exclusively for Stablecoins and RWAs</strong></td><td><p></p><p>Engineered to be the fastest, cheapest, and most secure protocol for sending and receiving stablecoins and RWAs.</p></td><td></td><td></td></tr><tr><td><strong>No Speculative Asset Required</strong></td><td><p></p><p>Transaction fees are paid directly in the stablecoin being used—no separate “gas token” needed.</p></td><td></td><td></td></tr><tr><td><strong>Instant Transaction Confirmation</strong></td><td><p></p><p>Send and receive stablecoins instantly with all transactions completed in &#x3C;1 second.</p></td><td></td><td></td></tr><tr><td><strong>Lowest-Cost, Fixed Fees</strong></td><td><p></p><p>Industry-low transaction fees that are fixed and never variable.</p></td><td></td><td></td></tr><tr><td><strong>Unparalleled Scalability</strong></td><td><p></p><p>Designed to support over 250,000 transactions per second (TPS), with potential for unlimited growth.</p></td><td></td><td></td></tr><tr><td><strong>Built-in Compliance</strong></td><td><p></p><p>Includes native compliance mechanisms that enable automation of sanctions controls. </p></td><td></td><td></td></tr></tbody></table>


# Developer Guide

## Explore the different ways to interact with the 1Money Network.&#x20;

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Quick Start</strong></mark><br>Connect to the 1Money Network instantly. </td><td><a href="/pages/lis7oV8927Jn25BR6XXZ">/pages/lis7oV8927Jn25BR6XXZ</a></td><td></td></tr><tr><td><mark style="color:blue;"><strong>User Guides</strong></mark><br>Integration guides for <a href="/pages/DsPuS5o8YBGQ1hsysPCu">Custodians, Exchanges</a> and <a href="/pages/GfBrbew97teYAmlypN7C">Issuers</a>. </td><td><a href="/pages/8RfJMtb2XnHJkBV8AoW8">/pages/8RfJMtb2XnHJkBV8AoW8</a></td><td></td></tr><tr><td><mark style="color:blue;"><strong>API's</strong></mark><br>Build with our SDKs, REST APIs, and WebSocket endpoints.</td><td><a href="/pages/jVwZTcfxsRyUOSMnpWiP">/pages/jVwZTcfxsRyUOSMnpWiP</a></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Core Concepts</strong></mark><br>Understand the design and concepts behind the 1Money protocol, system architecture, and operational model. </td><td><a href="/pages/Zvukm7MAGL6ooitMTmpY">/pages/Zvukm7MAGL6ooitMTmpY</a></td><td></td></tr><tr><td><mark style="color:blue;"><strong>Interact</strong></mark><br><a href="https://faucet.1money.network/token-creation">Issue</a> and <a href="https://faucet.1money.network/token-creation">receive</a> test tokens in the Developer Lab. <br><br></td><td><a href="https://faucet.1money.network/token-creation">https://faucet.1money.network/token-creation</a></td><td></td></tr></tbody></table>


# Quick Start

## Connect to the 1Money Network&#x20;

Get started with the 1Money Network using our hosted REST API and WebSocket endpoints.

Full API documentation is available [here](https://developer.1moneynetwork.com/integrations/overview).&#x20;

<table><thead><tr><th width="100">Network</th><th>REST Endpoints</th><th>Websocket</th></tr></thead><tbody><tr><td><strong>Mainnet</strong></td><td>Coming soon.</td><td>Coming soon. </td></tr><tr><td><strong>Testnet</strong></td><td><ul><li><a href="https://api3.testnet.1money.network">https://api.testnet.1money.network</a></li><li><a href="https://api1.testnet.1money.network">https://api1.testnet.1money.network</a></li><li> <a href="https://api2.testnet.1money.network">https://api2.testnet.1money.network</a></li></ul></td><td><ul><li><a href="wss://ws.testnet.1money.network/">wss://ws.testnet.1money.network</a></li><li><a href="wss://ws1.testnet.1money.network/">wss://ws1.testnet.1money.network</a></li><li><a href="wss://ws2.testnet.1money.network/">wss://ws2.testnet.1money.network</a></li></ul></td></tr></tbody></table>

{% hint style="info" %}
Testnet API's are currently rate limited at 300 requests / minute per IP address.
{% endhint %}

## Try APIs directly in your terminal

You can test the following APIs directly from your terminal:

#### Get latest checkpoint number

```sh
curl "https://api.testnet.1money.network/v1/checkpoints/number"
```

Example result:&#x20;

```sh
{
  "number": 58492
}
```

{% hint style="info" %}
**Checkpoints** are a collection of Transactions, where each Transaction can contain a set of Instructions (with Transfers being the most common) . More about Checkpoints [here](https://developer.1moneynetwork.com/core-concepts/the-1money-protocol#forming-a-checkpoint).
{% endhint %}

#### Get checkpoint by number

```sh
curl "https://api.testnet.1money.network/v1/checkpoints/by_number?number=10&full=false"
```

Example result:

```sh
{
  "hash": "0x3c4d157a827cbaef144349e9a0b6ba39764e2d616fe85d669ac3bf2cf29ee312",
  "parent_hash": "0x26bbcdd24ace954d2d4656711a529626f2f413d18e64450d173050b5aed1d0e6",
  "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "transactions_root": "0x05d425899eaaed512e384adc5009526eb3f885e09e9c254dbf2684c42e54e701",
  "receipts_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "number": 10,
  "timestamp": 1744390026,
  "extra_data": "",
  "transactions": [
    "0x0916abb8fe15985516629a4ed7b0f39cbfad0856cd5823a07740f8a3601be4aa",
    "0x072738281067c4427022637b7c6005f8c7b1cb25043aa544f583773566f1fc54",
    "0xe2d5698437ad20523163a17073aa3bc7b2279ffb1beb91674347eec05cfeb639",
    "0xc4e2bfea352f5a070042bd68c54e42e1d80432d7e00f5fb410d6cba8f934b318",
    "0x5676071840c3163108eda8929da6cfe6f8daf451733013586fd766a307a9d7c5",
    "0xd74e869a1b5c1c9133fbf9ffb0e17d37522729bea20b7ec409c3ae1459ff773e",
    "0x8adc3c5a7f831a45cb4300b401f953420fb9d8f16a124d8a07d39aa34162b6c2",
    "0x6e3157a17ffd5bd865b5d5c8b849a55eaf9fd105fa662ffb3035a935f0a7c754",
    "0x732df4b54704af8c371a6ecbaf08e003bfab44c382e2b6fe4a53f6d47c98f94e",
    "0x870773174290d77138c0d0813578f83b2c507e284d99bc8b1b1958431ff83b86"
  ],
  "size": 10
}
```

For more detailed examples and key functional overviews, explore our [User Guides](/user-guides/custodians-and-centralized-exchanges-cexs).


# What is 1Money Network?

## An Introduction: <a href="#introduction-to-1money-network" id="introduction-to-1money-network"></a>

The 1Money Network is a next-generation blockchain protocol designed exclusively for **stablecoin payments**—delivering a payments network that is fast, cost-effective, and compliant at its core. Rather than aiming to serve multiple use cases like many existing blockchain platforms, 1Money focuses on *one thing*: providing the world's best experience for transacting with stablecoins.

1Money is not just another blockchain but a focused payment infrastructure, aiming to serve as a bridge between *Web3 innovations* and the *mainstream financial world*. By delivering instant, secure, and compliant stablecoin payments at global scale, it sets a new standard for digital value transfer.


# Why 1Money Network?

1Money was built to tackle the persistent *problems* in digital payments and bring stablecoins to the masses:

* **Unpredictable fees & delays:** Many blockchains suffer from long confirmation times and variable fees. 1Money’s BCB (Byzantine Consistent Broadcast) protocol is designed to eliminate these friction points, making payments as quick and affordable as sending a message.
* **Regulatory uncertainty:** Its built-in compliance mechanisms (by default, not as an afterthought) make it attractive for both consumers and large-scale enterprises.
* **Complex and exclusionary systems:** With direct support for KYC/AML and user-friendly fee handling, 1Money lowers the barrier for both businesses and users—particularly those in regions underserved by traditional banks.
* **Cross-border transactions:** By supporting multiple stablecoins pegged to various currencies and enabling instant remittance, 1Money is positioned for global payments, e-commerce, and international transfers.


# Key Features

* **Instant, Low-cost Payments:** Users benefit from transaction confirmations in less than a second and ultra-low, fixed network fees—without congestion based, volatile “surge pricing” typical of many blockchains.
* **Multicurrency Support:** The protocol natively supports multiple stablecoin tokens, each pegged to different fiat currencies, providing a truly global payment solution.
* **Superior Security & Compliance:** With a Byzantine Consistent Broadcast BFT (Byzantine Fault Tolerant) consensus and embedded compliance features (like automated sanctions controls and KYC/AML-verified validators), 1Money aims for best-in-class safety and regulatory alignment.
* **Predictable Fees:** Fees are charged directly in the stablecoin being used—eliminating the need for a separate “gas token.” Partnerships are expected to enable even *gasless* transactions for users.
* **SaaS-enabled fee models:** 1Money Network enables a Saas capable fee model where Issuers and Enterprises can enable for their customers zero fees (while paying a subscription-based fee model on behalf of their users).&#x20;
* **Massive Scalability:** Capable of over 250,000 transactions per second, designed to accommodate rapid mainstream and global payments.


# The Consensus Model

### What Makes Consensus Different on 1Money?

Unlike traditional blockchain networks that rely on bundling transactions into blocks, the 1Money Network achieves consensus using a [**Byzantine Consistent Broadcast (BCB)** ](/introduction/what-is-1money-network/what-is-bcb)protocol, layered atop a Byzantine Fault Tolerant (BFT) system. This modern approach allows the network to provide **instant transaction finality**—payments are confirmed within milliseconds, not minutes—making it exceptionally well-suited as a global stablecoin payments network.

### How Does It Work?

**Key Concepts:**

* **No Blocks, Only Consistency:** Instead of building blocks, the 1Money Network operates as a broadcast-based protocol. Every legitimate transaction reaches finality at the individual transaction level once a quorum (two-thirds or more) of permissioned validators have signed it—no need to wait for a block to be produced.
* **Validators:** These are permissioned nodes run by Organizations vetted for compliance and reputation. They collectively run the consensus protocol and check transactions for correctness, applying network rules to preserve security and performance.
* **Quorums & Certificates:** Progress on the network is dictated by signatures: when enough validators sign a transaction or a state update, a “certificate” is formed, attesting to its validity. This process ensures trustless acceptance of payments and state without centralized control.
* **Checkpoints:** Periodically, the network forms a “checkpoint,” which is a snapshot of the current state (all accounts, balances, etc.). Validators cryptographically agree on checkpoints using certificates. This allows the network to efficiently discard old data and remain scalable—even at high throughput rates.
* **Epochs:** The set of active validators remains fixed during an epoch. Validator set changes or governance updates are coordinated with checkpoints, but never disrupt transaction processing or settlement.

### What Problems Does the 1Money Consensus Solve?

* **Instant Finality:** Each valid transaction is final as soon as the network sees a sufficient number of signatures—no risk of reversal, no confirmation delays.
* **Scalability:** By leveraging messaging and horizontal sharding (where each additional node increases network capacity), 1Money can handle over 250,000 transactions per second. The design easily scales to meet global payment demand.
* **Predictable Cost:** Fees are paid in the same token being transferred; no special “gas” token is required. This makes transaction costs simple and fair.
* **Network Liveness:** The BCB protocol is designed to handle validator failures or network issues. If some validators go offline or act maliciously, the honest majority can still move the network forward.
* **Resilience and Compliance:** All validators must undergo thorough KYC/AML processes for permissioning, ensuring network safety and accountability at scale.

### Why Does This Matter?

The result is a payments network that is **faster, safer, and more transparent** than legacy blockchains—a key advantage for stablecoins moving at the speed of commerce. Users get **real instant settlement** with no risk of “reorgs,” lost funds, or surprise fees. High scalability ensures 1Money can support everything from small consumer payments to major institutional transfers on a global scale.


# What is BCB?

### How does Byzantine Consistent Broadcast work?

Imagine a group of friends is splitting a bill at a restaurant. To make sure everyone pays their fair share, they must all agree on who paid what. However, they’re not sitting at the same table—some are in the garden, some in the main room, and they’re passing messages through busy waiters. Some messages might get lost, repeated, or even misheard.

The group needs a process that guarantees, no matter how mixed-up the messaging gets—or if someone tries to sneakily give wrong information—everyone will eventually agree on the correct total.

**That’s what the Byzantine Consistent Broadcast (BCB) model does:**

* Every “friend” (validator) receives each payment message.
* They check it's correct, sign it, and share their approval with the group.
* Once enough friends (over two-thirds) confirm the same message, it’s locked in—everyone trusts it’s real and final, even if not all friends were reachable, or a few tried to cheat.
* Unlike organizing everything at the end in a big group (batching payments into blocks, like most blockchains), BCB lets each payment be settled as soon as everyone relevant has agreed. It’s instant and fair—no waiting for the waiter to organize the whole table.

**In summary:**\
The BCB model is like passing notes around a room until nearly everyone says “yes” to one, making it safe to act—even if a few notes go missing or some people aren’t honest. This approach gives 1Money instant, tamper-proof finality for every transaction, making it ideal for fast, global payments.


# Accounts

### What is an Account on 1Money?

On the 1Money Network, an **account** represents a digital identity that can send, receive, and hold stablecoin-based assets on the network.&#x20;

Each account is identified by an address (public key), which keeps track of their overall balance and nonce (transaction counter).

***

### Public and Private Keypairs

At its core, every 1Money account is defined by a **cryptographic keypair**:

* **Public Key (Address):** Think of this as your unique digital address—used by others to send you tokens and for you to identify yourself across the network.
* **Private Key:** This is your secret code. It proves ownership and allows you to sign transactions, moving assets or managing your account.

**Keep your private key secret and backed up!** Anyone with your private key can control your assets on 1Money.

***

### 1Money’s Cryptography Model

* **Standardized Cryptography:**\
  1Money Network uses modern, secure cryptographic algorithms for accounts—Keccak-256 (SHA-3), the same elliptic curve used by Ethereum.
* **Digital Signatures:**\
  When sending a transaction, you use your private key to create a digital signature. Validators check this signature using your public key to ensure authenticity and prevent tampering.

***

### Ethereum (ETH) Address Compatibility

A major convenience of 1Money Network:\
**You can reuse your existing Ethereum address** (if you have an ETH wallet and keypair) to receive, hold, and send digital assets on 1Money. There’s no need to generate new keys or memorize a new address format.

* **How does it work?**
  * 1Money’s account addresses are derived using the same formula as Ethereum: a hash of your Keccak-256 (SHA-3) public key, shortened to the standard address length.
  * Any wallet or application that lets you export/import your ETH keys will also work on 1Money—enabling seamless onboarding from existing crypto platforms.

***

### Signature Schemes

* **Default Scheme:** Keccak-256 (SHA-3) \
  The default digital signature algorithm is ECDSA over the Keccak-256 (SHA-3) curve, for maximum compatibility and security.
* **Signature Process:**
  * Construct your transaction (e.g., send $10 USDC)
  * Sign the transaction payload with your private key—generating a unique signature.
  * Submit both the transaction and its signature to the network.
  * Validators verify your signature against your public key (your account address).

***

### Creating, Importing, and Managing Accounts

* **Creating a New Account:**\
  Most wallets will generate a fresh secp256k1 keypair for you, displaying your address.
* **Importing Existing Keys:**\
  If you already use MetaMask or another ETH wallet, you can import your recovery phrase/private key into a 1Money-compatible wallet to control the same address.
* **Backup and Recovery:**\
  Securely store your recovery phrase or private key offline. Anyone with access to these can access your assets; if you lose them, you lose your funds.

<br>


# Transactions

How Transactions Work on 1Money Network

### Transaction Overview

On the 1Money Network, **transactions** are the core mechanism for moving value and interacting with the protocol. Every payment, mint, burn, account cancellation, and recovery operation is handled as a transaction—processed individually, instantly, and securely through the network’s innovative consensus design.

### Payment Transaction Lifecycle

1. **Sign:**\
   The sender creates and cryptographically signs a payment message, specifying the recipient(s), amount(s), and incrementing their account nonce for uniqueness.
2. **Broadcast:**\
   The signed payment is either submitted directly to all validators or relayed via wallets or special relayer services, ensuring wide and reliable message delivery.
3. **Validator Check:**\
   Each validator independently verifies that:

   * The payment message is correctly formatted.
   * The nonce is correct (one higher than the previous).
   * The sender’s account has sufficient balance (including the projected transaction fee).

   Validators only accept and sign the payment if it is valid and no other pending transaction with the same nonce exists.
4. **Certification (Finality):**\
   Once a quorum (majority) of validator signatures is collected, the sender or relayer aggregates them into a **payment certificate**. This certificate serves as an irrefutable proof of consensus—the transaction is now *final* and cannot be reverted.
5. **Acceptance:**\
   Validators update their state to reflect the effects of the transaction (such as adjusting balances and nonces), and remove any previously “pending” versions of the message.

### Specialized Transaction Types

* **Mint & Burn:**\
  Creating (minting) or destroying (burning) tokens uses the same transaction flow, with protocol rules ensuring only the special “mint wallet” can issue or burn assets. These transactions incur no fees and are always valid (the mint wallet is never limited by balance).
* **Pause:**\
  Issuers can also due to extenuating circumstances, pause operations on their token. This immediately freezes all activity on the token, until the token is upaused.&#x20;
* **Cancellations:**\
  If a payment has not yet reached quorum or the sender wants to revoke a pending transaction, they can initiate a cancellation message. Cancellations supersede pending payments with the same nonce, and typically incur a slightly higher fee due to their additional network traffic.
* **Recovery:**\
  In cases of conflicting transactions (e.g., double-spending attempts resulting in account locks), a recovery transaction can be submitted. This proves, with evidence, that no payment can reach quorum for the given nonce, allowing the account state to advance and resume normal operation. Recovery fees reflect their extra operational cost.

### Instant Finality and Fair, Simple Fees

* Transactions achieve **instant finality**: once a payment certificate is formed, it is globally accepted, with no blocks or confirmation delays.
* **Fees** are always collected in the token being transferred—no separate “gas token” is needed. The sender pays the fee, except in rare cases (e.g., specialized fee delegation), making payment flows simple and predictable. Enterprises and Issuers have the option to zero out fees for their Users and pre-pay fees (to be covered in detail in the Fee section).&#x20;

### Why This Matters

This transaction model delivers a user experience more like traditional digital payments than legacy blockchains: **fast, final, secure, and easy to use**. Developers and users can rely on transactions processing in real time, with clear outcomes and no guesswork about network fees or confirmation waiting periods.

<br>


# Fees and (No) Gas

### How Fees Work on 1Money

On the 1Money Network, the approach to fees is **simple, transparent, and predictable**—a radical departure from most layer-1 blockchains.

* **No separate gas token:** On 1Money, the *fee* for a transaction is always paid in the same stablecoin that is being transferred. If you’re sending USDC, for example, the transaction fee is deducted in USDC—eliminating the need to acquire or manage a special gas or utility token just to use the network.
* **Fixed, predictable fees:** Fees are set by on-chain governance and remain stable during an epoch. There is no surge pricing, no auctioning of blockspace, and no “congestion fees” driven by demand spikes. This predictability makes payment flows intuitive and easy for users and businesses.
* **Ultra-low cost:** Because 1Money is architected for high throughput and efficiency, the protocol can sustain extremely low transaction fees even at massive scale. High validator throughput, efficient design, and the absence of block-based confirmation delays make this possible.

### How Is This Different From Traditional L1 Blockchains?

| Feature                  | 1Money Network                           | Traditional L1s (Ethereum, Solana, Cosmos, etc.)                   |
| ------------------------ | ---------------------------------------- | ------------------------------------------------------------------ |
| Fee Token                | Same as payment token (e.g. USDC, EURC)  | Separate gas token (e.g. ETH, SOL, ATOM)                           |
| Fee Model                | Fixed per-transaction, set by governance | Variable, dynamic based on “gas price,” demand, and congestion     |
| Congestion/Surge Pricing | **None**; fees do not rise under load    | Common—users must pay more to have transactions included faster    |
| Complexity for Users     | Simple; no need for extra tokens         | Complex; users often must swap for gas token                       |
| Predictability           | Fully predictable                        | Fees fluctuate by network activity, sometimes spiking dramatically |

### What Happens to Fees?

* Collected transaction fees are immediately credited into designated network accounts (such as validator pools or for protocol operations) and are reflected at each checkpoint.
* Specialized transactions—like minting or burning tokens—**incur no fees.**

### Why It Matters

This unique fee model ensures that 1Money behaves more like mainstream payment networks—**users know upfront what they’ll pay, never need to hunt for “gas” tokens, and aren’t hit by unpredictable surcharges** during busy periods. Businesses can price services and build payment apps with confidence, without concerns over fee volatility.

For developers, this approach removes the biggest pain points of onboarding new users to Web3 payments—making the 1Money fee experience as seamless as the best fintech apps.


# The SaaS Fee Model (for Enterprises)

### Some Real World Examples:

1. An traditional Enterprise would like to pay all of its subcontractors through a stablecoin it has issued in as simple, streamlined and easy manner as possible, given most of the subcontractors are not savvy with Web3 gas token models. With 1Money Network, it can sponsor fees for their entire ecosystem upfront and then gradually add fees (in the token transacted) over time as adoption takes hold.
2. A global remittance provider can subscribe to a high-volume plan, pre-fund fees in multiple Stablecoins, and enable zero-fee experience for their users—removing hidden costs from each transaction and boosting adoption.
3. An issuer of RWA's would like to accelerate adoption of its asset by enabling zero transaction fees for all holders of the asset. This is so that users do not have complications when transferring the asset due to gas requirements and simplify financial accounting for users.&#x20;

### Overview of 1Money Network's Fee Model

In addition to its user-friendly, predictable fee structure, the 1Money Network introduces a bespoke **Software-as-a-Service (SaaS) fee model** tailored for stablecoin issuers, fintechs, and enterprise partners. This model enables organizations to subscribe to a range of fee plans and seamlessly pre-pay transaction costs—removing on-chain friction for end-users and opening new possibilities for embedded payments.

### Key Features

* **Subscription-Based Fee Plans:**\
  Enterprises and issuers can choose from several subscription tiers, each offering a defined bundle of monthly or annual transaction volume, with straightforward rates and paid in fiat or stablecoins.&#x20;
* **Delegated Fee Payment:**\
  Using the prepay model, businesses can sponsor some or all transaction fees for their customers—ideal for use cases such as digital wallets, e-commerce platforms, cross-border remittance, or embedded finance.
* **Customizable Packages:**\
  Enterprises can work with 1Money to tailor fee plans—including high-volume “all-you-can-send,” capped microtransaction, or special rates for promotional periods—to best fit their product and growth strategy. Fee models can be fixed or variable based on basis points.&#x20;

### Benefits of the SaaS Fee Model

* **Frictionless Onboarding:**\
  Users do not need to acquire stablecoins for gas or even hold a wallet balance to begin interacting—enterprises absorb the fee complexity and fund transaction costs directly.
* **Cost Predictability:**\
  Enterprises know their monthly or annual spend ahead of time, simplifying budgeting, compliance, and economic modeling.
* **Enhanced User Experience:**\
  Offering “fee-free” or sponsored transactions makes payment flows as easy as leading fintech apps, removing a major obstacle to mainstream adoption.
* **Scalable for Growth:**\
  As user and volume numbers rise, partners can seamlessly upgrade their plan or top up fee pools without network disruption.

###

<br>


# The Transaction Hierarchy

### Transaction Hierarchy: Transactions, Checkpoints, and Epochs on 1Money Network <a href="#transaction-hierarchy-transactions-checkpoints-and" id="transaction-hierarchy-transactions-checkpoints-and"></a>

### Introduction

The 1Money Network is engineered for speed, security, and scalable payments. To achieve these goals, it organizes activity within a structured **transaction hierarchy**—where individual transactions are grouped by checkpoints, all within well-defined epochs. Understanding this hierarchy provides a clear picture of how 1Money achieves instant settlement, reliable state management, and seamless network upgrades.

<figure><img src="/files/wtX3VCVRXSuLaEQCLsuI" alt=""><figcaption></figcaption></figure>

***

### 1. Transactions: The Atomic Unit

**Transactions** are the most granular building block on 1Money. Every payment, token mint, burn, cancellation, or account recovery action happens as a transaction. Each transaction:

* Is signed by the sender and verified independently by every validator.
* Updates the sender and recipient account state upon finalization.
* Achieves instant finality when a quorum of validator signatures (a “certificate”) is formed.
* Carries a strictly incremented nonce, ensuring every operation’s order and uniqueness.

Transactions are processed continuously and individually—unlike many blockchains, they are not bundled into blocks, so confirmation is instant and cannot be reversed.

***

### 2. Checkpoints: The Network’s Ledger Snapshots

**Checkpoints** are periodic, cryptographically-signed snapshots of the network’s entire state—account balances, nonces, and key protocol parameters. They serve vital functions:

* **State Consistency:** Validators collectively agree on the network state at each checkpoint, preventing any drift or forks.
* **Efficient Data Handling:** Old transactional data up to the latest checkpoint can safely be pruned, keeping network storage lean without sacrificing audibility.
* **Recovery & Resilience:** In rare network interruptions or validator reinstatements, checkpoints offer a reliable way to restore or re-sync state across all nodes.

A checkpoint is formed when validators build consensus over a large batch of completed transactions. It records the cumulative effect of all finalized transactions up to that point, providing an authoritative history for audit or compliance purposes.

***

### 3. Epochs: Governance and Validator Stability

**Epochs** define fixed periods during which the network’s validator set and certain protocol parameters remain constant. Their primary roles:

* **Validator Cohesion:** The validator list (who can create certificates and checkpoints) is only adjusted at epoch boundaries. This stability eliminates mid-stream changes that might threaten consensus.
* **Governance Upgrades:** Any protocol upgrades, fee adjustments, or major governance actions are scheduled to take effect at epoch transitions, ensuring a smooth network evolution.
* **Operational Predictability:** Enterprises and users enjoy predictable network settings and fees throughout each epoch, aligning with financial and technical planning.

At an epoch’s conclusion, the network can introduce a new validator set and protocol rules, with changes coming into effect cleanly at the next checkpoint.

***

### How They Work Together

* **Transactions**: Individual user and system actions.
* **Checkpoints**: Regular “save points” that lock-in all completed transactions and clean up the ledger.
* **Epochs**: Framework for validator management and protocol upgrades.

This layered structure:

* Enables **instant finality** for payments,
* Guarantees **network consistency and auditability**,
* And allows for **safe upgrades and governance** without interruption.

By separating the concerns of transaction execution, state crystallization, and governance change, 1Money achieves a highly secure, efficient, and scalable payments platform ready for mainstream adoption.


# Built-in Compliance

### Compliance Features on 1Money Network <a href="#compliance-features-on-1money-network" id="compliance-features-on-1money-network"></a>

### Introduction

Recognizing the crucial role of compliance in digital payments, the 1Money Network was designed from the ground up to meet the regulatory requirements of enterprises, financial institutions, and global payment platforms. Its integrated compliance framework enables seamless enforcement of regulations and policies, all without compromising the user experience or network efficiency. The following are built-into the network at the protocol level, accessible via REST APIs and SDKs.&#x20;

***

### Whitelisting and Blacklisting

* **Address Whitelisting:**\
  Certain use cases, such as regulated stablecoin issuance or enterprise platforms, may require that only authorized addresses can participate. Whitelisting functionality allows for the creation of “permissioned zones” on the network, where only pre-approved accounts can hold or transfer specific tokens.
* **Blacklisting:**\
  The system supports immediate blacklisting of addresses involved in fraud, hacking, or regulatory non-compliance. Once blacklisted, these accounts are instantly prevented from transacting network-wide.
* **Token-Level Enforcement:**\
  Whitelisting and blacklisting are applied at the token level, providing flexibility for issuers and businesses to tailor the compliance level of their product lines.

***

### Authority Management System

* **Permissioned Authority Management:**\
  A robust authority management system governs who can update whitelists, and blacklists, pause tokens and update metadata. Organizations can choose to delegate role-based functions to specific parties, with assigned accounts that require signatures for performing actions.&#x20;
* **On-Chain Auditing:**\
  Every change to compliance lists—or to the rules and roles that manage them—is tracked immutably on-chain. Comprehensive audit trails enable external regulators and internal teams to review actions at any time.
* **KYC/AML for Validators and Partners:**\
  All validators must undergo Know Your Customer (KYC) and Anti-Money Laundering (AML) due diligence prior to participation, ensuring only responsible and legitimate actors secure the network and enforce compliance measures.

***

### Sanctions Blocking&#x20;

(coming soon)&#x20;

* **Automated Sanctions Screening:**\
  All transactions on the 1Money Network are checked in real time against up-to-date global sanctions lists (such as OFAC, EU, UN, and others). This ensures sanctioned entities or addresses are immediately blocked from sending or receiving payments.
* **Preventative Enforcement:**\
  Attempts to interact with sanctioned accounts—whether directly or through relay—are automatically refused by validators at the consensus layer, providing proactive risk management and insulating network participants from inadvertent violations.

***

### Why Compliance Matters

The integrated compliance capabilities of 1Money empower partners to launch fully regulated payment applications that meet both local and international requirements. This approach protects users and institutions, enables global growth, and builds trust with both regulators and enterprises.

By embedding these features directly within the protocol—and ensuring delegated authority, transparent oversight, and native sanctions enforcement—1Money delivers a payments platform ready for mainstream adoption in regulated environments and beyond.


# Stablecoins

No gas token requirement&#x20;

demonstration Instant finality&#x20;

explanation with live examples&#x20;

Compliance features overview with practical scenarios


# Tutorials


# Working with Accounts


# Make a Payment Transaction


# Events

How to monitor and listen for events


# Issuing a Token


# Setup the Authority Management


# Blacklist an Account


# Pause a Token


# Custodians & Centralized Exchanges (CEXs)

## Introduction

***

1Money's APIs enable seamless integration with automation, security, and compliance workflows common across custodian and centralized exchanges.

Key features include:

* Out-of-the-box support for [tracking account balances](#id-5.-balance-retrieval), [recent transactions](#id-5.-tracking-balance-changes), and [payment transfers](#id-6.-transferring-assets).
* Simplified management of accounts, thanks to the 1Money protocol’s gasless transactions, low latency, and high throughput—even during periods of high market volatility.
* Compatibility with Ethereum’s elliptic curve cryptography and address format, facilitating integration with MPC (Multi-Party Computation) signing processes.

## Integration Guide

***

The following provides How-To's on common functions for Custodians and Exchanges.&#x20;

1. [Infrastructure](#id-1.-infrastructure)
2. [Managing accounts](#id-2.-account-management)
3. [Asset standards](#id-3.-asset-standards)
4. [Retrieving balances](#id-4.-retrieving-balances)
5. [Tracking balance changes](#id-5.-tracking-balance-changes)
6. [Transferring assets](#step-6-transferring-assets)

## 1. Infrastructure

***

Get started immediately by connecting directly to 1Money Network's publicly available [**Rest API Endpoints and Websockets**](/integrations/network-access).&#x20;

## 2. Account management&#x20;

***

### <sub>Address and private key format</sub>

The 1Money Network uses the **same elliptic curve signature scheme and account addresses as Ethereum**, ensuring a familiar user experience.

Based on the Ethereum standard, a private key is made up of 64 hex characters and can be encrypted with a password.&#x20;

Example:

```sh
Private Key: 0x6d8e4df8f5177ed29a9c1742e1b774a2a6e1e7a2e397ad03b1b57e0b8a118536
```

The public key is generated from the private key using the Elliptic Curve Digital Signature Algorithm. You get a public address for your account by taking the last 20 bytes of the Keccak-256 hash of the public key and adding `0x` to the beginning.

Example:

```sh
Public Key: 0x5e97870f263700f46aa00d967821199b9bc5a120
```

### <sub>Account Creation</sub>

Account public/private keypairs from Ethereum can be reused seamlessly on the 1Money Network.&#x20;

New Accounts can be generated using any wallet within Ethereum and simply reused on 1Money.&#x20;

Wallet integrations both with popular existing wallets and native solutions will be coming in the near future.&#x20;

## 3. Asset standards

***

Tokens on the 1Money Network share the following attributes:

1. Token value can support 0–18 decimals.
2. Each token has a `master_authority`, designating the original issuer.

Use the [get token metadata](/integrations/rest-apis/tokens/get-token-metadata) API to pull specific metadata on a token.&#x20;

Example result:&#x20;

```sh
{
  "symbol": "LTEST2",
  "master_authority": "0x4f9f49f7f437da81fcc1b0cf82edb510ffe4b92c",
  "master_mint_authority": "0x0000000000000000000000000000000000000000",
  "minter_authorities": [],
  "pause_authority": "0x0000000000000000000000000000000000000000",
  "burn_authorities": [],
  "black_list_authorities": [],
  "black_list": [],
  "metadata_update_authority": "0x0000000000000000000000000000000000000000",
  "supply": "100000000000000",
  "decimals": 6,
  "is_paused": false,
  "is_private": false,
  "meta": null
}
```

## 4. Balance Retrieval

***

Use the [get account by token](/integrations/rest-apis/accounts/get-account-by-token)  API with your `account address` and `token address` as inputs to fetch balances.

Example result:&#x20;

<pre class="language-sh"><code class="lang-sh"><strong>{
</strong>  "token_account_address": "0x204ebf86a36fb93b80d077e55484bed31537b200",
  "balance": "99750399380000",
  "nonce": 2470
}
</code></pre>

## 5. Tracking balance changes

***

{% hint style="info" %}
**Checkpoint**:

The 1Money Network is a broadcast-based network which is different from a blockchain network. A checkpoint in the 1Money Network represents a specific point in time that captures the current state of each account.

Learn more in the [**system components**](/core-concepts/system-components) section.&#x20;
{% endhint %}

Balance changes can be queried by:&#x20;

1. Getting the [get checkpoint latest number API](/integrations/rest-apis/checkpoints/get-the-latest-checkpoint-number) to find the network's latest checkpoint number&#x20;
2. Compare the network's checkpoint number to your local checkpoint number&#x20;
3. If they match, use the [get checkpoint by number API](/integrations/rest-apis/checkpoints/get-checkpoint-by-number) to pull all the transaction data from that checkpoint &#x20;
4. Input the latest checkpoint number ( `number=`) and set `&full=true` to pull the transaction data

Example result:&#x20;

```sh
{
  "extra_data": "text",
  "hash": "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c",
  "number": "1500",
  "parent_hash": "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c",
  "receipts_root": "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c",
  "state_root": "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c",
  "timestamp": "1739760890",
  "transactions_root": "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c",
  "size": 1,
  "transactions": [
    {
      "data": {
        "decimals": "18",
        "master_authority": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC742Ab",
        "symbol": "USDX"
      },
      "transaction_type": "TokenCreate"
    },
    {
      "chain_id": "21210",
      "checkpoint_hash": "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c",
      "checkpoint_number": "10",
      "fee": "10",
      "from": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC742Ab",
      "hash": "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c",
      "nonce": "10",
      "signature": {
        "r": "72956732934625920503481762689501378577921804342307439094906376029324416116949",
        "s": "29902520081700531224291681396692026253288382272435451874524203378285409371412",
        "v": "1"
      },
      "transaction_index": "10"
    }
  ]
}
```

## 6. Asset Transfers

***

To transfer assets:&#x20;

1. Use the[ submit payment API](/integrations/rest-apis/transactions/submit-payment) to prepare the transaction with a private key signature
2. Submit a signed transaction to the network.
3. Upon submission, a transaction hash is returned.
4. Use [get transaction receipt by hash](/integrations/rest-apis/transactions/get-transaction-receipt-by-hash) to check on the status of your transaction.

Transactions are finalized instantly—no need to wait for checkpoint confirmations.

<br>

<br>


# Issuers

## Introduction

***

Robust, role-based issuance and compliance features are offered on the 1Money Network.&#x20;

This guide covers:

* Token access types (public vs. private)
* Authority hierarchy and permissions (to assign and revoke priviledges)
* Token operations (mint, burn, pause, blacklist, whitelist, metadata updates)
* Using the API for authority management

A [comprehensive set of APIs and SDKs](/integrations/overview) are provided to manage and automate Issuance.&#x20;

## Issuance Functions

***

* [Issuing a token](#id-1.-issuing-a-token)
* [Token authority system ](#id-2.-the-authority-system)
* [Granting and revoking authority](#granting-or-revoking-authorities)
* [Pausing and unpausing the token](#id-3.-pausing-and-unpausing-the-token)
* [Minting tokens](#id-5.-minting-tokens)
* [Burning tokens](#id-6.-burning-tokens)
* [Blacklisting/Whitelisting addresses](#id-7.-blacklisting-whitelisting-an-address)&#x20;
* [Updating token metadata ](#id-11.-update-token-metadata)

## 1. Issuing a token&#x20;

***

When creating a Token, Issuers must choose between:

* **Public Token**: Accessible to all network participants, except those blacklisted by the issuer.
* **Private Token**: Restricted to whitelisted addresses only.

The 1Money Network Operator will use the [issue token](/integrations/rest-apis/tokens/issue-token) API to create the token on the issuer's behalf and grant `master_authority` to the issuer's specified address.&#x20;

## 2. The authority system

***

The `master_authority` is the root of the permission hierarchy and has complete control over the token capabilities for the token. It can:

* Grant and revoke all other authority types
* Mint tokens without allowance restrictions

{% hint style="info" %}
Note: The `master_authority` cannot be reassigned after token creation
{% endhint %}

The **Authority system** follows a hierarchical structure with the `master_authority` at the top:

<figure><img src="/files/C4m0ZM7imyPtRGxi2NOA" alt=""><figcaption></figcaption></figure>

**The Master Authority** wallet can be secured using MPC solutions for multi party signing workflows available on most Custodian platforms.&#x20;

### **Master authority**

The Master Authority serves as the "super admin" for managing rights to other sub-authorities for a given Token.&#x20;

The `master_authority` can assign or revoke the following roles:

{% hint style="info" %}
The **Master Authority** can perform **all the functions** of all other authority types.&#x20;

As such you can **simplify** your workflows by designating only the Master Authority.

Alternatively, you can choose to split these functions across other roles, you can assign different addresses for a more **advanced** management model.&#x20;
{% endhint %}

<table><thead><tr><th width="281.3125">Authority Type</th><th width="135.22265625">Max Addresses</th><th>Capabilities</th></tr></thead><tbody><tr><td><code>master_mint_burn_authority</code></td><td>1</td><td>Grant/revoke minting/burning privileges, set mint limits (cannot mint directly)</td></tr><tr><td><code>mint_burn_authorities</code></td><td>20</td><td>Mint tokens (up to allowance), burn tokens from any account (cannot grant privileges)</td></tr><tr><td><code>pause_authorities</code></td><td>5</td><td>Pause/unpause all token operations</td></tr><tr><td><code>list_authorities</code></td><td>5</td><td>Blacklist/Whitelist addresses (preventing/allowing them from sending/receiving tokens)</td></tr><tr><td><code>metadata_update_authorities</code></td><td>5</td><td>Update token name, URI, and additional metadata</td></tr></tbody></table>

### **Authority privileges**

#### Minting and Burning

* Only the `master_authority` and `mint_burn_authorities` can mint tokens.
  * `master_authority`: Unlimited minting
  * `mint_burn_authorities`: Minting up to assigned allowance
* Both can burn tokens from any account.

#### Listing(Blacklisting/Whitelisting)

* Only `list_authorities` can blacklist/whitelist addresses.
* Blacklisted addresses cannot send or receive tokens.
* Whitelisted addresses can participate in private token operations.
* Listing is immediate&#x20;

#### Pausing and Unpausing

* Only `pause_authorities` can pause or unpause tokens.
* **Paused State**: All transfers, mints, and burns are disabled. Useful for emergencies or maintenance.
* **Unpaused State**: All token operations resume.
* The `master_authority` retains the ability to manage authorities even when paused.

#### Metadata Updates

* Only `metadata_update_authorities` can update token metadata.
* Changes are effective immediately.
* The token URI can point to a JSON file with additional information.
* Additional metadata supports arbitrary key-value pairs.

### Summary Table: Authority Actions <a href="#summary-table-authority-actions" id="summary-table-authority-actions"></a>

| Action             | Authority Required                          |
| ------------------ | ------------------------------------------- |
| Grant/revoke roles | `master_authority`                          |
| Mint tokens        | `master_authority`, `mint_burn_authorities` |
| Burn tokens        | `master_authority`, `mint_burn_authorities` |
| Pause/unpause      | `pause_authorities`                         |
| Blacklist address  | `list_authorities`                          |
| Whitelist address  | `list_authorities`                          |
| Update metadata    | `metadata_update_authorities`               |

### Granting or revoking authorities&#x20;

`master_authority` can use the [grant authority](/integrations/rest-apis/tokens/grant-authority) API to grant or revoke authorities to specific addresses:

* In "action" - select either `Grant` or `Revoke`&#x20;
* Select the appropriate "authority\_type" : `MasterMintBurn`, `MintTokens`, `Pause`, `Burn`, `Blacklist`, `Whitelist` , `UpdateMetadata`&#x20;

Example:&#x20;

{% code title="cURL" %}

```sh
curl -L \
  --request POST \
  --url 'https://api.testnet.1money.network/v1/tokens/grant_authority' \
  --header 'Content-Type: application/json' \
  --data '{
    "action": "Grant",
    "authority_address": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC742Ab",
    "authority_type": "MasterMintBurn",
    "chain_id": 1212101,
    "nonce": 0,
    "token": "0x6ADE9688A44D058fF181Ed64ddFAFbBE5CC742Ac",
    "value": "1500000000",
    "signature": {
      "r": "72956732934625920503481762689501378577921804342307439094906376029324416116949",
      "s": "29902520081700531224291681396692026253288382272435451874524203378285409371412",
      "v": "1"
    }
  }'
```

{% endcode %}

## 3. Pausing and unpausing the token &#x20;

***

When the 1Money Network Operator creates a token for an issuer, the **token will be paused by default**.&#x20;

When a token is **paused**:

* No transfers, mints, or burns can occur
* Pausing is effective immediately

This is useful for emergency situations or scheduled maintenance

{% hint style="warning" %}
The `master_authority` can still **grant and revoke** all authority types while their token is paused.&#x20;
{% endhint %}

The `pause_authorities` must unpause the token before it can be transferred, minted or burned.&#x20;

When a token is **unpaused**:

* Transfers, mints, or burns can occur
* Unpausing is effective immediately
* All token operations resume normal functionality

The transaction signer must be the token's `pause_authorities` to pause or unpause a token.&#x20;

To **unpause** a token, the `pause_authorities` can use the [pause/unpause](/integrations/rest-apis/tokens/pause-unpause) API:

{% code title="cURL" %}

```sh
curl -L \
  --request POST \
  --url 'https://api.testnet.1money.network/v1/tokens/pause' \
  --header 'Content-Type: application/json' \
  --data '{
    "action": "Unpause",
    "chain_id": 1212101,
    "nonce": 0,
    "token": "0x6ADE9688A44D058fF181Ed64ddFAFbBE5CC742Ac",
    "signature": {
      "r": "72956732934625920503481762689501378577921804342307439094906376029324416116949",
      "s": "29902520081700531224291681396692026253288382272435451874524203378285409371412",
      "v": "1"
    }
  }'
```

{% endcode %}

Similarly, to pause the token again, `pause` can be passed through the `action` parameter. &#x20;

## 4. Granting mint and burn authorities &#x20;

***

The `master_mint_burn_authority` has the power to grant `mint_burn_authorities` to specific addresses of their choosing.&#x20;

`mint_burn_authorities` have minting privileges and can create new tokens up to their allowance limit but cannot grant minting privileges to others. They can also burn tokens from any account.&#x20;

Use the [grant authority](/integrations/rest-apis/tokens/grant-authority) API to set the `mint_burn_authorities` :

{% code title="cURL" %}

```sh
curl -L \
  --request POST \
  --url 'https://api.testnet.1money.network/v1/tokens/grant_authority' \
  --header 'Content-Type: application/json' \
  --data '{
    "action": "Grant",
    "authority_address": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC742Ab",
    "authority_type": "MintTokens",
    "chain_id": 1212101,
    "nonce": 0,
    "token": "0x6ADE9688A44D058fF181Ed64ddFAFbBE5CC742Ac",
    "value": "0",
    "signature": {
      "r": "72956732934625920503481762689501378577921804342307439094906376029324416116949",
      "s": "29902520081700531224291681396692026253288382272435451874524203378285409371412",
      "v": "1"
    }
  }'
```

{% endcode %}

## 5. Minting tokens &#x20;

***

Only the `master_authority` and `mint_burn_authorities` can mint tokens.&#x20;

`master_authority` can mint tokens **without allowance restrictions**, while the `mint_burn_authorities` can mint new tokens **up to their allowance.**

Use the [mint](/integrations/rest-apis/tokens/mint) API:&#x20;

{% code title="cURL" %}

```sh
curl -L \
  --request POST \
  --url 'https://api.testnet.1money.network/v1/tokens/mint' \
  --header 'Content-Type: application/json' \
  --data '{
    "chain_id": 1212101,
    "nonce": 0,
    "recipient": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC742Ab",
    "token": "0x6ADE9688A44D058fF181Ed64ddFAFbBE5CC742Ac",
    "value": "1500000000",
    "signature": {
      "r": "72956732934625920503481762689501378577921804342307439094906376029324416116949",
      "s": "29902520081700531224291681396692026253288382272435451874524203378285409371412",
      "v": "1"
    }
  }'
```

{% endcode %}

## 6. Burning tokens&#x20;

***

&#x20;`mint_burn_authorities` can burn tokens through the [burn](/integrations/rest-apis/tokens/burn) API:

{% code title="cURL" %}

```sh
curl -L \
  --request POST \
  --url 'https://api.testnet.1money.network/v1/tokens/burn' \
  --header 'Content-Type: application/json' \
  --data '{
    "chain_id": 1212101,
    "nonce": 0,
    "recipient": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC742Ab",
    "token": "0x6ADE9688A44D058fF181Ed64ddFAFbBE5CC742Ac",
    "value": "1500000000",
    "signature": {
      "r": "72956732934625920503481762689501378577921804342307439094906376029324416116949",
      "s": "29902520081700531224291681396692026253288382272435451874524203378285409371412",
      "v": "1"
    }
  }'

```

{% endcode %}

## 7. Blacklisting/Whitelisting an address&#x20;

***

{% hint style="warning" %}
We have **public/private** token.\
\
In public token mode, if an address is blacklisted, it will be put into blacklist and cannot send and receive with that address, using whitelist to bring it back thus can send and receive again(but will not put it into whitelist table.).\
\
In private token mode, if an address is not blacklisted, it cannot send or receive any token, when we whitelist the address, it can send and receive, we can use the blacklist feature to remove it from the whitelist, thus it cannot send and receive again(but will not put it into blacklist table.).
{% endhint %}

Only the `list_authorities` can **blacklist/whitelist addresses**. This adds an account to the token's blacklist, preventing it from participating in token operations.

Parameters:

* address: Address - The address to blacklist/whitelist

Required Permissions:

* The transaction signer must be in the token's `list_authorities` list

Note:

* Blacklisted addresses cannot send or receive tokens
* Whitelisted addresses can send or receive tokens
* Blacklisting is effective immediately
* The token account must exist and be associated with the token

Use the [mangelist](/integrations/rest-apis/tokens/blacklist) API to whitelist addresses by setting the "action" to "Blacklist" or "Whitelist":

{% code title="cURL" %}

```sh
curl -L \
  --request POST \
  --url 'https://api.testnet.1money.network/v1/tokens/blacklist' \
  --header 'Content-Type: application/json' \
  --data '{
    "action": "Blacklist",
    "address": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC742Ab",
    "chain_id": 1212101,
    "nonce": 0,
    "token": "0x6ADE9688A44D058fF181Ed64ddFAFbBE5CC742Ac",
    "signature": {
      "r": "72956732934625920503481762689501378577921804342307439094906376029324416116949",
      "s": "29902520081700531224291681396692026253288382272435451874524203378285409371412",
      "v": "1"
    }
  }'
```

{% endcode %}

## 8. Updating token metadata

***

&#x20;`metadata_update_authorities` can use the [update token metadata](/integrations/rest-apis/tokens/update-token-metadata) API:

{% code title="cURL" %}

```sh
curl -L \
  --request POST \
  --url 'https://api.testnet.1money.network/v1/tokens/update_metadata' \
  --header 'Content-Type: application/json' \
  --data '{
    "additional_metadata": "[{\"key1\":\"v1\",\"key2\":\"v2\"}]",
    "chain_id": 1212101,
    "name": "TEST Stablecoin",
    "is_private": true,
    "nonce": 0,
    "token": "0x6ADE9688A44D058fF181Ed64ddFAFbBE5CC742Ac",
    "uri": "https://test.com",
    "signature": {
      "r": "72956732934625920503481762689501378577921804342307439094906376029324416116949",
      "s": "29902520081700531224291681396692026253288382272435451874524203378285409371412",
      "v": "1"
    }
  }'
```

{% endcode %}

This updates the token's metadata.

Note:

* Metadata updates are effective immediately
* The URI can point to a JSON file with additional information
* Additional metadata can store arbitrary key-value pairs


# Validators

Partners interested in contributing to the network or operating independent infrastructure will have several options available in the future:

* **Archival Nodes**\
  Acquire complete historical data.
* **Mirror Nodes**\
  Stay synchronized with the network in real time.

If you wish to  host your own validators, please [contact us](https://1moneynetwork.com/contact-us) for more details.&#x20;

**Note:** The protocol does not currently offer incentives for running validators.


# Exchanges

This section describes how to integrate the 1Money Network into an exchange.&#x20;

## Connect to the 1Money Network&#x20;

Make sure you are connected to the 1Money Network's [Rest API Endpoints and Websockets](/integrations/network-access).&#x20;

## Deposits

{% hint style="warning" %}
Note that the 1Money Network has checkpoints instead of blocks. You can think of a checkpoint as similar to the concept of a block in traditional blockchains. A checkpoint in the 1Money Network represents a specific point in time that captures the current state of each account, including newly distributed transaction fees credited to validators’ accounts. &#x20;

Learn more about checkpoints in the [system components section](/core-concepts/system-components).&#x20;
{% endhint %}

Exchanges should follow these steps for deposits:&#x20;

1. **Track the latest checkpoint and transaction data**
   * Use the [get checkpoint by latest number API](/integrations/rest-apis/checkpoints/get-checkpoint-by-number) to get the latest checkpoint number&#x20;
   * Compare the network's checkpoint number to your local checkpoint number and make sure they match
   * If they match, then use the [get checkpoint by number API](/integrations/rest-apis/checkpoints/get-checkpoint-by-number) to pull all the transaction data from that checkpoint &#x20;
     * Input the checkpoint number and set full=true. For example: <https://api.testnet.1money.network/v1/checkpoints/by_number?number=1000&full=true>
2. **Confirm customer deposit**&#x20;
   * Match your customer's address with the data structure in the transaction data queried in part 1 (above)&#x20;
   * Once the customer deposit is confirmed, credit the balance to your local database
   * As a check, exchanges can use the [get account balance API](broken://pages/8nPLuFVcftw3S5Vc0Jal) to ensure the customer deposits are correct compared to their local database&#x20;

## Withdrawals

To initiate a withdrawal, an exchange should:&#x20;

1. Prepare the transaction with a private key signature&#x20;
   * Use the[ submit payment API](/integrations/rest-apis/transactions/submit-payment) to prepare the transaction&#x20;
2. Send signed transaction to the network&#x20;

In special instances where a transaction is not approved by 2/3 of the validators, an exchange can cancel a transaction using the [submit cancellation API](broken://pages/CKlej1sznaNwkUBuKWCV).&#x20;

## How to check on the status of your transaction

Follow these steps to check on the status of your transaction:

1. Once you submitted a transaction, you will automatically get a hash as a return&#x20;
2. Use [Get Transaction Receipt by Hash](/integrations/rest-apis/transactions/get-transaction-receipt-by-hash) to check the transaction status

Note that transactions on the network are finalized instantly, so there is no need wait for a checkpoint to be generated.

## Additional Resources

* [**Transaction types**](/integrations/data-dictionary/transaction-types) — all possible transaction types, including relevant documentation


# Overview

Connect to the 1Money Network with our hosted infrastructure. The SDK's provide easy-to-use wrappers for the 1Money API and can be embedded directly into your application, or use the REST API's directly to access core functions.&#x20;

### [Network Access](/integrations/network-access)

Leverage 1Money-hosted infrastructure for quick and reliable integration.

### [Developer Lab](/integrations/developer-lab)

Issue a token, recieve test tokens in the faucet.&#x20;

### [SDK's](/integrations/sdks)

Use our TypeScript and Go SDKs to simplify API integration. Additional language support is on the way.

### [REST API's](/integrations/rest-apis)

Access core protocol features, including payments, asset issuance, and customer wallet management.

### [Websockets](/integrations/websocket)

Subscribe and listen to transaction activity from the latest [Checkpoint](https://developer.1moneynetwork.com/core-concepts/1money-protocol#forming-a-checkpoint).&#x20;


# Network Access

Connect to the 1Money Network using these REST and Websocket endpoints

<table><thead><tr><th width="108.5625">Network</th><th width="332.65234375">REST  Endpoints</th><th width="322.75390625">Websocket</th></tr></thead><tbody><tr><td><strong>Mainnet</strong></td><td>Coming soon.</td><td>Coming soon.</td></tr><tr><td><strong>Testnet</strong></td><td><ul><li><a href="https://api.testnet.1money.network/">https://api.testnet.1money.network</a></li><li><a href="https://api1.testnet.1money.network">https://api1.testnet.1money.network</a></li><li><a href="https://api2.testnet.1money.network">https://api2.testnet.1money.network</a></li></ul></td><td><ul><li><a href="wss://ws.testnet.1money.network/">wss://ws.testnet.1money.network</a></li><li><a href="wss://ws1.testnet.1money.network/">wss://ws1.testnet.1money.network</a></li><li><a href="wss://ws2.testnet.1money.network/">wss://ws2.testnet.1money.network</a></li></ul></td></tr></tbody></table>

{% hint style="info" %}
Testnet API's are currently rate limited at 300 requests / minute per IP address.&#x20;
{% endhint %}


# Developer Lab

Interact with the network using these utilities.

| Utility                                                       |                                                    |
| ------------------------------------------------------------- | -------------------------------------------------- |
| [Issuance Tool](https://faucet.1money.network/token-creation) | Issue a token on Testnet and set custom parameters |
| [Faucet](https://faucet.1money.network/)                      | Get a test token transfered to your address        |
| More to come!                                                 |                                                    |


# SDKs

Integrate with the 1Money Network using our SDKs:

<table data-view="cards"><thead><tr><th align="center"></th><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><strong>Typescript</strong></td><td><a href="/pages/O0kBhCUsgnxc8XRWou8H"><strong>SDK</strong></a></td><td><a href="https://github.com/1Money-Co/1money-ts-sdk"><strong>Repo</strong></a></td><td></td><td><a href="/files/Apiw3RozxJ0bgLN4zKct">/files/Apiw3RozxJ0bgLN4zKct</a></td><td></td></tr><tr><td align="center"><strong>Golang</strong></td><td><a href="/pages/p50bW8ZaF4PvYcQsNDbw"><strong>SDK</strong></a></td><td><a href="https://github.com/1Money-Co/1money-go-sdk"><strong>Repo</strong></a> </td><td></td><td><a href="/files/kUIMAYZt4GOtp2lMduGK">/files/kUIMAYZt4GOtp2lMduGK</a></td><td></td></tr><tr><td align="center"><strong>Rust</strong> </td><td><a href="/pages/ysGcr8Yw2Te5N9gbsCpE"><strong>SDK</strong></a></td><td><a href="https://github.com/1Money-Co/onemoney-protocol-rust-sdk/tree/v0.1.0"><strong>Repo</strong></a></td><td></td><td><a href="/files/1jalUnUdcdgJvEPo2sPz">/files/1jalUnUdcdgJvEPo2sPz</a></td><td></td></tr></tbody></table>

***

We offer a suite of SDKs tailored for various programming environments to simplify and accelerate your development process.

**Key Benefits of Our SDKs:**

* **Abstract away complexity:** Our SDKs simplify and handle low-level network communication, transaction formatting, and cryptographic operations, so you can focus on building your application.
* **User-Friendly Interfaces:** Access easy-to-use functions, classes, and data types in popular programming languages.
* **Increased Productivity:** Leverage pre-built tools and utilities to speed up your development workflow.

Whether you’re developing web applications, mobile apps, backend services, or command-line tools, our SDKs provide the essential components you need to connect your project to the 1Money network efficiently and securely.

Explore the SDKs below to find the best fit for your preferred language and project requirements. Each SDK includes comprehensive documentation to help you get started quickly.


# Typescript

The 1Money L1 [TypeScript SDK](https://github.com/1Money-Co/1money-ts-sdk) provides a convenient way to interact with and perform operations on 1Money network.&#x20;

It offers a set of [utility functions](/integrations/sdks/typescript/api-methods), classes, and types to simplify the integration process and enhance developer productivity. Get Started [here](/integrations/sdks/typescript/get-started).&#x20;


# Get Started

### Install

```typescript
npm i -S @1money/ts-sdk axios ethers
# or
yarn add @1money/ts-sdk axios ethers
# or
pnpm i @1money/ts-sdk axios ethers
```

### Initialize the API Client

```typescript
import { api } from '@1money/ts-sdk';

// Initialize with default settings (mainnet)
const apiClient = api();

// Or specify testnet network
const testnetClient = api({ network: 'testnet' });

// You can also set a custom timeout (in milliseconds)
const apiClient = api({
  network: 'testnet',
  timeout: 5000 // 5 seconds
});
```

### Fetch the current checkpoint number

```typescript
const number = await apiClient.checkpoints.getNumber()
  .success(response => {
    console.log('number', response.number);
    return response.number;
  })
  .error(err => {
    console.error('Error:', err);
    // return a default value
    return 0;
  });

// do something with the number
// ...
```

### Get checkpoint by number

```typescript
const checkpoint = await apiClient.checkpoints.getByNumber(1)
  .success(response => {
    console.log('checkpoint', response);
  });
```

### CDN

```typescript
<script src="https://unpkg.com/@1money/ts-sdk@latest/umd/1money-ts-sdk.min.js"></script>

<script>
  const apiClient = window.$1money.api({
    network: 'testnet'
  });

  async function getNumber () {
    const number = await apiClient.checkpoints.getNumber();
    console.log('number', number);
  }

  getNumber();
</script>
```

### Error Handling

All API methods return a promise-like object with `.success()`, `.timeout()`, `.error()` and `.rest()` handlers. Always implement both handlers for proper error management:

1. `.success()`: Handles successful API responses
2. `.timeout()`: Specifically handles timeout errors
3. `.error()`: Handles all other types of errors
4. `.rest()`: A final handler that runs after any of the above handlers complete

```typescript
import { api } from '@1money/ts-sdk';

const apiClient = api();

apiClient.someMethod()
  .success(response => {
    // Handle successful response
  })
  .timeout(err => {
    // Handle timeout case
  })
  .error(err => {
    // Handle other errors
  });
```

You can use `rest` to handle all other errors:

```typescript
apiClient.someMethod()
  .success(response => {
    // Handle successful response
  })
  .rest(err => {
    // Handle other cases
  });
```

### **Async/Await**

You also can use async/await to handle the response:

```typescript
import { api } from '@1money/ts-sdk';

const apiClient = api();

try {
  const response = await apiClient.someMethod();
  console.log('Response:', response);
} catch (err) {
  console.error('Error:', err);
}
```

### **Promise**

You also can use standard `promise` to handle the response:

```typescript
import { api } from '@1money/ts-sdk';

const apiClient = api();

apiClient.someMethod()
  .then(response => {
    console.log('Response:', response);
  })
  .catch(err => {
    console.error('Error:', err);
  });
```


# API Methods

## Utility Methods

### Signature Generation

Before using the API methods that require signatures, you'll need to generate them using the provided utility functions:

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Example: Generate signature for a payment transaction
const paymentPayload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // recipient
  toHex('1000000000'), // value
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // token
];

const signature = signMessage(paymentPayload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// The signature object will have the correct r, s, v format
console.log('Generated signature:', signature);
// Output example:
// {
//   r: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
//   s: '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890',
//   v: 27
// }
```

### **Get Account Nonce**

```typescript
const address = '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3';
apiClient.accounts.getNonce(address)
  .success(response => {
    console.log('Account nonce:', response);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Get Token Metadata**

```typescript
const tokenAddress = '0x2cd8999Be299373D7881f4aDD11510030ad1412F';
apiClient.tokens.getTokenMetadata(tokenAddress)
  .success(response => {
    console.log('Token metadata:', response);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Get Current Checkpoint**

```typescript
apiClient.checkpoints.getNumber()
  .success(response => {
    console.log('Current checkpoint number:', response.number);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

## **Transaction Methods**

### **Estimate Transaction Fee**

```typescript
const fromAddress = '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3';
const value = '1000000000';
const tokenAddress = '0x2cd8999Be299373D7881f4aDD11510030ad1412F';

apiClient.transactions.estimateFee(fromAddress, value, tokenAddress)
  .success(response => {
    console.log('Estimated fee:', response);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Get Transaction Details**

```typescript
const txHash = '0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c';
apiClient.transactions.getByHash(txHash)
  .success(response => {
    console.log('Transaction details:', response);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Get Transaction Receipt**

```typescript
const txHash = '0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c';
apiClient.transactions.getReceiptByHash(txHash)
  .success(response => {
    console.log('Transaction receipt:', response);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

## **Payment Methods**

### **Submit Payment Transaction**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // recipient
  toHex('1000000000'), // value
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // token
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the payment payload
const paymentPayload = {
  chain_id: 1,
  nonce: 1,
  recipient: '0x2cd8999Be299373D7881f4aDD11510030ad1412F',
  value: '1000000000',
  token: '0x2cd8999Be299373D7881f4aDD11510030ad1412F',
  signature
};

apiClient.transactions.payment(paymentPayload)
  .success(response => {
    console.log('Payment transaction hash:', response.hash);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Cancel Transaction**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the cancellation payload
const cancellationPayload = {
  chain_id: 1,
  nonce: 1,
  signature
};

apiClient.transactions.cancel(cancellationPayload)
  .success(response => {
    console.log('Cancellation transaction hash:', response.hash);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

## **Token Management Methods**

### **Issue New Token**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  toHex('My Token'), // name
  toHex('MTK'), // symbol
  toHex(18), // decimals
  '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3', // master_authority
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the issue payload
const issuePayload = {
  chain_id: 1,
  nonce: 1,
  name: 'My Token',
  symbol: 'MTK',
  decimals: 18,
  master_authority: '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3',
  signature
};

apiClient.tokens.issueToken(issuePayload)
  .success(response => {
    console.log('Token issued:', response);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Mint Tokens**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // token
  '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3', // recipient
  toHex('1000000000000000000'), // amount
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the mint payload
const mintPayload = {
  chain_id: 1,
  nonce: 1,
  token: '0x2cd8999Be299373D7881f4aDD11510030ad1412F',
  recipient: '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3',
  value: '1000000000000000000',
  signature
};

apiClient.tokens.mintToken(mintPayload)
  .success(response => {
    console.log('Mint transaction hash:', response.hash);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Burn Tokens**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // token
  toHex('1000000000000000000'), // amount
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the burn payload
const burnPayload = {
  chain_id: 1,
  nonce: 1,
  token: '0x2cd8999Be299373D7881f4aDD11510030ad1412F',
  value: '1000000000000000000',
  signature
};

apiClient.tokens.burnToken(burnPayload)
  .success(response => {
    console.log('Burn transaction hash:', response.hash);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Update Token Metadata**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // token
  toHex('Updated Token Name'), // name
  toHex('https://example.com/metadata'), // uri
  toHex([]), // additional_metadata
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the metadata payload
const metadataPayload = {
  chain_id: 1,
  nonce: 1,
  token: '0x2cd8999Be299373D7881f4aDD11510030ad1412F',
  name: 'Updated Token Name',
  uri: 'https://example.com/metadata',
  additional_metadata: [],
  signature
};

apiClient.tokens.updateMetadata(metadataPayload)
  .success(response => {
    console.log('Metadata update transaction hash:', response.hash);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Set Token Blacklist Status**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // token
  '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3', // address
  toHex('Blacklist'), // action
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the blacklist payload
const blacklistPayload = {
  chain_id: 1,
  nonce: 1,
  token: '0x2cd8999Be299373D7881f4aDD11510030ad1412F',
  address: '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3',
  action: 'Blacklist',
  signature
};

apiClient.tokens.setBlacklist(blacklistPayload)
  .success(response => {
    console.log('Blacklist update transaction hash:', response.hash);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Grant Token Authority**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // token
  '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3', // authority_address
  toHex('Grant'), // action
  toHex('MasterMint'), // authority_type
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the authority payload
const authorityPayload = {
  chain_id: 1,
  nonce: 1,
  token: '0x2cd8999Be299373D7881f4aDD11510030ad1412F',
  authority_address: '0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3',
  action: 'Grant',
  authority_type: 'MasterMint',
  signature
};

apiClient.tokens.grantAuthority(authorityPayload)
  .success(response => {
    console.log('Authority update transaction hash:', response.hash);
  })
  .error(err => {
    console.error('Error:', err);
  });
```

### **Pause/Unpause Token**

```typescript
import { signMessage, toHex } from '@1money/ts-sdk';

// Your private key (DO NOT share or commit your private key)
const privateKey = 'YOUR_PRIVATE_KEY';

// Create the payload array for signing
const payload = [
  toHex(1), // chain_id
  toHex(1), // nonce
  '0x2cd8999Be299373D7881f4aDD11510030ad1412F', // token
  toHex('Pause'), // action
];

// Generate signature
const signature = signMessage(payload, privateKey);
if (!signature) {
  throw new Error('Failed to generate signature');
}

// Create the pause payload
const pausePayload = {
  chain_id: 1,
  nonce: 1,
  token: '0x2cd8999Be299373D7881f4aDD11510030ad1412F',
  action: 'Pause',
  signature
};

apiClient.tokens.pauseToken(pausePayload)
  .success(response => {
    console.log('Pause status update transaction hash:', response.hash);
  })
  .error(err => {
    console.error('Error:', err);
  });
```


# Golang

The 1Money L1 [Go SDK](https://github.com/1Money-Co/1money-go-sdk) provides a convenient way to interact with and perform operations on 1Money network. &#x20;

It offers a set of [utility functions](/integrations/sdks/golang/api-methods), classes, and types to simplify the integration process and enhance developer productivity. Get started [here](/integrations/sdks/golang/get-started).&#x20;


# Get Started

### Setup your environment

Add go to your `go.mod` file

```sh
go get -u  https://github.com/1Money-Co/1money-protocol-go-sdk
```

### Examples:

#### TestNetwork

```go
client := onemoney.NewTestClient()
result, err := client.GetCheckpointNumber()
```

#### MainNetwork

```go
client := onemoney.NewClient()
result, err := client.GetCheckpointNumber()
```


# API methods

## Utility Functions <a href="#signature-generation" id="signature-generation"></a>

### Generate Signatures

Before using API methods that require signatures, you'll need to generate them using the provided utility function:

```go
import (
    onemoney "github.com/1Money-Co/1money-go-sdk"
    "github.com/ethereum/go-ethereum/common"
    "math/big"
)

// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

client := onemoney.NewTestClient()

// Get latest checkpoint
latestCheckpoint, err := client.GetCheckpointNumber(context.Background())
if err != nil {
    t.Fatalf("Failed to get latest checkpoint number: %v", err)
}

// Example: Generate signature for a payment transaction
paymentPayload := onemoney.PaymentPayload{
    ChainID:   1,
    Nonce:     1,
    Recipient: common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
    Value:     big.NewInt(1000000000),
    Token:     common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
}

signature, err := client.SignMessage(paymentPayload, privateKey)
if err != nil {
    // Handle error
    panic("Failed to generate signature: " + err.Error())
}

// The signature object will have the correct r, s, v format
fmt.Printf("Generated signature: %+v\n", signature)
```

### Get Account Nonce <a href="#id-1-get-account-nonce" id="id-1-get-account-nonce"></a>

```go
address := "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3"
account, err := client.GetAccount(address)
if err != nil {
    // Handle error
    panic("Error: " + err.Error())
}
fmt.Printf("Account nonce: %d\n", account.Nonce)
```

### Get Token Metadata <a href="#id-2-get-token-metadata" id="id-2-get-token-metadata"></a>

```go
tokenAddress := "0x2cd8999Be299373D7881f4aDD11510030ad1412F"
tokenMetadata, err := client.GetToken(tokenAddress)
if err != nil {
    // Handle error
    panic("Error: " + err.Error())
}
fmt.Printf("Token metadata: %+v\n", tokenMetadata)
```

### Get Current Checkpoint <a href="#id-3-get-current-checkpoint" id="id-3-get-current-checkpoint"></a>

```go
checkpoint, err := client.GetCheckpointNumber()
if err != nil {
    // Handle error
    panic("Error: " + err.Error())
}
fmt.Printf("Current checkpoint number: %d\n", checkpoint.Number)
```

## Transaction Methods <a href="#id-4-estimate-transaction-fee" id="id-4-estimate-transaction-fee"></a>

### Estimate Transaction Fee <a href="#id-4-estimate-transaction-fee" id="id-4-estimate-transaction-fee"></a>

```go
fromAddress := "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3"
value := "1000000000"
tokenAddress := "0x2cd8999Be299373D7881f4aDD11510030ad1412F"

fee, err := client.GetEstimateFee(fromAddress, tokenAddress, value)
if err != nil {
    // Handle error
    panic("Error: " + err.Error())
}
fmt.Printf("Estimated fee: %s\n", fee.Fee)
```

### Get Transaction Details <a href="#id-5-get-transaction-details" id="id-5-get-transaction-details"></a>

```go
txHash := "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c"
transaction, err := client.GetTransactionByHash(txHash)
if err != nil {
    // Handle error
    panic("Error: " + err.Error())
}
fmt.Printf("Transaction details: %+v\n", transaction)
```

### Get Transaction Receipt <a href="#id-6-get-transaction-receipt" id="id-6-get-transaction-receipt"></a>

```go
txHash := "0xf55f9525be94633b56f954d3252d52b8ef42f5fd5f9491b243708471c15cc40c"
receipt, err := client.GetTransactionReceipt(txHash)
if err != nil {
    // Handle error
    panic("Error: " + err.Error())
}
fmt.Printf("Transaction receipt: %+v\n", receipt)
```

## Payment Methods <a href="#id-7-submit-payment-transaction" id="id-7-submit-payment-transaction"></a>

### Submit Payment Transaction <a href="#id-7-submit-payment-transaction" id="id-7-submit-payment-transaction"></a>

```go
// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

client := onemoney.NewTestClient()

// Get latest checkpoint
latestCheckpoint, err := client.GetCheckpointNumber(context.Background())
if err != nil {
    t.Fatalf("Failed to get latest checkpoint number: %v", err)
}

// Create payment payload
payload := onemoney.PaymentPayload{
    ChainID:   1,
    Nonce:     1,
    Recipient: common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
    Value:     big.NewInt(1000000000),
    Token:     common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
}

// Generate signature
signature, err := client.SignMessage(payload, privateKey)
if err != nil {
    panic("Failed to generate signature: " + err.Error())
}

// Create payment request
req := &onemoney.PaymentRequest{
    PaymentPayload: payload,
    Signature: onemoney.Signature{
        R: signature.R,
        S: signature.S,
        V: signature.V,
    },
}

// Submit payment
response, err := client.SendPayment(req)
if err != nil {
    panic("Error: " + err.Error())
}
fmt.Printf("Payment transaction hash: %s\n", response.Hash)
```

## Token Management Methods <a href="#id-9-token-management-methods" id="id-9-token-management-methods"></a>

### **Issue New Token**

```go
// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

// Create token issue payload
payload := onemoney.TokenIssuePayload{
    ChainID:         1,
    Nonce:           1,
    Name:            "My Token",
    Symbol:          "MTK",
    Decimals:        18,
    MasterAuthority: common.HexToAddress("0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3"),
}

// Generate signature
signature, err := client.SignMessage(payload, privateKey)
if err != nil {
    panic("Failed to generate signature: " + err.Error())
}

// Create issue token request
req := &onemoney.IssueTokenRequest{
    TokenIssuePayload: payload,
    Signature: onemoney.Signature{
        R: signature.R,
        S: signature.S,
        V: signature.V,
    },
}

// Issue token
response, err := client.IssueToken(req)
if err != nil {
    panic("Error: " + err.Error())
}
fmt.Printf("Token issued: %+v\n", response)
```

### **Mint Tokens**

```go
// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

// Create mint payload
payload := onemoney.TokenMintPayload{
    ChainID:   1,
    Nonce:     1,
    Token:     common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
    Recipient: common.HexToAddress("0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3"),
    Value:     big.NewInt(1000000000000000000), // 1 token with 18 decimals
}

// Generate signature
signature, err := client.SignMessage(payload, privateKey)
if err != nil {
    panic("Failed to generate signature: " + err.Error())
}

// Create mint request
req := &onemoney.MintTokenRequest{
    TokenMintPayload: payload,
    Signature: onemoney.Signature{
        R: signature.R,
        S: signature.S,
        V: signature.V,
    },
}

// Mint tokens
response, err := client.MintToken(req)
if err != nil {
    panic("Error: " + err.Error())
}
fmt.Printf("Mint transaction hash: %s\n", response.Hash)
```

### **Burn Tokens**

```go
// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

// Create burn payload
payload := onemoney.TokenBurnPayload{
    ChainID: 1,
    Nonce:   1,
    Token:   common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
    Value:   big.NewInt(1000000000000000000), // 1 token with 18 decimals
}

// Generate signature
signature, err := client.SignMessage(payload, privateKey)
if err != nil {
    panic("Failed to generate signature: " + err.Error())
}

// Create burn request
req := &onemoney.BurnTokenRequest{
    TokenBurnPayload: payload,
    Signature: onemoney.Signature{
        R: signature.R,
        S: signature.S,
        V: signature.V,
    },
}

// Burn tokens
response, err := client.BurnToken(req)
if err != nil {
    panic("Error: " + err.Error())
}
fmt.Printf("Burn transaction hash: %s\n", response.Hash)
```

### **Update Token Metadata**

```go
// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

// Create metadata payload
payload := onemoney.UpdateMetadataPayload{
    ChainID: 1,
    Nonce:   1,
    Token:   common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
    Name:    "Updated Token Name",
    URI:     "https://example.com/metadata",
    AdditionalMetadata: []onemoney.AdditionalMetadata{
        {
            Key:   "website",
            Value: "https://example.com",
        },
    },
}

// Generate signature
signature, err := client.SignMessage(payload, privateKey)
if err != nil {
    panic("Failed to generate signature: " + err.Error())
}

// Create metadata update request
req := &onemoney.UpdateMetadataRequest{
    UpdateMetadataPayload: payload,
    Signature: onemoney.Signature{
        R: signature.R,
        S: signature.S,
        V: signature.V,
    },
}

// Update metadata
response, err := client.UpdateTokenMetadata(req)
if err != nil {
    panic("Error: " + err.Error())
}
fmt.Printf("Metadata update transaction hash: %s\n", response.Hash)
```

### **Set Token Blacklist Status**

```go
// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

// Create blacklist payload
payload := onemoney.TokenBlacklistPayload{
    ChainID: 1,
    Nonce:   1,
    Token:   common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
    Address: common.HexToAddress("0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3"),
    Action:  onemoney.ManageListActionRemove,
}

// Generate signature
signature, err := client.SignMessage(payload, privateKey)
if err != nil {
    panic("Failed to generate signature: " + err.Error())
}

// Create blacklist request
req := &onemoney.SetTokenBlacklistRequest{
    TokenBlacklistPayload: payload,
    Signature: onemoney.Signature{
        R: signature.R,
        S: signature.S,
        V: signature.V,
    },
}

// Update blacklist status
response, err := client.SetTokenBlacklist(req)
if err != nil {
    panic("Error: " + err.Error())
}
fmt.Printf("Blacklist update transaction hash: %s\n", response.Hash)
```

### **Grant Token Authority**

```go
// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

// Create authority payload
payload := onemoney.TokenAuthorityPayload{
    ChainID:        1,
    Nonce:          1,
    Token:          common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
    AuthorityAddress: common.HexToAddress("0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3"),
    Action:         onemoney.Grant, // Use onemoney.Revoke to remove authority
    AuthorityType:  onemoney.AuthorityTypeMasterMintBurn,
}

// Generate signature
signature, err := client.SignMessage(payload, privateKey)
if err != nil {
    panic("Failed to generate signature: " + err.Error())
}

// Create authority request
req := &onemoney.TokenAuthorityRequest{
    TokenAuthorityPayload: payload,
    Signature: onemoney.Signature{
        R: signature.R,
        S: signature.S,
        V: signature.V,
    },
}

// Update authority
response, err := client.SetTokenAuthority(req)
if err != nil {
    panic("Error: " + err.Error())
}
fmt.Printf("Authority update transaction hash: %s\n", response.Hash)
```

### **Pause/Unpause Token**

```go
// Your private key (DO NOT share or commit your private key)
privateKey := "YOUR_PRIVATE_KEY"

// Create pause payload
payload := onemoney.TokenPausePayload{
    ChainID: 1,
    Nonce:   1,
    Token:   common.HexToAddress("0x2cd8999Be299373D7881f4aDD11510030ad1412F"),
    Action:  onemoney.Pause, // Use onemoney.Unpause to unpause
}

// Generate signature
signature, err := client.SignMessage(payload, privateKey)
if err != nil {
    panic("Failed to generate signature: " + err.Error())
}

// Create pause request
req := &onemoney.TokenPauseRequest{
    TokenPausePayload: payload,
    Signature: onemoney.Signature{
        R: signature.R,
        S: signature.S,
        V: signature.V,
    },
}

// Update pause status
response, err := client.PauseToken(req)
if err != nil {
    panic("Error: " + err.Error())
}
fmt.Printf("Pause status update transaction hash: %s\n", response.Hash)
```

## Error Handling <a href="#error-handling" id="error-handling"></a>

All API methods return an error as the second return value. Always check for errors before using the returned data:

```go
result, err := client.GetCheckpointNumber()
if err != nil {
    // Handle the error appropriately
    log.Fatalf("API request failed: %v", err)
}
// Use result safely now that we've checked for errors
fmt.Printf("Current checkpoint: %d\n", result.Number)
```


# Rust

[**Get Started**](/integrations/sdks/rust/get-started), explore the [**Rust methods**](/integrations/sdks/rust/methods) and run the [**examples**](/integrations/sdks/rust/run-examples).

Rust SDK references:

* [Rust Repo](https://github.com/1Money-Co/onemoney-protocol-rust-sdk/tree/v0.1.0)
* [Crates](https://crates.io/crates/onemoney-protocol)
* [Examples](https://github.com/1Money-Co/onemoney-protocol-rust-sdk/tree/v0.1.0/examples)


# Get Started

### Installation

Add this to your `Cargo.toml`:

```rust
[dependencies]
onemoney-protocol = "0.1.0"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
```

### Quick Start

```rust
use onemoney_protocol::{Client, ClientBuilder, Network, OneMoneyAddress, TokenAmount};
use std::str::FromStr;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create clients for different networks
    let mainnet_client = Client::mainnet();          // Mainnet
    let testnet_client = Client::testnet();          // Testnet
    let local_client = Client::local();              // Local development

    // Or use the builder pattern
    let client = ClientBuilder::new()
        .network(Network::Testnet)
        .build()?;

    // Get account nonce
    let address = OneMoneyAddress::from_str("0x742d35Cc6634C0532925a3b8D91D6F4A81B8Cbc0")?;
    let nonce = client.get_account_nonce(address).await?;
    println!("Account nonce: {}", nonce.nonce);

    // Get latest checkpoint number
    let checkpoint_info = client.get_checkpoint_number().await?;
    println!("Current checkpoint: {}", checkpoint_info.number);

    Ok(())
}
```


# Client Configuration

#### Configure clients for Testnet and Mainnet&#x20;

```rust
use onemoney_protocol::{Client, ClientBuilder};
use std::time::Duration;

// Basic clients
let client = Client::mainnet();     // Mainnet
let client = Client::testnet();     // Testnet

// Custom configuration
let client = ClientBuilder::new()
    .base_url("https://custom.api.endpoint.com")
    .timeout(Duration::from_secs(30))
    .build()?;
```


# Methods

Explore a few of the methods available in Rust:

* [Account Operations](/integrations/sdks/rust/methods/account-operations)
* [Token Operations](/integrations/sdks/rust/methods/token-operations)
* [Transaction Operations](/integrations/sdks/rust/methods/transaction-operations)
* [Getting the Chain / Network state](/integrations/sdks/rust/methods/get-the-chain-network-state)
* [Cryptographic Utils](/integrations/sdks/rust/methods/cryptographic-utils)
* [Error Handling](/integrations/sdks/rust/methods/error-handling)&#x20;


# Account Operations

### Get the account nonce

```rust
// Get account nonce
let nonce = client.get_account_nonce(address).await?;
```

### Get the Account Balance

```rust
// Get token account balance
let token_account = client.get_token_account(owner, mint_address).await?;
println!("Balance: {}", token_account.amount);
```

### List all token accounts for an address

```rust
// List all token accounts for an address
let (accounts, total) = client.list_token_accounts(owner, Some(10), Some(0)).await?;
```

### Derive the token account address

```rust
// Derive token account address
let token_account_addr = client.derive_token_account_address(wallet, mint);
```

<br>


# Token Operations

A set of functions are provided in the SDK for:

* [Minting](/integrations/sdks/rust/methods/token-operations/minting-tokens) / [Burning ](/integrations/sdks/rust/methods/token-operations/burning-tokens)Tokens
* [Blacklisting](/integrations/sdks/rust/methods/token-operations/blacklisting-addresses) / [Whitelisting](/integrations/sdks/rust/methods/token-operations/whitelisting-addresses) Addresses
* [Pausing / Unpausing](/integrations/sdks/rust/methods/token-operations/pausing-unpausing-token-operations) Token operations
* [Managing token metadata](/integrations/sdks/rust/methods/token-operations/managing-token-metadata)&#x20;

Please see the detailed[ example code ](https://github.com/1Money-Co/onemoney-protocol-rust-sdk/blob/v0.1.0/examples/tokens_example.rs)for the full suite of functions.


# Minting Tokens

### Token Minting Operations

```rust

// 2. Mint tokens
    println!("\n2. Mint Tokens");
    println!("==============");

    let mint_payload = TokenMintPayload {
        chain_id,
        nonce: current_nonce,
        recipient: sender_address, // Mint to sender's own account
        value: TokenAmount::from(1000000000000000000u64), // 1 token
        token: token_address,
    };
    current_nonce += 1; // Increment for next transaction

    match client.mint_token(mint_payload, private_key).await {
        Ok(response) => {
            println!("Tokens minted - Tx: {}", response.hash);
        }
        Err(e) => {
            print_detailed_error("Could not mint tokens", &e);
        }
    }
    sleep(Duration::from_secs(1)).await;

```

###


# Burning Tokens

### Token Burning Operations

```rust
// 3. Burn tokens

    let burn_payload = TokenBurnPayload {
        chain_id,
        nonce: current_nonce,
        recipient: sender_address, // Burn from sender's own account
        value: TokenAmount::from(500000000000000000u64), // 0.5 tokens
        token: token_address,
    };
    current_nonce += 1; // Increment for next transaction

    match client.burn_token(burn_payload, private_key).await {
        Ok(response) => {
            println!("Tokens burned - Tx: {}", response.hash);
        }
        Err(e) => {
            print_detailed_error("Could not burn tokens", &e);
        }
    }


```

<br>


# Blacklisting Addresses

### Blacklist Management

Note that only public tokens can blacklist addresses.&#x20;

```rust

// 7. Manage blacklist (add address) 
    println!("\n7. Manage Blacklist");
    println!("===================");

    if let Some(ref info) = token_info {
        if !info.is_private {
            println!("Token is public - proceeding with blacklist operation");
            let blacklist_payload = TokenBlacklistPayload {
                chain_id,
                nonce: current_nonce,
                action: BlacklistAction::Add,
                address: recipient_address,
                token: token_address,
            };
            current_nonce += 1; // Increment for next transaction

            match client
                .manage_blacklist(blacklist_payload, private_key)
                .await
            {
                Ok(response) => {
                    println!("Address blacklisted - Tx: {}", response.hash);
                }
                Err(e) => {
                    print_detailed_error("Could not manage blacklist", &e);
                }
            }
        } else {
            println!("Token is private - skipping blacklist operation (not applicable)");
        }
    } else {
        println!("Token metadata not available - skipping blacklist operation");
    }
 

```

<br>


# Whitelisting Addresses

### Whitelist Management

Note that only private ("permissioned") tokens can whitelist addresses.&#x20;

```rust
// 8. Manage whitelist (add address) 
    println!("\n8. Manage Whitelist");
    println!("===================");

    if let Some(ref info) = token_info {
        if info.is_private {
            println!("Token is private - proceeding with whitelist operation");
            let whitelist_payload = TokenWhitelistPayload {
                chain_id,
                nonce: current_nonce,
                action: WhitelistAction::Add,
                address: recipient_address,
                token: token_address,
            };
            current_nonce += 1; // Increment for next transaction

            match client
                .manage_whitelist(whitelist_payload, private_key)
                .await
            {
                Ok(response) => {
                    println!("Address whitelisted - Tx: {}", response.hash);
                }
                Err(e) => {
                    print_detailed_error("Could not manage whitelist", &e);
                }
            }
        } else {
            println!("Token is public - skipping whitelist operation (not applicable)");
        }
    } else {
        println!("Token metadata not available - skipping whitelist operation");
    }
```

&#x20; &#x20;

<br>


# Pausing / Unpausing Token Operations

### Pausing and unpausing token Operations

```rust
// 5. Pause token
    println!("\n5. Pause Token");
    println!("==============");

    let pause_payload = TokenPausePayload {
        chain_id,
        nonce: current_nonce,
        action: PauseAction::Pause,
        token: token_address,
    };
    current_nonce += 1; // Increment for next transaction

    match client.pause_token(pause_payload, private_key).await {
        Ok(response) => {
            println!("Token paused - Tx: {}", response.hash);
        }
        Err(e) => {
            print_detailed_error("Could not pause token", &e);
        }
    }
    sleep(Duration::from_secs(1)).await;

    // 6. Unpause token
    println!("\n6. Unpause Token");
    println!("================");

    let unpause_payload = TokenPausePayload {
        chain_id,
        nonce: current_nonce,
        action: PauseAction::Unpause,
        token: token_address,
    };
    current_nonce += 1; // Increment for next transaction

    match client.pause_token(unpause_payload, private_key).await {
        Ok(response) => {
            println!("Token unpaused - Tx: {}", response.hash);
        }
        Err(e) => {
            print_detailed_error("Could not unpause token", &e);
        }
    }

```


# Managing token metadata

Token Metadata can be added / updated and removed as key / value pairs

### Retrieving Metadata&#x20;

```rust

println!("\n1. Get Token Metadata");
    println!("=====================");

    let token_info = match client.get_token_metadata(token_address).await {
        Ok(mint_info) => {
            println!("{}", mint_info);
            Some(mint_info)
        }
        Err(e) => {
            print_detailed_error("Could not get token metadata", &e);
            None
        }
    };
```

### Updating Metadata

```rust
// 9. Update token metadata
    println!("\n9. Update Token Metadata");
    println!("========================");

    let metadata_payload = TokenMetadataUpdatePayload {
        chain_id,
        nonce: current_nonce,
        name: "Updated Test Token".to_string(),
        uri: "https://example.com/updated-metadata.json".to_string(),
        additional_metadata: vec![MetadataKVPair {
            key: "version".to_string(),
            value: "2.0".to_string(),
        }],
        token: token_address,
    };

    match client
        .update_token_metadata(metadata_payload, private_key)
        .await
    {
        Ok(response) => {
            println!("Metadata updated - Tx: {}", response.hash);
        }
        Err(e) => {
            print_detailed_error("Could not update token metadata", &e);
        }
    }
```


# Transaction Operations

### Make a payment and get the results

```rust
use onemoney_protocol::PaymentPayload;

// Send a payment
let payment = PaymentPayload {
    chain_id: 1212101,
    nonce: 2,
    recipient: recipient_address,
    value: TokenAmount::from(500000000000000000u64), // 0.5 tokens
    token: token_address,
};

let result = client.send_payment(payment, private_key).await?;
println!("Payment sent: {}", result.hash);
```

### Get the transaction details

```rust
// Get transaction details
let tx = client.get_transaction_by_hash(&result.hash).await?;
println!("Transaction status: {:?}", tx.status);

```

### Poll for Confirmation

<pre class="language-rust"><code class="lang-rust"><strong>// Wait for confirmation
</strong>let confirmed_tx = client.wait_for_transaction(
    &#x26;result.transaction_hash,
    30, // max attempts
    Duration::from_secs(2) // polling interval
).await?;
</code></pre>


# Authority Management

When issuing a token, an address controlled by the Issuer can be assigned to be the[ Authority Manager](/core-concepts/token-authority), which has role based permissions to perform (and delegate to other accounts):<br>

* [Delegating Authorities](/integrations/sdks/rust/methods/authority-management/assigning-authority)


# Assigning Authority

1Money Network provides optional protocol level role assignment for token operations that can can be delegated by the [Master Authority](/core-concepts/token-authority) to other account addresses. The [Master Authority](/core-concepts/token-authority#master-authority-master_authority) always retains super admin rights over all roles. &#x20;

* [Master Mint/Burn](/core-concepts/token-authority#master-mint-burn-authority-master_mint_burn_authority): `MasterMintBurn`
  * Grant/revoke minting/burning privileges, set mint limits (cannot mint directly)
* [Minting / Burning](/core-concepts/token-authority#mint-burn-authorities-mint_burn_authorities): `MintBurnTokens`
  * Mint tokens (up to allowance), burn tokens from any account (cannot grant privileges)
* [Pausing / Unpausing](/core-concepts/token-authority#pause-authorities-pause_authorities): `Pause`
* [Whitelisting / Blacklisting](/core-concepts/token-authority#list-authorities-list_authorities): `ManageList`
* [Metadata management:](/core-concepts/token-authority#metadata-update-authorities-metadata_update_authorities) `UpdateMetadata`

### Example Code:

```rust
// 4. Grant authority for Minting and Burning
    println!("\n4. Grant Authority");
    println!("==================");

    let grant_payload = TokenAuthorityPayload {
        chain_id,
        nonce: current_nonce,
        action: AuthorityAction::Grant,
        authority_type: Authority::MintBurnTokens,
        authority_address: recipient_address,
        token: token_address,
        value: TokenAmount::from(1000000000000000000u64), // 1 token allowance
    };
    current_nonce += 1; // Increment for next transaction

    match client.grant_authority(grant_payload, private_key).await {
        Ok(response) => {
            println!("Authority granted - Tx: {}", response.hash);
        }
        Err(e) => {
            print_detailed_error("Could not grant authority", &e);
        }
    }
```


# Get the Chain / Network State

### Get the latest state

```rust
// Get chain information
let chain = client.get_chain_info().await?;
println!("Chain ID: {}", chain.chain_id);
```

### Get network statistics

```rust
// Get network statistics
let stats = client.get_network_stats().await?;
println!("Total transactions: {}", stats.total_transactions);
```


# Cryptographic Utils

### Derive an address from a Private Key

```rust
use onemoney_protocol::crypto;

// Derive address from private key
let address = crypto::private_key_to_address(private_key)?;
```

### Sign a message

```rust
// Sign a message
let signature = crypto::sign_message(&payload, private_key)?;
```

### Verify a message

```rust
// Verify signature
let is_valid = crypto::verify_signature(&payload, &signature, signer_address)?;
```


# Error Handling

The SDK provides comprehensive error handling:

```rust
use onemoney_protocol::{Error, Result};

match client.get_account_nonce(address).await {
    Ok(nonce) => println!("Nonce: {}", nonce.nonce),
    Err(Error::Api { status_code: 404, .. }) => {
        println!("Account not found");
    },
    Err(Error::Http(e)) => {
        println!("Network error: {}", e);
    },
    Err(Error::Json(e)) => {
        println!("JSON parsing error: {}", e);
    },
    Err(e) => {
        println!("Other error: {}", e);
    }
}
```


# Run Examples

Run the included examples for:

* Transactions
* Network
* Token
* Accounts

```rust
# Transaction management example
cargo run --example transactions_example

# Network configuration examples
cargo run --example network_examples

# Token operations example
cargo run --example tokens_example

# Account management example
cargo run --example accounts_example
```


# REST APIs

{% hint style="info" %}
This REST API is designed for a variety of clients, such as custody providers, centralized exchanges (CEXs), individual developers, and wallet applications.
{% endhint %}

### Primary endpoints:

* [Chains](/integrations/rest-apis/chains)
* [Accounts](/integrations/rest-apis/accounts)
* [Tokens](/integrations/rest-apis/tokens)
* [Checkpoints](/integrations/rest-apis/checkpoints)
* [Transactions](/integrations/rest-apis/transactions)
* [Error Codes](/integrations/rest-apis/error-codes)


# Chains

#### Chains

<table><thead><tr><th width="122">Method</th><th width="299">URL</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/chains/chain_id</kbd></td><td>get chain id </td></tr></tbody></table>


# Get Chain Id

## GET /v1/chains/chain\_id

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"chains","description":"Chains API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/chains/chain_id":{"get":{"tags":["chains"],"operationId":"get_chain_id","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainIdResponse"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"ChainIdResponse":{"type":"object","description":"Response for chain ID endpoint","required":["chain_id"],"properties":{"chain_id":{"type":"integer","format":"int64","description":"The chain ID in decimal format (e.g., \"1212101\")","minimum":0}}},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Accounts

#### Endpoints

<table><thead><tr><th width="122">Method</th><th width="299">URL</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/accounts/token_account</kbd></td><td>Get account metadata</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/accounts/nonce</kbd></td><td>Get token nonce</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/accounts/bbnonce</kbd></td><td>Retrieve the bbnonce associated with the account</td></tr></tbody></table>


# Get account by token

## GET /v1/accounts/token\_account

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"accounts","description":"Accounts API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/accounts/token_account":{"get":{"tags":["accounts"],"operationId":"get_associated_token_account","parameters":[{"name":"address","in":"query","description":"Address of the account to lookup associated token account for","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","description":"Token address to lookup associated token account for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssociatedTokenAccount"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"AssociatedTokenAccount":{"type":"object","description":"Represents the token holdings and associated data for a specific address.","required":["balance","nonce"],"properties":{"balance":{"type":"string","description":"The balance of the token."},"nonce":{"type":"integer","format":"int64","description":"The nonce of the owner account.","minimum":0}}},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Get account nonce

## GET /v1/accounts/nonce

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"accounts","description":"Accounts API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/accounts/nonce":{"get":{"tags":["accounts"],"operationId":"get_account_nonce","parameters":[{"name":"address","in":"query","description":"Address of the account to lookup nonce for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInfo"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"AccountInfo":{"type":"object","description":"The account information.","required":["nonce"],"properties":{"nonce":{"type":"integer","format":"int64","description":"The nonce of the account.","minimum":0}}},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Get account bbnonce

Retrieve the bbnonce associated with the account

## GET /v1/accounts/bbnonce

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"accounts","description":"Accounts API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/accounts/bbnonce":{"get":{"tags":["accounts"],"operationId":"get_account_bbnonce","parameters":[{"name":"address","in":"query","description":"Address of the account to lookup bbnonce for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BbNonceInfo"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"BbNonceInfo":{"type":"object","description":"The account bbnonce information.","required":["bbnonce"],"properties":{"bbnonce":{"type":"integer","format":"int64","description":"The BurnAndBridge nonce of the account.","minimum":0}}},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Tokens

#### Endpoints

<table><thead><tr><th width="122">Method</th><th width="368">URL</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/tokens/issue</kbd></td><td>issue a token</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/tokens/token_metadata</kbd></td><td>get token metadata</td></tr><tr><td><mark style="color:green;"><strong>POST</strong></mark></td><td><kbd>/v1/tokens/update_metadata</kbd></td><td>update token metadata</td></tr><tr><td><mark style="color:green;"><strong>POST</strong></mark></td><td><kbd>/v1/tokens/grant_authority</kbd></td><td>grant authority</td></tr><tr><td><mark style="color:green;"><strong>POST</strong></mark></td><td><kbd>/v1/tokens/mint</kbd></td><td>mint token</td></tr><tr><td><mark style="color:green;"><strong>POST</strong></mark></td><td><kbd>/v1/tokens/burn</kbd></td><td>burn token</td></tr><tr><td><mark style="color:green;"><strong>POST</strong></mark></td><td><kbd>/v1/tokens/blacklist</kbd></td><td>blacklist address for token </td></tr><tr><td><mark style="color:green;"><strong>POST</strong></mark></td><td><kbd>/v1/tokens/whitelist</kbd></td><td>whitelist address for token</td></tr><tr><td><mark style="color:green;"><strong>POST</strong></mark></td><td><kbd>/v1/tokens/pause</kbd></td><td>pause/unpause all activities</td></tr></tbody></table>


# Issue token

{% hint style="danger" %}
The 1Money Network Operator will use the issue token API to create the token on the issuer's behalf and grant `master_authority` to the issuer's specified address.
{% endhint %}

## POST /v1/tokens/issue

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/issue":{"post":{"tags":["tokens"],"operationId":"issue_new_token","requestBody":{"description":"token issue request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenIssueRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashWithToken"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"TokenIssueRequest":{"allOf":[{"$ref":"#/components/schemas/TokenIssuePayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature"}}}]},"TokenIssuePayload":{"type":"object","required":["chain_id","nonce","symbol","name","decimals","master_authority","is_private"],"properties":{"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"decimals":{"type":"integer","format":"int32","description":"The decimals of the token (maximum 18).","maximum":18,"minimum":0},"is_private":{"type":"boolean","description":"`true` if this token is private and only whitelisted addresses can\noperate with the tokens"},"master_authority":{"$ref":"#/components/schemas/AddressSchema","description":"The master authority of the token."},"name":{"type":"string","description":"The name of the token."},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"symbol":{"type":"string","description":"The symbol of the token."}}},"AddressSchema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"HashWithToken":{"type":"object","description":"Represents a transaction hash and the token that created by the transaction.","required":["hash","token"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema","description":"The hash of the transaction."},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token that created by the transaction, only works for issuing new\ntokens."}}},"B256Schema":{"type":"string","title":"string"},"TokenAddressSchema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Get token metadata

## GET /v1/tokens/token\_metadata

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/token_metadata":{"get":{"tags":["tokens"],"operationId":"get_mint_account","parameters":[{"name":"token","in":"query","description":"Token address to lookup metadata for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintInfo"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"MintInfo":{"type":"object","description":"`MintInfo` is the struct for token contract. One mint account represents one\ntoken.","required":["symbol","master_authority","master_mint_burn_authority","mint_burn_authorities","pause_authorities","list_authorities","black_list","white_list","metadata_update_authorities","bridge_mint_authorities","supply","decimals","is_paused","is_private","meta"],"properties":{"black_list":{"type":"array","items":{"$ref":"#/components/schemas/AddressSchema"},"description":"A blacklist of token accounts"},"bridge_mint_authorities":{"type":"array","items":{"$ref":"#/components/schemas/AddressSchema"},"description":"The authorities for bridge operations (minting from bridge). Maximum of\n5 authorities."},"decimals":{"type":"integer","format":"int32","description":"Number of base 10 digits to the right of the decimal place.","minimum":0},"is_paused":{"type":"boolean","description":"`true` if all transactions for this token are paused"},"is_private":{"type":"boolean","description":"`true` if this token is private and only whitelisted addresses can\noperate with the tokens"},"list_authorities":{"type":"array","items":{"$ref":"#/components/schemas/AddressSchema"},"description":"The authorities to blacklist/whitelist malicious accounts"},"master_authority":{"$ref":"#/components/schemas/AddressSchema","description":"`master_authority` used to create new tokens. The `master_authority` can\nbe provided if and only if during token creation. If `master_authority`\nis `EMPTY_ADDRESS`, the token hasn't been initialized. When the token is\ninitialized with `master_authority`, only the `master_authority` can\ngrant other role authorities to others. And the `master_authority`\nserves as the identifier address for the token. All token account's mint\nfield will be associated with the mint's `master_authority`."},"master_mint_burn_authority":{"$ref":"#/components/schemas/AddressSchema","description":"The authority that can grant individual `mint_burn_authorities`. The\n`master_mint_burn_authority` is created by `master_authority`, which\ndelegate the mint authority to other accounts."},"meta":{"$ref":"#/components/schemas/TokenMetadata","description":"Metadata of the token"},"metadata_update_authorities":{"type":"array","items":{"$ref":"#/components/schemas/AddressSchema"},"description":"The authorities for updating the metadata. Maximum of 5 authorities."},"mint_burn_authorities":{"type":"array","items":{"$ref":"#/components/schemas/MinterAllowance"},"description":"The collection of authorities to mint and burn tokens with a given\nallowance. If the allowance is used up, the authority is not able to\nmint any more tokens until the allowance is updated.\n\nThe allowance to burn is unlimited. Maximum of 20 authorities."},"pause_authorities":{"type":"array","items":{"$ref":"#/components/schemas/AddressSchema"},"description":"The authorities to pause/unpause token transactions. Maximum of 5\nauthorities."},"supply":{"$ref":"#/components/schemas/U256Schema","description":"Total supply of tokens."},"symbol":{"type":"string","description":"The symbol of the token. Created during token creation and cannot be\nchanged."},"white_list":{"type":"array","items":{"$ref":"#/components/schemas/AddressSchema"},"description":"A whitelist of token accounts. Only used if the token is private"}}},"AddressSchema":{"type":"string","title":"string"},"TokenMetadata":{"type":"object","description":"Token metadata for one token.","required":["name","uri","additional_metadata"],"properties":{"additional_metadata":{"type":"array","items":{"$ref":"#/components/schemas/MetadataKVPair"},"description":"must avoid storing the same key twice"},"name":{"type":"string","description":"The longer name of the token"},"uri":{"type":"string","description":"The URI pointing to richer metadata"}}},"MetadataKVPair":{"type":"object","description":"The additional key-value properties for one token.","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"MinterAllowance":{"type":"object","required":["minter","allowance"],"properties":{"allowance":{"$ref":"#/components/schemas/U256Schema"},"minter":{"$ref":"#/components/schemas/AddressSchema"}}},"U256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Update token metadata

## POST /v1/tokens/update\_metadata

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/update_metadata":{"post":{"tags":["tokens"],"operationId":"update_metadata","requestBody":{"description":"token metadata request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenMetadataRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hash"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"TokenMetadataRequest":{"allOf":[{"$ref":"#/components/schemas/TokenMetadataPayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature"}}}]},"TokenMetadataPayload":{"type":"object","required":["chain_id","nonce","name","uri","token","additional_metadata"],"properties":{"additional_metadata":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePair"},"description":"The additional metadata of the token, can be blank list."},"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"name":{"type":"string","description":"The name of the token."},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token address to set the metadata."},"uri":{"type":"string","description":"The uri of the token."}}},"KeyValuePair":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","description":"The key of the additional metadata."},"value":{"type":"string","description":"The value of the additional metadata."}}},"TokenAddressSchema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"Hash":{"type":"object","description":"Represents a transaction hash returned by the API.","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema"}}},"B256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Grant authority

{% hint style="success" %}
For action type, "Grant" means grant authority to an address, "Revoke" means revoke authority from an address.

For more details on Authority type, please refer to [Token Authority](/core-concepts/token-authority)
{% endhint %}

## POST /v1/tokens/grant\_authority

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/grant_authority":{"post":{"tags":["tokens"],"operationId":"grant_authority","requestBody":{"description":"token authority request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenAuthorityRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hash"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"TokenAuthorityRequest":{"allOf":[{"$ref":"#/components/schemas/TokenAuthorityPayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature"}}}]},"TokenAuthorityPayload":{"type":"object","required":["chain_id","nonce","action","authority_type","authority_address","token","value"],"properties":{"action":{"$ref":"#/components/schemas/AuthorityAction","description":"The action of the transaction: Grant or Revoke."},"authority_address":{"$ref":"#/components/schemas/AddressSchema","description":"The authority address to grant or revoke."},"authority_type":{"$ref":"#/components/schemas/AuthorityType","description":"The authority type of the transaction: Mint, MintTokens, Pause, Burn,\nBlacklist, UpdateMetadata."},"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token address to operate."},"value":{"oneOf":[{"$ref":"#/components/schemas/U256Schema","description":"The allowance value of tokens to grant, only works for `MintTokens`\ntype."}],"default":"0"}}},"AuthorityAction":{"type":"string","enum":["Grant","Revoke"]},"AddressSchema":{"type":"string","title":"string"},"AuthorityType":{"type":"string","enum":["MasterMintBurn","MintBurnTokens","Pause","ManageList","UpdateMetadata","Bridge"]},"TokenAddressSchema":{"type":"string","title":"string"},"U256Schema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"Hash":{"type":"object","description":"Represents a transaction hash returned by the API.","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema"}}},"B256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Mint

## POST /v1/tokens/mint

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/mint":{"post":{"tags":["tokens"],"operationId":"mint_token","requestBody":{"description":"token mint request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenMintRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hash"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"TokenMintRequest":{"allOf":[{"$ref":"#/components/schemas/TokenMintPayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature"}}}],"description":"Request parameters for the token mint."},"TokenMintPayload":{"type":"object","required":["chain_id","nonce","recipient","value","token"],"properties":{"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The recipient address of the token mint to."},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token address of the transaction."},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to mint."}}},"AddressSchema":{"type":"string","title":"string"},"TokenAddressSchema":{"type":"string","title":"string"},"U256Schema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"Hash":{"type":"object","description":"Represents a transaction hash returned by the API.","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema"}}},"B256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Burn

## POST /v1/tokens/burn

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/burn":{"post":{"tags":["tokens"],"operationId":"burn_token","requestBody":{"description":"token burn request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenBurnRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hash"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"TokenBurnRequest":{"allOf":[{"$ref":"#/components/schemas/TokenBurnPayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature"}}}]},"TokenBurnPayload":{"type":"object","required":["chain_id","nonce","recipient","value","token"],"properties":{"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"This field is obsolete and will be ignored. The tokens will be burnt\nfrom the signer's wallet."},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token address of the transaction."},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to burn."}}},"AddressSchema":{"type":"string","title":"string"},"TokenAddressSchema":{"type":"string","title":"string"},"U256Schema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"Hash":{"type":"object","description":"Represents a transaction hash returned by the API.","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema"}}},"B256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Blacklist

The blacklist feature allows token issuers to **block specific addresses** from holding or transferring tokens. This feature is **only available for public tokens** (tokens created with `is_private = false`).

### How It Works

* **Default State**: All addresses can freely use the token
* **After Blacklisting**: Blocked addresses cannot receive or send the token
* **Authority**: Only the token's master authority can manage the blacklist

### Use Cases

* **Compliance**: Block sanctioned addresses (OFAC, EU sanctions)
* **Security**: Block compromised or malicious addresses
* **Risk Management**: Prevent known bad actors from using the token
* **Regulatory**: Meet jurisdictional requirements for token operations

### Key Points

* Blacklist is **permanent** until explicitly removed
* Blacklisted addresses **cannot**:
  * Receive tokens (transfers will fail)
  * Send tokens (transfers will be blocked)
  * Participate in token-related activities
* Adding/removing addresses requires gas fees
* All blacklist changes emit on-chain events for transparency

### Common Scenarios

#### Regulatory Compliance

Financial institutions use blacklists to comply with anti-money laundering (AML) regulations by blocking addresses associated with illegal activities.

#### Emergency Response

When a security breach occurs, quickly blacklist compromised addresses to prevent further damage.

#### Exchange Integration

Exchanges can blacklist addresses involved in hacks or scams to protect their users.

### Important Notes

* **Public Tokens Only**: Cannot use blacklist on private tokens
* **No Retroactive Effect**: Existing balances remain, but become frozen
* **Careful Management**: Incorrectly blacklisting addresses can lock user funds
* **Legal Considerations**: Ensure blacklisting policies comply with local laws

## POST /v1/tokens/manage\_blacklist

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/manage_blacklist":{"post":{"tags":["tokens"],"operationId":"manage_blacklist","requestBody":{"description":"token blacklist management request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlacklistRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hash"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"BlacklistRequest":{"allOf":[{"$ref":"#/components/schemas/BlacklistPayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature"}}}],"description":"Blacklist request for managing token blacklists"},"BlacklistPayload":{"type":"object","description":"Payload for blacklist operations","required":["chain_id","nonce","action","address","token"],"properties":{"action":{"$ref":"#/components/schemas/BlacklistAction","description":"The action of the transaction: Add or Remove from blacklist."},"address":{"$ref":"#/components/schemas/AddressSchema","description":"The address to be added to or removed from blacklist."},"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token address of the transaction."}}},"BlacklistAction":{"type":"string","description":"Action types for blacklist operations","enum":["Add","Remove"]},"AddressSchema":{"type":"string","title":"string"},"TokenAddressSchema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"Hash":{"type":"object","description":"Represents a transaction hash returned by the API.","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema"}}},"B256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Whitelist

The whitelist feature enables token issuers to **explicitly grant access** to specific addresses for holding and transferring tokens. This feature is **only available for private tokens** (tokens created with `is_private = true`).

### How It Works

* **Default State**: No addresses can use the token
* **After Whitelisting**: Only approved addresses can receive and send the token
* **Authority**: Only the token's master authority can manage the whitelist

### Use Cases

* **Security Tokens**: Restrict access to accredited investors only
* **Private Sales**: Control participation in token sales
* **Enterprise Tokens**: Limit usage to verified business partners
* **Membership Tokens**: Grant access to exclusive community members

### Key Points

* Only whitelisted addresses can interact with the token
* Non-whitelisted addresses **cannot**:
  * Receive tokens (transfers will fail)
  * Send tokens (blocked at protocol level)
  * View or interact with token functions
* Whitelist status can be revoked at any time
* All whitelist changes are recorded on-chain

### Common Scenarios

#### KYC/AML Compliance

Private tokens often require Know Your Customer (KYC) verification before whitelisting, ensuring only verified users can participate.

#### Phased Access

Projects can gradually whitelist addresses for controlled token distribution phases (private sale → public sale → general access).

#### Geographic Restrictions

Whitelist only addresses from permitted jurisdictions to comply with regional regulations.

### Important Notes

* **Private Tokens Only**: Cannot use whitelist on public tokens
* **Strict Access Control**: No exceptions for non-whitelisted addresses
* **Planning Required**: Must whitelist addresses before they can receive tokens
* **Operational Overhead**: Requires active management as new users join

## POST /v1/tokens/manage\_whitelist

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/manage_whitelist":{"post":{"tags":["tokens"],"operationId":"manage_whitelist","requestBody":{"description":"token whitelist management request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hash"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"WhitelistRequest":{"allOf":[{"$ref":"#/components/schemas/WhitelistPayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature"}}}],"description":"Whitelist request for managing token whitelists"},"WhitelistPayload":{"type":"object","description":"Payload for whitelist operations","required":["chain_id","nonce","action","address","token"],"properties":{"action":{"$ref":"#/components/schemas/WhitelistAction","description":"The action of the transaction: Add or Remove from whitelist."},"address":{"$ref":"#/components/schemas/AddressSchema","description":"The address to be added to or removed from whitelist."},"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token address of the transaction."}}},"WhitelistAction":{"type":"string","description":"Action types for whitelist operations","enum":["Add","Remove"]},"AddressSchema":{"type":"string","title":"string"},"TokenAddressSchema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"Hash":{"type":"object","description":"Represents a transaction hash returned by the API.","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema"}}},"B256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Pause/Unpause

{% hint style="success" %}
For action field, "Pause" means you can pause all activities for the token you issued, "Unpause" means you can unpause all activities.
{% endhint %}

## POST /v1/tokens/pause

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"tokens","description":"Tokens API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/tokens/pause":{"post":{"tags":["tokens"],"operationId":"pause_token","requestBody":{"description":"token pause request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPauseRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hash"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"TokenPauseRequest":{"allOf":[{"$ref":"#/components/schemas/TokenPausePayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature"}}}]},"TokenPausePayload":{"type":"object","required":["chain_id","nonce","action","token"],"properties":{"action":{"$ref":"#/components/schemas/PauseAction","description":"The action of the transaction: Pause or Unpause."},"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token address of the transaction."}}},"PauseAction":{"type":"string","enum":["Pause","Unpause"]},"TokenAddressSchema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"Hash":{"type":"object","description":"Represents a transaction hash returned by the API.","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema"}}},"B256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Checkpoints

**Endpoints**

<table><thead><tr><th width="122">Method</th><th width="299">URL</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/checkpoints/number</kbd></td><td>get latest checkpoint number</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/checkpoints/by_number</kbd></td><td>get checkpoint by number</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/checkpoints/by_hash</kbd></td><td>get checkpoint by hash</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/checkpoints/receipt/by_number</kbd></td><td>get checkpoint receipt by number</td></tr></tbody></table>


# Get the latest Checkpoint number

Get the most recent Checkpoint

## GET /v1/checkpoints/number

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"checkpoints","description":"Checkpoints API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/checkpoints/number":{"get":{"tags":["checkpoints"],"operationId":"get_number","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointNumber"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"CheckpointNumber":{"type":"object","required":["number"],"properties":{"number":{"type":"integer","format":"int64","minimum":0}}},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Get checkpoint by number

## GET /v1/checkpoints/by\_number

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"checkpoints","description":"Checkpoints API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/checkpoints/by_number":{"get":{"tags":["checkpoints"],"operationId":"get_by_number","parameters":[{"name":"number","in":"query","description":"Number of the checkpoint to lookup","required":true,"schema":{"type":"string"}},{"name":"full","in":"query","description":"Full transaction details","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkpoint"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"Checkpoint":{"allOf":[{"$ref":"#/components/schemas/Header","description":"Header of the checkpoint."},{"type":"object","required":["transactions"],"properties":{"size":{"type":"integer","format":"int64","description":"Integer the size of this checkpoint in bytes.","minimum":0},"transactions":{"$ref":"#/components/schemas/CheckpointTransactions","description":"Checkpoint Transactions."}}}]},"Header":{"type":"object","description":"checkpoint header representation.","required":["hash","parent_hash","state_root","transactions_root","receipts_root","number","timestamp","extra_data"],"properties":{"extra_data":{"type":"string","description":"Extra data"},"hash":{"$ref":"#/components/schemas/B256Schema","description":"Hash of the checkpoint"},"number":{"type":"integer","format":"int64","description":"Checkpoint number","minimum":0},"parent_hash":{"$ref":"#/components/schemas/B256Schema","description":"Hash of the parent"},"receipts_root":{"$ref":"#/components/schemas/B256Schema","description":"Transactions receipts root hash"},"state_root":{"$ref":"#/components/schemas/B256Schema","description":"State root hash"},"timestamp":{"type":"integer","format":"int64","description":"Timestamp","minimum":0},"transactions_root":{"$ref":"#/components/schemas/B256Schema","description":"Transactions root hash"}}},"B256Schema":{"type":"string","title":"string"},"CheckpointTransactions":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Transaction"},"description":"Full transactions"},{"$ref":"#/components/schemas/B256Schema","description":"Only hashes"}],"description":"Checkpoint Transactions depending on the boolean attribute of\n`getCheckpointBy*`."},"Transaction":{"allOf":[{"$ref":"#/components/schemas/TxPayload"},{"type":"object","required":["hash","chain_id","from","nonce","signature"],"properties":{"chain_id":{"$ref":"#/components/schemas/u64","description":"The chain id of the transaction, if any."},"checkpoint_hash":{"$ref":"#/components/schemas/B256Schema","description":"Checkpoint hash"},"checkpoint_number":{"type":"integer","format":"int64","description":"Checkpoint number","minimum":0},"from":{"$ref":"#/components/schemas/AddressSchema","description":"Sender"},"hash":{"$ref":"#/components/schemas/B256Schema","description":"Transaction hash"},"nonce":{"$ref":"#/components/schemas/u64","description":"Nonce"},"signature":{"$ref":"#/components/schemas/RestSignature","description":"All _flattened_ fields of the transaction signature.\nNote: this is an option so special transaction types without a signature (e.g. <https://github.com/ethereum-optimism/optimism/blob/0bf643c4147b43cd6f25a759d331ef3a2a61a2a3/specs/deposits.md#the-deposited-transaction-type>) can be supported."},"transaction_index":{"type":"integer","format":"int64","description":"Transaction index","minimum":0}}}]},"TxPayload":{"oneOf":[{"type":"object","description":"Create a new mint token. After the token is created, the\n`master_authority` of the token is initialized with the provided\n`master_authority` parameter.\n\nRefer to `TokenInstruction::CreateNewToken`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Create a new mint token. After the token is created, the\n`master_authority` of the token is initialized with the provided\n`master_authority` parameter.\n\nRefer to `TokenInstruction::CreateNewToken`.","required":["symbol","decimals","master_authority","is_private","name"],"properties":{"decimals":{"type":"integer","format":"int32","description":"Number of base 10 digits to the right of the decimal place.","minimum":0},"is_private":{"type":"boolean","description":"`true` if this token is private and only whitelisted addresses can\noperate with the tokens"},"master_authority":{"$ref":"#/components/schemas/AddressSchema","description":"The master authority of the token."},"name":{"type":"string","description":"The name of the token to create."},"symbol":{"type":"string","description":"The symbol of the token to create."}}},"transaction_type":{"type":"string","enum":["TokenCreate"]}}},{"type":"object","description":"Transfer tokens from one account to another. The signer of message must\nbe the owner of the source account. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Transfer`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Transfer tokens from one account to another. The signer of message must\nbe the owner of the source account. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Transfer`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The real recipient address."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address, if it's native token, token address is `None`."},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to transfer."}}},"transaction_type":{"type":"string","enum":["TokenTransfer"]}}},{"type":"object","description":"Grant authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::GrantAuthority`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Grant authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::GrantAuthority`.","required":["authority_type","authority_address","token"],"properties":{"authority_address":{"$ref":"#/components/schemas/AddressSchema","description":"The new authority address to grant or revoke."},"authority_type":{"type":"string","description":"The type of authority to update."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The allowance value of tokens to grant, only works for\n`MintBurnTokens` type."}}},"transaction_type":{"type":"string","enum":["TokenGrantAuthority"]}}},{"type":"object","description":"Revoke authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::RevokeAuthority`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Revoke authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::RevokeAuthority`.","required":["authority_type","authority_address","token"],"properties":{"authority_address":{"$ref":"#/components/schemas/AddressSchema","description":"The new authority"},"authority_type":{"type":"string","description":"The type of authority to update."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The allowance value of tokens to revoke, only works for\n`MintBurnTokens` type."}}},"transaction_type":{"type":"string","enum":["TokenRevokeAuthority"]}}},{"type":"object","description":"Add the account to the blacklisted accounts. The signer of message must\nbe the Mint's `blacklist_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::BlacklistAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Add the account to the blacklisted accounts. The signer of message must\nbe the Mint's `blacklist_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::BlacklistAccount`.","required":["address","token"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"The account to blacklist"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenBlacklistAccount"]}}},{"type":"object","description":"Whitelist the a previously blacklisted account. The signer of message\nmust be the Mint's `blacklist_authority`. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::WhitelistAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Whitelist the a previously blacklisted account. The signer of message\nmust be the Mint's `blacklist_authority`. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::WhitelistAccount`.","required":["address","token"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"The account to whitelist"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenWhitelistAccount"]}}},{"type":"object","description":"Mints new tokens to an account. The signer of the message must be Mint's\n`mint_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::MintTo`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Mints new tokens to an account. The signer of the message must be Mint's\n`mint_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::MintTo`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The recipient address of the token mint to."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of new tokens to mint."}}},"transaction_type":{"type":"string","enum":["TokenMint"]}}},{"type":"object","description":"Bridge tokens from another chain and mint them to an account. This\ninstruction creates new tokens representing bridged assets. The\nsigner must have bridge authority.\n\nRefer to `TokenInstruction::BridgeAndMint`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Bridge tokens from another chain and mint them to an account. This\ninstruction creates new tokens representing bridged assets. The\nsigner must have bridge authority.\n\nRefer to `TokenInstruction::BridgeAndMint`.","required":["recipient","value","source_chain_id","source_tx_hash","token"],"properties":{"bridge_metadata":{"type":["string","null"],"description":"Optional bridge metadata for additional verification."},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The recipient address to mint tokens to."},"source_chain_id":{"type":"integer","format":"int64","description":"The chain ID from which tokens are being bridged.","minimum":0},"source_tx_hash":{"type":"string","description":"The transaction hash on the source chain proving the lock/burn."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to mint from the bridge."}}},"transaction_type":{"type":"string","enum":["TokenBridgeAndMint"]}}},{"type":"object","description":"Burns tokens by removing them from an account. The signer of the message\nmust be Mint's `mint_burn` authority. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::BurnFromAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Burns tokens by removing them from an account. The signer of the message\nmust be Mint's `mint_burn` authority. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::BurnFromAccount`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"This field is obsolete and will be ignored. The tokens will be burnt\nfrom the signer's wallet."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to burn."}}},"transaction_type":{"type":"string","enum":["TokenBurn"]}}},{"type":"object","description":"Burn tokens and initiate bridge to another chain. This instruction burns\ntokens and records bridge information for the destination chain. The\nsigner must be the account owner or have appropriate authority.\n\nRefer to `TokenInstruction::BurnAndBridge`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Burn tokens and initiate bridge to another chain. This instruction burns\ntokens and records bridge information for the destination chain. The\nsigner must be the account owner or have appropriate authority.\n\nRefer to `TokenInstruction::BurnAndBridge`.","required":["value","sender","destination_chain_id","destination_address","escrow_fee","token"],"properties":{"bridge_metadata":{"type":["string","null"],"description":"Optional bridge metadata for additional information"},"bridge_param":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BytesSchema","description":"Optional bridge parameters as arbitrary bytes"}]},"destination_address":{"type":"string","description":"The destination address on the target chain"},"destination_chain_id":{"type":"integer","format":"int64","description":"The destination chain ID to bridge tokens to","minimum":0},"escrow_fee":{"$ref":"#/components/schemas/U256Schema","description":"The bridging fee necessary to escrow for transferring tokens to the\ndestination chain"},"sender":{"$ref":"#/components/schemas/AddressSchema","description":"This field is obsolete and will be ignored. The tokens will be burnt\nfrom the signer's wallet."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to burn for bridging"}}},"transaction_type":{"type":"string","enum":["TokenBurnAndBridge"]}}},{"type":"object","description":"Close an account. Note that an account can be closed only if the token\nbalance is zero.\n\nRefer to `TokenInstruction::CloseAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Close an account. Note that an account can be closed only if the token\nbalance is zero.\n\nRefer to `TokenInstruction::CloseAccount`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenCloseAccount"]}}},{"type":"object","description":"Pause all transactions associated with the Mint. The signer of the\nmessage must be the Mint's `pause_authority`. Otherwise the\ntransaction may fail.\n\nRefer to `TokenInstruction::Pause`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Pause all transactions associated with the Mint. The signer of the\nmessage must be the Mint's `pause_authority`. Otherwise the\ntransaction may fail.\n\nRefer to `TokenInstruction::Pause`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenPause"]}}},{"type":"object","description":"Unpause transactions for the Mint. The signer of the message must be the\nMint's `pause_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Unpause`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Unpause transactions for the Mint. The signer of the message must be the\nMint's `pause_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Unpause`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenUnpause"]}}},{"type":"object","description":"Update token metadata. The signer of the message must be the Mint's\n`metadata_update_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::UpdateMetadata`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Update token metadata. The signer of the message must be the Mint's\n`metadata_update_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::UpdateMetadata`.","required":["metadata","token"],"properties":{"metadata":{"$ref":"#/components/schemas/TokenMetadata","description":"The metadata to update"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenUpdateMetadata"]}}},{"type":"object","description":"Add a pricing plan that defines custom fee behavior.\n\nRefer to the `AddPricingPlanPayload`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Add a pricing plan that defines custom fee behavior.\n\nRefer to the `AddPricingPlanPayload`.","required":["plan"],"properties":{"plan":{"description":"Complete plan definition that will be stored on chain."}}},"transaction_type":{"type":"string","enum":["AddPricingPlan"]}}},{"type":"object","description":"Remove an existing pricing plan from the network.\n\nRefer to the `RemovePricingPlanPayload`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Remove an existing pricing plan from the network.\n\nRefer to the `RemovePricingPlanPayload`.","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"Identifier of the plan to remove."}}},"transaction_type":{"type":"string","enum":["RemovePricingPlan"]}}},{"type":"object","description":"Raw transaction data, all unsupported instructions are encoded as raw\ndata.\n\nThis variant is used for all instructions that are not supported by the\ncurrent version of the API. Just for compatibility.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Raw transaction data, all unsupported instructions are encoded as raw\ndata.\n\nThis variant is used for all instructions that are not supported by the\ncurrent version of the API. Just for compatibility.","required":["input","token"],"properties":{"input":{"$ref":"#/components/schemas/BytesSchema","description":"The input data of the transaction."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["Raw"]}}}],"description":"Instructions supported by mint token"},"AddressSchema":{"type":"string","title":"string"},"U256Schema":{"type":"string","title":"string"},"BytesSchema":{"type":"string","title":"hex string"},"TokenMetadata":{"type":"object","description":"Token metadata for one token.","required":["name","uri","additional_metadata"],"properties":{"additional_metadata":{"type":"array","items":{"$ref":"#/components/schemas/MetadataKVPair"},"description":"must avoid storing the same key twice"},"name":{"type":"string","description":"The longer name of the token"},"uri":{"type":"string","description":"The URI pointing to richer metadata"}}},"MetadataKVPair":{"type":"object","description":"The additional key-value properties for one token.","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"u64":{"type":"integer","format":"int64","minimum":0},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Get checkpoint by hash

## GET /v1/checkpoints/by\_hash

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"checkpoints","description":"Checkpoints API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/checkpoints/by_hash":{"get":{"tags":["checkpoints"],"operationId":"get_by_hash","parameters":[{"name":"hash","in":"query","description":"hash of the checkpoint to lookup","required":true,"schema":{"type":"string"}},{"name":"full","in":"query","description":"Full transaction details","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkpoint"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"Checkpoint":{"allOf":[{"$ref":"#/components/schemas/Header","description":"Header of the checkpoint."},{"type":"object","required":["transactions"],"properties":{"size":{"type":"integer","format":"int64","description":"Integer the size of this checkpoint in bytes.","minimum":0},"transactions":{"$ref":"#/components/schemas/CheckpointTransactions","description":"Checkpoint Transactions."}}}]},"Header":{"type":"object","description":"checkpoint header representation.","required":["hash","parent_hash","state_root","transactions_root","receipts_root","number","timestamp","extra_data"],"properties":{"extra_data":{"type":"string","description":"Extra data"},"hash":{"$ref":"#/components/schemas/B256Schema","description":"Hash of the checkpoint"},"number":{"type":"integer","format":"int64","description":"Checkpoint number","minimum":0},"parent_hash":{"$ref":"#/components/schemas/B256Schema","description":"Hash of the parent"},"receipts_root":{"$ref":"#/components/schemas/B256Schema","description":"Transactions receipts root hash"},"state_root":{"$ref":"#/components/schemas/B256Schema","description":"State root hash"},"timestamp":{"type":"integer","format":"int64","description":"Timestamp","minimum":0},"transactions_root":{"$ref":"#/components/schemas/B256Schema","description":"Transactions root hash"}}},"B256Schema":{"type":"string","title":"string"},"CheckpointTransactions":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Transaction"},"description":"Full transactions"},{"$ref":"#/components/schemas/B256Schema","description":"Only hashes"}],"description":"Checkpoint Transactions depending on the boolean attribute of\n`getCheckpointBy*`."},"Transaction":{"allOf":[{"$ref":"#/components/schemas/TxPayload"},{"type":"object","required":["hash","chain_id","from","nonce","signature"],"properties":{"chain_id":{"$ref":"#/components/schemas/u64","description":"The chain id of the transaction, if any."},"checkpoint_hash":{"$ref":"#/components/schemas/B256Schema","description":"Checkpoint hash"},"checkpoint_number":{"type":"integer","format":"int64","description":"Checkpoint number","minimum":0},"from":{"$ref":"#/components/schemas/AddressSchema","description":"Sender"},"hash":{"$ref":"#/components/schemas/B256Schema","description":"Transaction hash"},"nonce":{"$ref":"#/components/schemas/u64","description":"Nonce"},"signature":{"$ref":"#/components/schemas/RestSignature","description":"All _flattened_ fields of the transaction signature.\nNote: this is an option so special transaction types without a signature (e.g. <https://github.com/ethereum-optimism/optimism/blob/0bf643c4147b43cd6f25a759d331ef3a2a61a2a3/specs/deposits.md#the-deposited-transaction-type>) can be supported."},"transaction_index":{"type":"integer","format":"int64","description":"Transaction index","minimum":0}}}]},"TxPayload":{"oneOf":[{"type":"object","description":"Create a new mint token. After the token is created, the\n`master_authority` of the token is initialized with the provided\n`master_authority` parameter.\n\nRefer to `TokenInstruction::CreateNewToken`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Create a new mint token. After the token is created, the\n`master_authority` of the token is initialized with the provided\n`master_authority` parameter.\n\nRefer to `TokenInstruction::CreateNewToken`.","required":["symbol","decimals","master_authority","is_private","name"],"properties":{"decimals":{"type":"integer","format":"int32","description":"Number of base 10 digits to the right of the decimal place.","minimum":0},"is_private":{"type":"boolean","description":"`true` if this token is private and only whitelisted addresses can\noperate with the tokens"},"master_authority":{"$ref":"#/components/schemas/AddressSchema","description":"The master authority of the token."},"name":{"type":"string","description":"The name of the token to create."},"symbol":{"type":"string","description":"The symbol of the token to create."}}},"transaction_type":{"type":"string","enum":["TokenCreate"]}}},{"type":"object","description":"Transfer tokens from one account to another. The signer of message must\nbe the owner of the source account. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Transfer`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Transfer tokens from one account to another. The signer of message must\nbe the owner of the source account. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Transfer`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The real recipient address."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address, if it's native token, token address is `None`."},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to transfer."}}},"transaction_type":{"type":"string","enum":["TokenTransfer"]}}},{"type":"object","description":"Grant authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::GrantAuthority`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Grant authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::GrantAuthority`.","required":["authority_type","authority_address","token"],"properties":{"authority_address":{"$ref":"#/components/schemas/AddressSchema","description":"The new authority address to grant or revoke."},"authority_type":{"type":"string","description":"The type of authority to update."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The allowance value of tokens to grant, only works for\n`MintBurnTokens` type."}}},"transaction_type":{"type":"string","enum":["TokenGrantAuthority"]}}},{"type":"object","description":"Revoke authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::RevokeAuthority`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Revoke authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::RevokeAuthority`.","required":["authority_type","authority_address","token"],"properties":{"authority_address":{"$ref":"#/components/schemas/AddressSchema","description":"The new authority"},"authority_type":{"type":"string","description":"The type of authority to update."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The allowance value of tokens to revoke, only works for\n`MintBurnTokens` type."}}},"transaction_type":{"type":"string","enum":["TokenRevokeAuthority"]}}},{"type":"object","description":"Add the account to the blacklisted accounts. The signer of message must\nbe the Mint's `blacklist_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::BlacklistAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Add the account to the blacklisted accounts. The signer of message must\nbe the Mint's `blacklist_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::BlacklistAccount`.","required":["address","token"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"The account to blacklist"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenBlacklistAccount"]}}},{"type":"object","description":"Whitelist the a previously blacklisted account. The signer of message\nmust be the Mint's `blacklist_authority`. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::WhitelistAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Whitelist the a previously blacklisted account. The signer of message\nmust be the Mint's `blacklist_authority`. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::WhitelistAccount`.","required":["address","token"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"The account to whitelist"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenWhitelistAccount"]}}},{"type":"object","description":"Mints new tokens to an account. The signer of the message must be Mint's\n`mint_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::MintTo`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Mints new tokens to an account. The signer of the message must be Mint's\n`mint_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::MintTo`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The recipient address of the token mint to."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of new tokens to mint."}}},"transaction_type":{"type":"string","enum":["TokenMint"]}}},{"type":"object","description":"Bridge tokens from another chain and mint them to an account. This\ninstruction creates new tokens representing bridged assets. The\nsigner must have bridge authority.\n\nRefer to `TokenInstruction::BridgeAndMint`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Bridge tokens from another chain and mint them to an account. This\ninstruction creates new tokens representing bridged assets. The\nsigner must have bridge authority.\n\nRefer to `TokenInstruction::BridgeAndMint`.","required":["recipient","value","source_chain_id","source_tx_hash","token"],"properties":{"bridge_metadata":{"type":["string","null"],"description":"Optional bridge metadata for additional verification."},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The recipient address to mint tokens to."},"source_chain_id":{"type":"integer","format":"int64","description":"The chain ID from which tokens are being bridged.","minimum":0},"source_tx_hash":{"type":"string","description":"The transaction hash on the source chain proving the lock/burn."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to mint from the bridge."}}},"transaction_type":{"type":"string","enum":["TokenBridgeAndMint"]}}},{"type":"object","description":"Burns tokens by removing them from an account. The signer of the message\nmust be Mint's `mint_burn` authority. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::BurnFromAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Burns tokens by removing them from an account. The signer of the message\nmust be Mint's `mint_burn` authority. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::BurnFromAccount`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"This field is obsolete and will be ignored. The tokens will be burnt\nfrom the signer's wallet."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to burn."}}},"transaction_type":{"type":"string","enum":["TokenBurn"]}}},{"type":"object","description":"Burn tokens and initiate bridge to another chain. This instruction burns\ntokens and records bridge information for the destination chain. The\nsigner must be the account owner or have appropriate authority.\n\nRefer to `TokenInstruction::BurnAndBridge`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Burn tokens and initiate bridge to another chain. This instruction burns\ntokens and records bridge information for the destination chain. The\nsigner must be the account owner or have appropriate authority.\n\nRefer to `TokenInstruction::BurnAndBridge`.","required":["value","sender","destination_chain_id","destination_address","escrow_fee","token"],"properties":{"bridge_metadata":{"type":["string","null"],"description":"Optional bridge metadata for additional information"},"bridge_param":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BytesSchema","description":"Optional bridge parameters as arbitrary bytes"}]},"destination_address":{"type":"string","description":"The destination address on the target chain"},"destination_chain_id":{"type":"integer","format":"int64","description":"The destination chain ID to bridge tokens to","minimum":0},"escrow_fee":{"$ref":"#/components/schemas/U256Schema","description":"The bridging fee necessary to escrow for transferring tokens to the\ndestination chain"},"sender":{"$ref":"#/components/schemas/AddressSchema","description":"This field is obsolete and will be ignored. The tokens will be burnt\nfrom the signer's wallet."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to burn for bridging"}}},"transaction_type":{"type":"string","enum":["TokenBurnAndBridge"]}}},{"type":"object","description":"Close an account. Note that an account can be closed only if the token\nbalance is zero.\n\nRefer to `TokenInstruction::CloseAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Close an account. Note that an account can be closed only if the token\nbalance is zero.\n\nRefer to `TokenInstruction::CloseAccount`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenCloseAccount"]}}},{"type":"object","description":"Pause all transactions associated with the Mint. The signer of the\nmessage must be the Mint's `pause_authority`. Otherwise the\ntransaction may fail.\n\nRefer to `TokenInstruction::Pause`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Pause all transactions associated with the Mint. The signer of the\nmessage must be the Mint's `pause_authority`. Otherwise the\ntransaction may fail.\n\nRefer to `TokenInstruction::Pause`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenPause"]}}},{"type":"object","description":"Unpause transactions for the Mint. The signer of the message must be the\nMint's `pause_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Unpause`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Unpause transactions for the Mint. The signer of the message must be the\nMint's `pause_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Unpause`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenUnpause"]}}},{"type":"object","description":"Update token metadata. The signer of the message must be the Mint's\n`metadata_update_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::UpdateMetadata`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Update token metadata. The signer of the message must be the Mint's\n`metadata_update_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::UpdateMetadata`.","required":["metadata","token"],"properties":{"metadata":{"$ref":"#/components/schemas/TokenMetadata","description":"The metadata to update"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenUpdateMetadata"]}}},{"type":"object","description":"Add a pricing plan that defines custom fee behavior.\n\nRefer to the `AddPricingPlanPayload`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Add a pricing plan that defines custom fee behavior.\n\nRefer to the `AddPricingPlanPayload`.","required":["plan"],"properties":{"plan":{"description":"Complete plan definition that will be stored on chain."}}},"transaction_type":{"type":"string","enum":["AddPricingPlan"]}}},{"type":"object","description":"Remove an existing pricing plan from the network.\n\nRefer to the `RemovePricingPlanPayload`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Remove an existing pricing plan from the network.\n\nRefer to the `RemovePricingPlanPayload`.","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"Identifier of the plan to remove."}}},"transaction_type":{"type":"string","enum":["RemovePricingPlan"]}}},{"type":"object","description":"Raw transaction data, all unsupported instructions are encoded as raw\ndata.\n\nThis variant is used for all instructions that are not supported by the\ncurrent version of the API. Just for compatibility.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Raw transaction data, all unsupported instructions are encoded as raw\ndata.\n\nThis variant is used for all instructions that are not supported by the\ncurrent version of the API. Just for compatibility.","required":["input","token"],"properties":{"input":{"$ref":"#/components/schemas/BytesSchema","description":"The input data of the transaction."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["Raw"]}}}],"description":"Instructions supported by mint token"},"AddressSchema":{"type":"string","title":"string"},"U256Schema":{"type":"string","title":"string"},"BytesSchema":{"type":"string","title":"hex string"},"TokenMetadata":{"type":"object","description":"Token metadata for one token.","required":["name","uri","additional_metadata"],"properties":{"additional_metadata":{"type":"array","items":{"$ref":"#/components/schemas/MetadataKVPair"},"description":"must avoid storing the same key twice"},"name":{"type":"string","description":"The longer name of the token"},"uri":{"type":"string","description":"The URI pointing to richer metadata"}}},"MetadataKVPair":{"type":"object","description":"The additional key-value properties for one token.","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"u64":{"type":"integer","format":"int64","minimum":0},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Get checkpoint receipts by number

## GET /v1/checkpoints/receipts/by\_number

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"checkpoints","description":"Checkpoints API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/checkpoints/receipts/by_number":{"get":{"tags":["checkpoints"],"operationId":"get_receipts_by_number","parameters":[{"name":"number","in":"query","description":"Number of the checkpoint to lookup","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransactionReceipt"}}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"TransactionReceipt":{"type":"object","description":"Transaction receipt\nThis type is generic over an inner [`ReceiptEnvelope`] which contains\nconsensus data and metadata.","required":["success","transaction_hash","fee_used","from"],"properties":{"checkpoint_hash":{"$ref":"#/components/schemas/B256Schema","description":"Hash of the checkpoint this transaction was included within."},"checkpoint_number":{"type":"integer","format":"int64","description":"Number of the checkpoint this transaction was included within.","minimum":0},"fee_used":{"type":"string","description":"Fee used"},"from":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the sender"},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the recipient. None when its a contract creation transaction."},"success":{"type":"boolean","description":"If transaction is executed successfully."},"success_info":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SuccessInfo","description":"Success information for token transactions"}]},"to":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the recipient. None when its a contract creation transaction.\nThis field will be deprecated, please use `recipient` instead."},"token_address":{"$ref":"#/components/schemas/AddressSchema","description":"Token address"},"transaction_hash":{"$ref":"#/components/schemas/B256Schema","description":"Transaction Hash."},"transaction_index":{"type":"integer","format":"int64","description":"Index within the block.","minimum":0}}},"B256Schema":{"type":"string","title":"string"},"AddressSchema":{"type":"string","title":"string"},"SuccessInfo":{"type":"object","required":["sender","receiver","is_private","message"],"properties":{"bridge_info":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BridgeInfo","description":"Bridge-specific information for BurnAndBridge operations"}]},"is_private":{"type":"boolean","description":"Whether the transaction is private"},"message":{"type":"string","description":"Message associated with the transaction"},"receiver":{"$ref":"#/components/schemas/AddressSchema","description":"Receiver address"},"sender":{"$ref":"#/components/schemas/AddressSchema","description":"Sender address"}}},"BridgeInfo":{"type":"object","required":["bbnonce","destination_chain_id","destination_address"],"properties":{"bbnonce":{"type":"integer","format":"int64","description":"The BurnAndBridge nonce used for sidechain anti-replay protection","minimum":0},"bridge_param":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BytesSchema","description":"Optional bridge parameters as arbitrary bytes"}]},"destination_address":{"type":"string","description":"The destination address on the target chain"},"destination_chain_id":{"type":"integer","format":"int64","description":"The destination chain ID for the bridge operation","minimum":0}}},"BytesSchema":{"type":"string","title":"hex string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Transactions

**Endpoints**

<table><thead><tr><th width="122">Method</th><th width="368">URL</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/transactions/by_hash</kbd></td><td>get transaction by hash</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/transactions/receipt/by_hash</kbd></td><td>get transaction receipt by hash</td></tr><tr><td><mark style="color:green;"><strong>POST</strong></mark></td><td><kbd>/v1/transactions/payment</kbd></td><td>send payment</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/transactions/estimate_fee</kbd></td><td>get payment fee</td></tr><tr><td><mark style="color:blue;"><strong>GET</strong></mark></td><td><kbd>/v1/transactions/finalized/by_hash</kbd></td><td>get finalized transaction by hash</td></tr></tbody></table>


# Get transaction by hash

## GET /v1/transactions/by\_hash

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"transactions","description":"Transactions API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/transactions/by_hash":{"get":{"tags":["transactions"],"operationId":"get_by_hash","parameters":[{"name":"hash","in":"query","description":"hash of the transaction to lookup","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"Transaction":{"allOf":[{"$ref":"#/components/schemas/TxPayload"},{"type":"object","required":["hash","chain_id","from","nonce","signature"],"properties":{"chain_id":{"$ref":"#/components/schemas/u64","description":"The chain id of the transaction, if any."},"checkpoint_hash":{"$ref":"#/components/schemas/B256Schema","description":"Checkpoint hash"},"checkpoint_number":{"type":"integer","format":"int64","description":"Checkpoint number","minimum":0},"from":{"$ref":"#/components/schemas/AddressSchema","description":"Sender"},"hash":{"$ref":"#/components/schemas/B256Schema","description":"Transaction hash"},"nonce":{"$ref":"#/components/schemas/u64","description":"Nonce"},"signature":{"$ref":"#/components/schemas/RestSignature","description":"All _flattened_ fields of the transaction signature.\nNote: this is an option so special transaction types without a signature (e.g. <https://github.com/ethereum-optimism/optimism/blob/0bf643c4147b43cd6f25a759d331ef3a2a61a2a3/specs/deposits.md#the-deposited-transaction-type>) can be supported."},"transaction_index":{"type":"integer","format":"int64","description":"Transaction index","minimum":0}}}]},"TxPayload":{"oneOf":[{"type":"object","description":"Create a new mint token. After the token is created, the\n`master_authority` of the token is initialized with the provided\n`master_authority` parameter.\n\nRefer to `TokenInstruction::CreateNewToken`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Create a new mint token. After the token is created, the\n`master_authority` of the token is initialized with the provided\n`master_authority` parameter.\n\nRefer to `TokenInstruction::CreateNewToken`.","required":["symbol","decimals","master_authority","is_private","name"],"properties":{"decimals":{"type":"integer","format":"int32","description":"Number of base 10 digits to the right of the decimal place.","minimum":0},"is_private":{"type":"boolean","description":"`true` if this token is private and only whitelisted addresses can\noperate with the tokens"},"master_authority":{"$ref":"#/components/schemas/AddressSchema","description":"The master authority of the token."},"name":{"type":"string","description":"The name of the token to create."},"symbol":{"type":"string","description":"The symbol of the token to create."}}},"transaction_type":{"type":"string","enum":["TokenCreate"]}}},{"type":"object","description":"Transfer tokens from one account to another. The signer of message must\nbe the owner of the source account. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Transfer`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Transfer tokens from one account to another. The signer of message must\nbe the owner of the source account. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Transfer`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The real recipient address."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address, if it's native token, token address is `None`."},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to transfer."}}},"transaction_type":{"type":"string","enum":["TokenTransfer"]}}},{"type":"object","description":"Grant authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::GrantAuthority`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Grant authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::GrantAuthority`.","required":["authority_type","authority_address","token"],"properties":{"authority_address":{"$ref":"#/components/schemas/AddressSchema","description":"The new authority address to grant or revoke."},"authority_type":{"type":"string","description":"The type of authority to update."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The allowance value of tokens to grant, only works for\n`MintBurnTokens` type."}}},"transaction_type":{"type":"string","enum":["TokenGrantAuthority"]}}},{"type":"object","description":"Revoke authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::RevokeAuthority`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Revoke authority to another account. The signer of message must be the\nMint's `master_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::RevokeAuthority`.","required":["authority_type","authority_address","token"],"properties":{"authority_address":{"$ref":"#/components/schemas/AddressSchema","description":"The new authority"},"authority_type":{"type":"string","description":"The type of authority to update."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The allowance value of tokens to revoke, only works for\n`MintBurnTokens` type."}}},"transaction_type":{"type":"string","enum":["TokenRevokeAuthority"]}}},{"type":"object","description":"Add the account to the blacklisted accounts. The signer of message must\nbe the Mint's `blacklist_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::BlacklistAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Add the account to the blacklisted accounts. The signer of message must\nbe the Mint's `blacklist_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::BlacklistAccount`.","required":["address","token"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"The account to blacklist"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenBlacklistAccount"]}}},{"type":"object","description":"Whitelist the a previously blacklisted account. The signer of message\nmust be the Mint's `blacklist_authority`. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::WhitelistAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Whitelist the a previously blacklisted account. The signer of message\nmust be the Mint's `blacklist_authority`. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::WhitelistAccount`.","required":["address","token"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"The account to whitelist"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenWhitelistAccount"]}}},{"type":"object","description":"Mints new tokens to an account. The signer of the message must be Mint's\n`mint_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::MintTo`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Mints new tokens to an account. The signer of the message must be Mint's\n`mint_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::MintTo`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The recipient address of the token mint to."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of new tokens to mint."}}},"transaction_type":{"type":"string","enum":["TokenMint"]}}},{"type":"object","description":"Bridge tokens from another chain and mint them to an account. This\ninstruction creates new tokens representing bridged assets. The\nsigner must have bridge authority.\n\nRefer to `TokenInstruction::BridgeAndMint`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Bridge tokens from another chain and mint them to an account. This\ninstruction creates new tokens representing bridged assets. The\nsigner must have bridge authority.\n\nRefer to `TokenInstruction::BridgeAndMint`.","required":["recipient","value","source_chain_id","source_tx_hash","token"],"properties":{"bridge_metadata":{"type":["string","null"],"description":"Optional bridge metadata for additional verification."},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The recipient address to mint tokens to."},"source_chain_id":{"type":"integer","format":"int64","description":"The chain ID from which tokens are being bridged.","minimum":0},"source_tx_hash":{"type":"string","description":"The transaction hash on the source chain proving the lock/burn."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to mint from the bridge."}}},"transaction_type":{"type":"string","enum":["TokenBridgeAndMint"]}}},{"type":"object","description":"Burns tokens by removing them from an account. The signer of the message\nmust be Mint's `mint_burn` authority. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::BurnFromAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Burns tokens by removing them from an account. The signer of the message\nmust be Mint's `mint_burn` authority. Otherwise the transaction may\nfail.\n\nRefer to `TokenInstruction::BurnFromAccount`.","required":["value","recipient","token"],"properties":{"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"This field is obsolete and will be ignored. The tokens will be burnt\nfrom the signer's wallet."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to burn."}}},"transaction_type":{"type":"string","enum":["TokenBurn"]}}},{"type":"object","description":"Burn tokens and initiate bridge to another chain. This instruction burns\ntokens and records bridge information for the destination chain. The\nsigner must be the account owner or have appropriate authority.\n\nRefer to `TokenInstruction::BurnAndBridge`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Burn tokens and initiate bridge to another chain. This instruction burns\ntokens and records bridge information for the destination chain. The\nsigner must be the account owner or have appropriate authority.\n\nRefer to `TokenInstruction::BurnAndBridge`.","required":["value","sender","destination_chain_id","destination_address","escrow_fee","token"],"properties":{"bridge_metadata":{"type":["string","null"],"description":"Optional bridge metadata for additional information"},"bridge_param":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BytesSchema","description":"Optional bridge parameters as arbitrary bytes"}]},"destination_address":{"type":"string","description":"The destination address on the target chain"},"destination_chain_id":{"type":"integer","format":"int64","description":"The destination chain ID to bridge tokens to","minimum":0},"escrow_fee":{"$ref":"#/components/schemas/U256Schema","description":"The bridging fee necessary to escrow for transferring tokens to the\ndestination chain"},"sender":{"$ref":"#/components/schemas/AddressSchema","description":"This field is obsolete and will be ignored. The tokens will be burnt\nfrom the signer's wallet."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"},"value":{"$ref":"#/components/schemas/U256Schema","description":"The amount of tokens to burn for bridging"}}},"transaction_type":{"type":"string","enum":["TokenBurnAndBridge"]}}},{"type":"object","description":"Close an account. Note that an account can be closed only if the token\nbalance is zero.\n\nRefer to `TokenInstruction::CloseAccount`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Close an account. Note that an account can be closed only if the token\nbalance is zero.\n\nRefer to `TokenInstruction::CloseAccount`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenCloseAccount"]}}},{"type":"object","description":"Pause all transactions associated with the Mint. The signer of the\nmessage must be the Mint's `pause_authority`. Otherwise the\ntransaction may fail.\n\nRefer to `TokenInstruction::Pause`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Pause all transactions associated with the Mint. The signer of the\nmessage must be the Mint's `pause_authority`. Otherwise the\ntransaction may fail.\n\nRefer to `TokenInstruction::Pause`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenPause"]}}},{"type":"object","description":"Unpause transactions for the Mint. The signer of the message must be the\nMint's `pause_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Unpause`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Unpause transactions for the Mint. The signer of the message must be the\nMint's `pause_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::Unpause`.","required":["token"],"properties":{"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenUnpause"]}}},{"type":"object","description":"Update token metadata. The signer of the message must be the Mint's\n`metadata_update_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::UpdateMetadata`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Update token metadata. The signer of the message must be the Mint's\n`metadata_update_authority`. Otherwise the transaction may fail.\n\nRefer to `TokenInstruction::UpdateMetadata`.","required":["metadata","token"],"properties":{"metadata":{"$ref":"#/components/schemas/TokenMetadata","description":"The metadata to update"},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["TokenUpdateMetadata"]}}},{"type":"object","description":"Add a pricing plan that defines custom fee behavior.\n\nRefer to the `AddPricingPlanPayload`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Add a pricing plan that defines custom fee behavior.\n\nRefer to the `AddPricingPlanPayload`.","required":["plan"],"properties":{"plan":{"description":"Complete plan definition that will be stored on chain."}}},"transaction_type":{"type":"string","enum":["AddPricingPlan"]}}},{"type":"object","description":"Remove an existing pricing plan from the network.\n\nRefer to the `RemovePricingPlanPayload`.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Remove an existing pricing plan from the network.\n\nRefer to the `RemovePricingPlanPayload`.","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/AddressSchema","description":"Identifier of the plan to remove."}}},"transaction_type":{"type":"string","enum":["RemovePricingPlan"]}}},{"type":"object","description":"Raw transaction data, all unsupported instructions are encoded as raw\ndata.\n\nThis variant is used for all instructions that are not supported by the\ncurrent version of the API. Just for compatibility.","required":["data","transaction_type"],"properties":{"data":{"type":"object","description":"Raw transaction data, all unsupported instructions are encoded as raw\ndata.\n\nThis variant is used for all instructions that are not supported by the\ncurrent version of the API. Just for compatibility.","required":["input","token"],"properties":{"input":{"$ref":"#/components/schemas/BytesSchema","description":"The input data of the transaction."},"token":{"$ref":"#/components/schemas/AddressSchema","description":"The token address"}}},"transaction_type":{"type":"string","enum":["Raw"]}}}],"description":"Instructions supported by mint token"},"AddressSchema":{"type":"string","title":"string"},"U256Schema":{"type":"string","title":"string"},"BytesSchema":{"type":"string","title":"hex string"},"TokenMetadata":{"type":"object","description":"Token metadata for one token.","required":["name","uri","additional_metadata"],"properties":{"additional_metadata":{"type":"array","items":{"$ref":"#/components/schemas/MetadataKVPair"},"description":"must avoid storing the same key twice"},"name":{"type":"string","description":"The longer name of the token"},"uri":{"type":"string","description":"The URI pointing to richer metadata"}}},"MetadataKVPair":{"type":"object","description":"The additional key-value properties for one token.","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"}}},"u64":{"type":"integer","format":"int64","minimum":0},"B256Schema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Get transaction receipt by hash

## GET /v1/transactions/receipt/by\_hash

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"transactions","description":"Transactions API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/transactions/receipt/by_hash":{"get":{"tags":["transactions"],"operationId":"get_receipt_by_hash","parameters":[{"name":"hash","in":"query","description":"hash of the transaction to lookup","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionReceipt"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"TransactionReceipt":{"type":"object","description":"Transaction receipt\nThis type is generic over an inner [`ReceiptEnvelope`] which contains\nconsensus data and metadata.","required":["success","transaction_hash","fee_used","from"],"properties":{"checkpoint_hash":{"$ref":"#/components/schemas/B256Schema","description":"Hash of the checkpoint this transaction was included within."},"checkpoint_number":{"type":"integer","format":"int64","description":"Number of the checkpoint this transaction was included within.","minimum":0},"fee_used":{"type":"string","description":"Fee used"},"from":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the sender"},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the recipient. None when its a contract creation transaction."},"success":{"type":"boolean","description":"If transaction is executed successfully."},"success_info":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SuccessInfo","description":"Success information for token transactions"}]},"to":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the recipient. None when its a contract creation transaction.\nThis field will be deprecated, please use `recipient` instead."},"token_address":{"$ref":"#/components/schemas/AddressSchema","description":"Token address"},"transaction_hash":{"$ref":"#/components/schemas/B256Schema","description":"Transaction Hash."},"transaction_index":{"type":"integer","format":"int64","description":"Index within the block.","minimum":0}}},"B256Schema":{"type":"string","title":"string"},"AddressSchema":{"type":"string","title":"string"},"SuccessInfo":{"type":"object","required":["sender","receiver","is_private","message"],"properties":{"bridge_info":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BridgeInfo","description":"Bridge-specific information for BurnAndBridge operations"}]},"is_private":{"type":"boolean","description":"Whether the transaction is private"},"message":{"type":"string","description":"Message associated with the transaction"},"receiver":{"$ref":"#/components/schemas/AddressSchema","description":"Receiver address"},"sender":{"$ref":"#/components/schemas/AddressSchema","description":"Sender address"}}},"BridgeInfo":{"type":"object","required":["bbnonce","destination_chain_id","destination_address"],"properties":{"bbnonce":{"type":"integer","format":"int64","description":"The BurnAndBridge nonce used for sidechain anti-replay protection","minimum":0},"bridge_param":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BytesSchema","description":"Optional bridge parameters as arbitrary bytes"}]},"destination_address":{"type":"string","description":"The destination address on the target chain"},"destination_chain_id":{"type":"integer","format":"int64","description":"The destination chain ID for the bridge operation","minimum":0}}},"BytesSchema":{"type":"string","title":"hex string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Submit payment

## POST /v1/transactions/payment

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"transactions","description":"Transactions API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/transactions/payment":{"post":{"tags":["transactions"],"operationId":"payment","requestBody":{"description":"transaction request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTransactionRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Hash"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"PaymentTransactionRequest":{"allOf":[{"$ref":"#/components/schemas/PaymentPayload"},{"type":"object","required":["signature"],"properties":{"signature":{"$ref":"#/components/schemas/RestSignature","description":"The signature of the transaction."}}}],"description":"Represents token transfer transaction requests to/from REST."},"PaymentPayload":{"type":"object","required":["chain_id","nonce","recipient","value","token"],"properties":{"chain_id":{"type":"integer","format":"int64","description":"The chain id of the transaction.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"The nonce of the transaction.","minimum":0},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"The destination address of the transaction."},"token":{"$ref":"#/components/schemas/TokenAddressSchema","description":"The token address of the transaction."},"value":{"$ref":"#/components/schemas/U256Schema","description":"The token value of the transaction to be transferred."}}},"AddressSchema":{"type":"string","title":"string"},"TokenAddressSchema":{"type":"string","title":"string"},"U256Schema":{"type":"string","title":"string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"Hash":{"type":"object","description":"Represents a transaction hash returned by the API.","required":["hash"],"properties":{"hash":{"$ref":"#/components/schemas/B256Schema"}}},"B256Schema":{"type":"string","title":"string"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```

{% hint style="success" %}
The following code segment demonstrates a Golang implementation for transaction submission.
{% endhint %}

```go
import (
	"fmt"
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/crypto"
	"github.com/ethereum/go-ethereum/rlp"
	"math/big"
)

var privateKey = "01833a126ec45d0191519748146b9e35647aab7fed28de1c8e17824970f964a3"

type PaymentPayload struct {
	RecentCheckpoint uint64         `json:"recent_checkpoint"`
	ChainID          uint64         `json:"chain_id"`
	Nonce            uint64         `json:"nonce"`
	Recipient        common.Address `json:"recipient"`
	Value            *big.Int       `json:"value"`
	Token            common.Address `json:"token"`
}

type PaymentRequest struct {
	PaymentPayload
	Signature Signature `json:"signature"`
}

type Signature struct {
	R string
	S string
	V uint64
}

func SignMessage(msg *PaymentMessage) (*Signature, error) {
	encoded, err := rlp.EncodeToBytes(msg)
	if err != nil {
		return nil, err
	}
	hash := crypto.Keccak256(encoded)
	fmt.Printf("Signature Hash: %s\n", common.BytesToHash(hash))
	key, err := crypto.HexToECDSA(privateKey)
	if err != nil {
		return nil, err
	}
	sign, err := crypto.Sign(hash, key)
	if err != nil {
		return nil, err
	}
	fmt.Printf("Signature: 0x%x\n", sign)
	fmt.Printf("Raw bytes: %v\n", sign)
	r := sign[:32]
	s := sign[32:64]
	v := sign[64]
	return &Signature{
		R: common.BytesToHash(r).Hex(),
		S: common.BytesToHash(s).Hex(),
		V: uint64(v),
	}, nil
}

func main() {
	tokenAddr := common.HexToAddress("0x2045a425D0e131E747f8be2F044413733e412d7d")
	payment := &PaymentMessage{
		RecentCheckpoint: 	100,
		ChainID: 		big.NewInt(1212101),
		Nonce:   		0,
		To:      		common.HexToAddress("0x937b9aff6404141681cbf39301aeb869500bbdf0"),
		Value:   		big.NewInt(1),
		Token:   		&tokenAddr,
	}
	signature, err := SignMessage(payment)
	if err != nil {
		panic(fmt.Sprintf("sign payment msg error: %v", err))
	}
	fmt.Printf("Payment msg Signature: %v\n", signature)
}
```


# Estimate fee

## GET /v1/transactions/estimate\_fee

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"transactions","description":"Transactions API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/transactions/estimate_fee":{"get":{"tags":["transactions"],"operationId":"estimate_fee","parameters":[{"name":"from","in":"query","description":"address of the transaction signer","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","description":"token address to lookup balance for","required":false,"schema":{"type":"string"}},{"name":"value","in":"query","description":"value of the transaction","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateFee"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"EstimateFee":{"type":"object","required":["fee"],"properties":{"fee":{"type":"string"}}},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Get finalized transaction by hash

## GET /v1/transactions/finalized/by\_hash

>

```json
{"openapi":"3.1.0","info":{"title":"om-api-rest","version":"0.1.0"},"tags":[{"name":"transactions","description":"Transactions API"}],"servers":[{"url":"https://api.testnet.1money.network","description":"Testnet API server"},{"url":"https://api.1money.network","description":"Mainnet API server"},{"url":"http://localhost:18555","description":"Local API server"}],"paths":{"/v1/transactions/finalized/by_hash":{"get":{"tags":["transactions"],"operationId":"get_finalized_transaction_by_hash","parameters":[{"name":"hash","in":"query","description":"hash of the transaction to lookup","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizedTransaction"}}}},"400":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"422":{"description":"Business logic error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RESTErrorData"}}}}}}}},"components":{"schemas":{"FinalizedTransaction":{"allOf":[{"$ref":"#/components/schemas/TransactionReceipt"},{"type":"object","required":["epoch","counter_signatures"],"properties":{"counter_signatures":{"type":"array","items":{"$ref":"#/components/schemas/RestSignature"}},"epoch":{"type":"integer","format":"int64","minimum":0}}}],"description":"Finalized transaction with counter-signatures"},"TransactionReceipt":{"type":"object","description":"Transaction receipt\nThis type is generic over an inner [`ReceiptEnvelope`] which contains\nconsensus data and metadata.","required":["success","transaction_hash","fee_used","from"],"properties":{"checkpoint_hash":{"$ref":"#/components/schemas/B256Schema","description":"Hash of the checkpoint this transaction was included within."},"checkpoint_number":{"type":"integer","format":"int64","description":"Number of the checkpoint this transaction was included within.","minimum":0},"fee_used":{"type":"string","description":"Fee used"},"from":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the sender"},"recipient":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the recipient. None when its a contract creation transaction."},"success":{"type":"boolean","description":"If transaction is executed successfully."},"success_info":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SuccessInfo","description":"Success information for token transactions"}]},"to":{"$ref":"#/components/schemas/AddressSchema","description":"Address of the recipient. None when its a contract creation transaction.\nThis field will be deprecated, please use `recipient` instead."},"token_address":{"$ref":"#/components/schemas/AddressSchema","description":"Token address"},"transaction_hash":{"$ref":"#/components/schemas/B256Schema","description":"Transaction Hash."},"transaction_index":{"type":"integer","format":"int64","description":"Index within the block.","minimum":0}}},"B256Schema":{"type":"string","title":"string"},"AddressSchema":{"type":"string","title":"string"},"SuccessInfo":{"type":"object","required":["sender","receiver","is_private","message"],"properties":{"bridge_info":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BridgeInfo","description":"Bridge-specific information for BurnAndBridge operations"}]},"is_private":{"type":"boolean","description":"Whether the transaction is private"},"message":{"type":"string","description":"Message associated with the transaction"},"receiver":{"$ref":"#/components/schemas/AddressSchema","description":"Receiver address"},"sender":{"$ref":"#/components/schemas/AddressSchema","description":"Sender address"}}},"BridgeInfo":{"type":"object","required":["bbnonce","destination_chain_id","destination_address"],"properties":{"bbnonce":{"type":"integer","format":"int64","description":"The BurnAndBridge nonce used for sidechain anti-replay protection","minimum":0},"bridge_param":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BytesSchema","description":"Optional bridge parameters as arbitrary bytes"}]},"destination_address":{"type":"string","description":"The destination address on the target chain"},"destination_chain_id":{"type":"integer","format":"int64","description":"The destination chain ID for the bridge operation","minimum":0}}},"BytesSchema":{"type":"string","title":"hex string"},"RestSignature":{"type":"object","description":"Signature type for REST requests.\n\nWe use this type to avoid the ambiguity of the signature type in the core\nprimitives.\n\nThis type is referred to `https://github.com/alloy-rs/alloy/blob/b2278c40b2693908e4e5108d65ade26e8d716765/crates/rpc-types-eth/src/transaction/signature.rs#L9`.","required":["r","s","v"],"properties":{"r":{"$ref":"#/components/schemas/SignatureRSchema","description":"The R field of the signature; the point on the curve."},"s":{"$ref":"#/components/schemas/SignatureSSchema","description":"The S field of the signature; the point on the curve."},"v":{"type":"integer","format":"int64","description":"For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0\nfor even, 1 for odd) of the y-value of the secp256k1 signature.\n\nFor legacy transactions, this is the recovery id\n\nSee also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>","minimum":0}}},"SignatureRSchema":{"type":"string","title":"string","description":"Signature R schema"},"SignatureSSchema":{"type":"string","title":"string","description":"Signature S schema"},"RESTErrorData":{"type":"object","required":["error_code","message"],"properties":{"error_code":{"type":"string","description":"Structured error code for programmatic handling"},"message":{"type":"string","description":"Human-readable error message"}}}}}}
```


# Error Codes

## REST API Error Codes

This document provides a comprehensive reference for all error codes returned by the 1Money Network REST API. Each error includes a structured error code, HTTP status code, description, and example response.

### Error Response Format

All API errors follow a consistent JSON response format:

```json
{
  "error_code": "validation_invalid_address",
  "message": "Invalid address format: 0xinvalid"
}
```

### Error Categories

#### 400 Bad Request - Client Input Validation Errors

These errors indicate that the client request contains invalid or malformed data.

**`validation_invalid_address`**

* **HTTP Status**: 400 Bad Request
* **Description**: The provided address format is invalid
* **Example**: Invalid Ethereum address format
* **Response**:

```json
{
  "error_code": "validation_invalid_address",
  "message": "Invalid address format: 0xinvalid"
}
```

**`validation_invalid_hash`**

* **HTTP Status**: 400 Bad Request
* **Description**: The provided hash format is invalid
* **Example**: Invalid transaction hash or block hash format
* **Response**:

```json
{
  "error_code": "validation_invalid_hash",
  "message": "Invalid hash format: 0xinvalidhash"
}
```

**`validation_invalid_param`**

* **HTTP Status**: 400 Bad Request
* **Description**: A parameter value is invalid or malformed
* **Example**: Invalid numeric value, enum value, or parameter format
* **Response**:

```json
{
  "error_code": "validation_invalid_param",
  "message": "Invalid parameter 'amount': must be a positive number"
}
```

**`validation_missing_param`**

* **HTTP Status**: 400 Bad Request
* **Description**: A required parameter is missing from the request
* **Example**: Missing required field in request body or query parameters
* **Response**:

```json
{
  "error_code": "validation_missing_param",
  "message": "Missing required parameter: recipient"
}
```

**`validation_query_error`**

* **HTTP Status**: 400 Bad Request
* **Description**: Query parameters are malformed or invalid
* **Example**: Invalid query string format or unsupported parameters
* **Response**:

```json
{
  "error_code": "validation_query_error",
  "message": "Invalid query parameters: unsupported parameter 'invalid_param'"
}
```

**`validation_invalid_signature`**

* **HTTP Status**: 400 Bad Request
* **Description**: Transaction signature is invalid or malformed
* **Example**: Invalid cryptographic signature format
* **Response**:

```json
{
  "error_code": "validation_invalid_signature",
  "message": "Invalid signature: signature verification failed"
}
```

**`validation_invalid_transaction`**

* **HTTP Status**: 400 Bad Request
* **Description**: Transaction structure or format is invalid
* **Example**: Malformed transaction data or invalid transaction type
* **Response**:

```json
{
  "error_code": "validation_invalid_transaction",
  "message": "Invalid transaction: missing required field 'nonce'"
}
```

#### 404 Not Found - Resource Not Found Errors

These errors indicate that the requested resource does not exist.

**`resource_checkpoint_not_found`**

* **HTTP Status**: 404 Not Found
* **Description**: The requested checkpoint does not exist
* **Example**: Checkpoint with specified ID or hash not found
* **Response**:

```json
{
  "error_code": "resource_checkpoint_not_found",
  "message": "Checkpoint not found: 12345"
}
```

**`resource_transaction_not_found`**

* **HTTP Status**: 404 Not Found
* **Description**: The requested transaction does not exist
* **Example**: Transaction with specified hash not found
* **Response**:

```json
{
  "error_code": "resource_transaction_not_found",
  "message": "Transaction not found: 0xabcd1234..."
}
```

**`resource_account_not_found`**

* **HTTP Status**: 404 Not Found
* **Description**: The requested account does not exist
* **Example**: Account with specified address not found
* **Response**:

```json
{
  "error_code": "resource_account_not_found",
  "message": "Account not found: 0x1234567890abcdef..."
}
```

**`resource_token_not_found`**

* **HTTP Status**: 404 Not Found
* **Description**: The requested token does not exist
* **Example**: Token with specified address not found
* **Response**:

```json
{
  "error_code": "resource_token_not_found",
  "message": "Token not found: 0xtoken123..."
}
```

**`resource_epoch_not_found`**

* **HTTP Status**: 404 Not Found
* **Description**: The requested epoch does not exist
* **Example**: Epoch with specified ID not found
* **Response**:

```json
{
  "error_code": "resource_epoch_not_found",
  "message": "Epoch not found: 42"
}
```

#### 422 Unprocessable Entity - Business Logic Errors

These errors indicate that the request is well-formed but cannot be processed due to business rule violations.

**`business_transaction_failed`**

* **HTTP Status**: 422 Unprocessable Entity
* **Description**: Transaction processing failed due to business rules
* **Example**: Transaction validation failed, insufficient gas, or other business logic errors
* **Response**:

```json
{
  "error_code": "business_transaction_failed",
  "message": "Transaction processing failed: insufficient gas for execution"
}
```

**`business_insufficient_balance`**

* **HTTP Status**: 422 Unprocessable Entity
* **Description**: Account has insufficient balance for the operation
* **Example**: Attempting to transfer more tokens than available
* **Response**:

```json
{
  "error_code": "business_insufficient_balance",
  "message": "Insufficient balance: required 1000, available 500"
}
```

**`business_authority_failed`**

* **HTTP Status**: 422 Unprocessable Entity
* **Description**: Authority validation failed for the operation
* **Example**: Insufficient permissions for token operations or governance actions
* **Response**:

```json
{
  "error_code": "business_authority_failed",
  "message": "Authority validation failed: insufficient permissions for mint operation"
}
```

**`business_token_operation_failed`**

* **HTTP Status**: 422 Unprocessable Entity
* **Description**: Token operation cannot be performed
* **Example**: Token is paused, blacklisted account, or other token-specific restrictions
* **Response**:

```json
{
  "error_code": "business_token_operation_failed",
  "message": "Token operation not allowed: token is currently paused"
}
```

#### 500 Internal Server Error - System Errors

These errors indicate internal system problems that are not caused by client input.

**`system_database_error`**

* **HTTP Status**: 500 Internal Server Error
* **Description**: Database or storage system error
* **Example**: Database connection failure, storage corruption, or query execution error
* **Response**:

```json
{
  "error_code": "system_database_error",
  "message": "Database error: connection timeout"
}
```

**`system_network_error`**

* **HTTP Status**: 500 Internal Server Error
* **Description**: Network or communication error
* **Example**: P2P network issues, consensus communication failures
* **Response**:

```json
{
  "error_code": "system_network_error",
  "message": "Network error: failed to connect to peer nodes"
}
```

**`system_service_error`**

* **HTTP Status**: 500 Internal Server Error
* **Description**: Internal service error
* **Example**: Consensus service failure, execution engine error, or other internal component errors
* **Response**:

```json
{
  "error_code": "system_service_error",
  "message": "Internal service error: consensus - checkpoint processing failed"
}
```

**`system_config_error`**

* **HTTP Status**: 500 Internal Server Error
* **Description**: System configuration error
* **Example**: Invalid configuration, missing required settings, or configuration conflicts
* **Response**:

```json
{
  "error_code": "system_config_error",
  "message": "Configuration error: missing required validator configuration"
}
```

#### 408 Request Timeout - Request Processing Timeout

This error indicates that the server timed out while processing the request.

**`request_timeout`**

* **HTTP Status**: 408 Request Timeout
* **Description**: The server timed out while processing the request (10 second timeout)
* **Example**: Long-running operations that exceed the server timeout limit
* **Response**:

```json
{
  "error_code": "request_timeout",
  "message": "Request timeout: processing time exceeded 10 seconds"
}
```

#### WebSocket Specific Errors

These errors are specific to WebSocket connections and real-time subscriptions.

**`websocket_invalid_message`**

* **HTTP Status**: 400 Bad Request
* **Description**: Invalid WebSocket subscription message
* **Example**: Malformed subscription request or unsupported message format
* **Response**:

```json
{
  "error_code": "websocket_invalid_message",
  "message": "Invalid subscription message: unsupported subscription type"
}
```

**`websocket_unsupported_codec`**

* **HTTP Status**: 400 Bad Request
* **Description**: Unsupported WebSocket codec
* **Example**: Client requested unsupported message encoding format
* **Response**:

```json
{
  "error_code": "websocket_unsupported_codec",
  "message": "Unsupported WebSocket codec: binary"
}
```

### Error Handling Best Practices

#### For API Clients

1. **Always check the `error_code` field** for programmatic error handling
2. **Use the HTTP status code** to determine the general error category
3. **Display the `message` field** to users for human-readable error descriptions

#### For Application Developers

1. **Implement retry logic** for 5xx system errors and 408 timeout errors
2. **Validate input** on the client side to minimize 4xx validation errors
3. **Handle 404 errors gracefully** by showing appropriate "not found" messages
4. **For 422 errors**, guide users to correct business logic violations
5. **For 408 timeout errors**, implement exponential backoff retry strategies
6. **Monitor error rates** and patterns for system health insights

### Common Error Scenarios

#### Transaction Submission

* `validation_invalid_transaction`: Malformed transaction data
* `validation_invalid_signature`: Invalid cryptographic signature
* `business_transaction_failed`: Transaction rejected by business rules
* `business_insufficient_balance`: Not enough funds for the operation

#### Resource Queries

* `validation_invalid_address`: Invalid address format in query
* `validation_invalid_hash`: Invalid hash format in query
* `resource_transaction_not_found`: Transaction doesn't exist
* `resource_account_not_found`: Account doesn't exist

#### Token Operations

* `resource_token_not_found`: Token doesn't exist
* `business_authority_failed`: Insufficient permissions
* `business_token_operation_failed`: Token-specific restrictions

#### System Issues

* `system_database_error`: Storage system problems
* `system_service_error`: Internal component failures
* `system_network_error`: Network connectivity issues

#### Timeout Issues

* `request_timeout`: Server processing timeout (10 second limit exceeded)

***


# Websocket

To use the websocket API, connect to the following environments:

### Testnet

`wss://ws.testnet.1money.network`

`wss://ws1.testnet.1money.network`

`wss://ws2.testnet.1money.network`

{% hint style="success" %}
Prior to starting, you can test out your connectivity via your terminal:

`wscat -c wss://ws.testnet.1money.network -P`&#x20;

or&#x20;

`websocat wss://ws.testnet.1money.network/`

{% endhint %}

### Mainnet

(Coming soon)


# Subscribing & Unsubscribing

### Subscribing

Subscribing to checkpoints enables you to listen to current state events for accounts, transactions (such as payments) and token activity.&#x20;

To subscribe to a stream with the name `stream` send a text frame over the websocket connection with the following JSON payload:

```
{
  "id": 1,
  "method": "SUBSCRIBE",
  "stream": 
      {
          "name": "CHECKPOINTS",
          "full": true
      }
}
```

confirmation will be received as below:

```
{
  "id": 1,
  "result": "11223344556677889900"
}
```

{% hint style="success" %}
Have a try with below command in your terminal:

```json
{"id": 1,"method": "SUBSCRIBE","stream": {"name": "CHECKPOINTS","full": true}}
```

or with below:

<pre class="language-json"><code class="lang-json"><strong>{"id": 1,"method": "SUBSCRIBE","stream": {"name": "CHECKPOINTS","full": false}}
</strong></code></pre>

{% endhint %}

### Unsubscribing

Similarly, to unsubscribe from a stream with the name `stream`:

```
{
  "id", 1,
  "method": "UNSUBSCRIBE",
  "stream": "CHECKPOINTS"
}
```

confirmation will be received as below:

```
{
  "id": 1,
  "result": true
}
```

{% hint style="success" %}
When subscribed, try with below command in your terminal:

```json
{"id": 1,"method": "UNSUBSCRIBE","stream": "CHECKPOINTS"}
```

{% endhint %}


# Retrieving Transaction Details

The `"full": true`  designator provides verbose details for each transaction within the checkpoint:&#x20;

```
{"id": 1,"method": "SUBSCRIBE","stream": {"name": "CHECKPOINTS","full": true}}
```

Example details:

* transaction\_type (eg: "TokenTransfer")
* sender/receiver account addresses&#x20;
* amount of tokens transferred
* fees taken
* token information

This enables a client to subscribe to all current state events or filter for a given Account, Token or  Transactions (by type).&#x20;


# Keeping the connection alive

To keep the connection alive, a <mark style="color:red;">`Ping`</mark> frame will be sent from the server every 20s, and a <mark style="color:red;">`Pong`</mark> is expected to be received from the client. If a `Pong` is not received within 60s, a <mark style="color:red;">`Close`</mark> frame will be sent and the connection will be closed.

If the server is shutting down, a <mark style="color:red;">`Close`</mark> frame will be sent and then a grace period of 20s will be given before the connection is closed. The client should reconnect after receiving the <mark style="color:red;">`Close`</mark> frame. The client will be reconnected to a server that is not shutting down.

{% hint style="success" %}
You will reveice below stream data every 60s:

`< Received ping (data: "hi")`
{% endhint %}


# Stream | Checkpoints

## Subscribing

Once the Checkpoint is subscribed, the following response will be streamed.

### Request:

```
{
  "id": 1,
  "method": "SUBSCRIBE",
  "stream": 
      {
          "name": "CHECKPOINTS",
          "full": true // used to flag whether detailed transactions is required or not
      }
}
```

{% hint style="success" %}
Have a try with below command in your terminal:

```json
{"id": 1,"method": "SUBSCRIBE","stream": {"name": "CHECKPOINTS","full": true}}
```

{% endhint %}

### Payload Response:

<pre><code>//payload
# Event stream pushed

<strong>{
</strong>  "subscription": "3427890921212938834",
  "stream": "CHECKPOINTS",
  "result": {
      "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "number": "1500",
      "parent_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "receipts_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "timestamp": "1739760890",
      "transactions_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "size": 1,
      "transactions": [
        {
            "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",

          "checkpoint_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "checkpoint_number": "10",
          "transaction_index": "10",

          "transaction_type": "TokenCreate",
          "data": {
              "decimals": 8,
              "master_authority": "0x0000000000000000000000000000000000000000000000000000000000000000",
              "symbol": "USDX"
          },

          "chain_id": "21210",
          "from": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "fee": "10",
          "nonce": "10",

          "signature": {
            "r": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "s": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "v": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "y_parity": true
          },
        }
      ]
    }
}
</code></pre>

## Non-Full Mode Subscription

### Request:

```
{
  "id": 1,
  "method": "SUBSCRIBE",
  "stream": 
      {
          "name": "CHECKPOINTS",
          "full": false // used to flag whether detailed transactions is required or not
      }
}
```

{% hint style="success" %}

Have a try with below command in your terminal:

<pre class="language-json"><code class="lang-json"><strong>{"id": 1,"method": "SUBSCRIBE","stream": {"name": "CHECKPOINTS","full": false}}
</strong></code></pre>

{% endhint %}

### Payload Response:

```
//payload
# Event stream pushed

{
  "subscription": "3427890921212938834",
  "stream": "CHECKPOINTS",
  "result": {
      "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "number": "1500",
      "parent_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "receipts_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "timestamp": "1739760890",
      "transactions_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "size": 1
    }
}
```


# Data Dictionary

Protocol Reference

{% hint style="info" %}
For better integration, we will provide all data dictionary in this section to help you mapping all response from our REST  and web-socket responses.
{% endhint %}

{% hint style="warning" %}
Work in progress: More to come soon!
{% endhint %}

* [Transaction Types](/integrations/data-dictionary/transaction-types)


# Transaction Types

{% hint style="info" %}

## Transaction Payload Types

The Transaction Payload Types represents the various transaction types supported by the system. Each transaction type serves a specific purpose in the token management lifecycle, from creation to transfers and administrative operations.

Transaction Type is used to help you parse corresponding field returned from method, eg: <mark style="color:red;">`get transaction by hash`</mark> / <mark style="color:red;">`get checkpoint by number`</mark> (the transaction data in the response)
{% endhint %}

[**TokenCreate**](/integrations/data-dictionary/transaction-types/tokencreate)

[**TokenTransfer**](/integrations/data-dictionary/transaction-types/tokentransfer)

[**TokenGrantAuthority**](/integrations/data-dictionary/transaction-types/tokengrantauthority)

[**TokenRevokeAuthority**](/integrations/data-dictionary/transaction-types/tokenrevokeauthority)

[**TokenBlacklistAccount**](/integrations/data-dictionary/transaction-types/tokenblacklistaccount)

[**TokenWhitelistAccount**](/integrations/data-dictionary/transaction-types/tokenwhitelistaccount)

[**TokenMint**](/integrations/data-dictionary/transaction-types/tokenmint)

[**TokenBurn**](/integrations/data-dictionary/transaction-types/tokenburn)

[**TokenCloseAccount**](/integrations/data-dictionary/transaction-types/tokencloseaccount)

[**TokenPause**](/integrations/data-dictionary/transaction-types/tokenpause)

[**TokenUnpause**](/integrations/data-dictionary/transaction-types/tokenunpause)

[**TokenUpdateMetadata**](/integrations/data-dictionary/transaction-types/tokenupdatemetadata)

[**Other Transaction Types**](/integrations/data-dictionary/transaction-types/other-transaction-types-wip)


# TokenCreate

Creates a new token with specified properties. After creation, the master\_authority is initialized with the transaction signer. Fields:

| Field             | Type   | Description                                                |
| ----------------- | ------ | ---------------------------------------------------------- |
| symbol            | String | The token's symbol (e.g., "USDX")                          |
| decimals          | u8     | Number of decimal places for the token                     |
| master\_authority | String | The address that will have master authority over the token |

Sample Response:

```json
{
  "transaction_type": "TokenCreate",
  "data": {
    "symbol": "USDX",
    "decimals": 18,
    "master_authority": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3"
  }
}
```


# TokenTransfer

Transfers tokens between accounts. The transaction signer must be the owner of the source account.Fields:

| Field | Type            | Description                           |
| ----- | --------------- | ------------------------------------- |
| value | String          | Amount of tokens to transfer          |
| to    | String          | Recipient address                     |
| token | Option\<String> | Token address (None for native token) |

Sample Response:

```json
{
  "transaction_type": "TokenTransfer",
  "data": {
    "value": "1000000000000000000",
    "to": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3",
    "token": "0x1234567890123456789012345678901234567890"
  }
}
```


# TokenGrantAuthority

Grants authority to another account. The transaction signer must be the token's master\_authority.Fields:

| Field           | Type            | Description                       |
| --------------- | --------------- | --------------------------------- |
| authority\_type | String          | Type of authority to grant        |
| new\_authority  | String          | Address receiving the authority   |
| mint\_tokens    | Option\<String> | Optional amount of tokens to mint |
| token           | String          | Token address                     |

Sample Response:

```json
{
  "transaction_type": "TokenGrantAuthority",
  "data": {
    "authority_type": "master_authority",
    "new_authority": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3",
    "mint_tokens": "1000000000000000000",
    "token": "0x1234567890123456789012345678901234567890"
  }
}
```


# TokenRevokeAuthority

Revokes authority from an account. The transaction signer must be the token's master\_authority.Fields:

| Field           | Type            | Description                       |
| --------------- | --------------- | --------------------------------- |
| authority\_type | String          | Type of authority to revoke       |
| new\_authority  | Address         | Address to transfer authority to  |
| mint\_tokens    | Option\<String> | Optional amount of tokens to mint |
| token           | String          | Token address                     |

Sample Response:

```json
{
  "transaction_type": "TokenRevokeAuthority",
  "data": {
    "authority_type": "master_authority",
    "new_authority": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3",
    "mint_tokens": "1000000000000000000",
    "token": "0x1234567890123456789012345678901234567890"
  }
}
```


# TokenBlacklistAccount

Adds an account to the blacklist. The transaction signer must be the token's blacklist\_authority.Fields:

| Field   | Type   | Description          |
| ------- | ------ | -------------------- |
| address | String | Account to blacklist |
| token   | String | Token address        |

Sample Response:

```json
{
  "transaction_type": "TokenBlacklistAccount",
  "data": {
    "address": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3",
    "token": "0x1234567890123456789012345678901234567890"
  }
}
```


# TokenWhitelistAccount

Removes an account from the blacklist. The transaction signer must be the token's blacklist\_authority.Fields:

| Field   | Type   | Description          |
| ------- | ------ | -------------------- |
| address | String | Account to whitelist |
| token   | String | Token address        |

Sample Response:

```json
{
  "transaction_type": "TokenWhitelistAccount",
  "data": {
    "address": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3",
    "token": "0x1234567890123456789012345678901234567890"
  }
}
```


# TokenMint

Mints new tokens to an account. The transaction signer must be the token's mint\_authority.Fields:

| Field   | Type   | Description              |
| ------- | ------ | ------------------------ |
| value   | String | Amount of tokens to mint |
| address | String | Recipient address        |
| token   | String | Token address            |

Sample Response:

```json
{
  "transaction_type": "TokenMint",
  "data": {
    "value": "1000000000000000000",
    "address": "0x9E1E9688A44D058fF181Ed64ddFAFbBE5CC74ff3",
    "token": "0x1234567890123456789012345678901234567890"
  }
}
```




---

[Next Page](/llms-full.txt/1)

