POST /prepareReforge
Prepares transaction data for a cross-chain transfer.
Body Parameters:
sourceAmount
: The amount of the source token to be transferred.
sourceToken
: The contract address of the source token.
destinationToken
: The contract address of the destination token.
destinationChainId
: The chain ID of the destination blockchain.
sourceRpcUrl
: (Optional) The RPC URL of the source blockchain.
Success Response: 200 OK
Content: { "status": true, "tx": "prepared_transaction_data" }
Error Response: 400 Bad Request
Content: { "error": "error_message" }
POST /executeReforgeAsync
Executes a prepared transaction asynchronously.
Body Parameters:
A TXRequest
object containing the transaction data and wallet information.
Success Response: 200 OK
Content: { "status": true, "receipt": transaction_receipt }
Error Response: 400 Bad Request
Content: { "error": "error_message" }
POST /executeReforge
Executes a prepared transaction.
Body Parameters:
A TXRequest
object as described above.
Success Response: 200 OK
Content: { "status": true, "tx": transaction_response }
Error Response: 400 Bad Request
Content: { "error": "error_message" }
GET /getChainsAndTokens
Retrieves information about supported chains and their tokens.
Success Response: 200 OK
Content: [{"name": "chain_name", "chainId": "chain_id", "tokens": {token_details}}]
Error Response: 400 Bad Request
Content: { "error": "error_message" }
GET /getTestChainsAndTokens
Retrieves information about supported test chains and their tokens.
Success Response: 200 OK
Content: Same structure as /getChainsAndTokens
.
Error Response: 400 Bad Request
Content: Same structure as /getChainsAndTokens
.
TXRequest
An interface for transaction request data.
Properties:
tx
: string
- The encoded transaction data.
walletData
: IWalletData
- Information about the wallet executing the transaction.
An interface for wallet data required to execute a transaction.
Properties:
rpcUrl
: string
- The RPC URL of the blockchain network.
privateKey
: string
- The private key of the wallet.
signer
: JsonRpcSigner
- The object of signer (eg. ether js JsonRpcSigner
)
Also you can try to fork our Postman collection and play with it.
Below are some examples demonstrating how to make requests to each of the API methods described earlier.
These examples use the requests
library, which is a popular choice for making HTTP requests in Python. If you haven't already, you will need to install the requests
library using pip:
To use axios
for making HTTP requests in JavaScript, you first need to ensure that axios
is installed in your project. If you haven't installed it yet, you can do so by running:
These examples show how to use different languages to interact with the API, including how to send GET
and POST
requests, how to include headers, and how to serialize to JSON for the request body. Remember to adjust parameters as needed to match your requirements.
reForge leverages built-in support within E-Assets smart contracts to enable direct, secure transfers across blockchains. This process eliminates the need for users to trust third-party bridging or wrapping services with their assets.
Proof of Burn: A valid proofOfBurn
transaction on one blockchain allows reForge to mint new E-Asset on another blockchain, ensuring no duplicate or double representation of assets.
Minting to Same Address: reForge mints new E-Asset tokens to the same address (msg.sender
) across supported blockchains, significantly lowering the risk of potential man-in-the-middle attacks during asset transfers.
For example, when transferring 100 eEUR from Ethereum to Polygon, reForge executes a function that destroys the 100 ERC20 eEUR tokens on the Ethereum blockchain and issues 100 eEUR tokens on the Polygon Blockchain.
reForge enables industry professionals to convert one currency variant to another (e.g., eEUR to eUSD or eGBP) using the same 'burn and mint' mechanism. This conversion process eschews traditional exchanges, liquidity pools, or third-party services, fostering a more secure, transparent, and trustworthy forex environment.
On-chain Price Oracles: To ensure accurate and reliable foreign exchange rates, reForge utilizes on-chain price oracles provided by Chainlink.
No Double Representation: reForge's mechanism eliminates the possibility of double representation of E-Assets and misrepresentation of the total circulating supply.
Reduced Hacking Risk: By not accumulating large amounts of assets in a single wallet, reForge minimizes the risk of hacking.
A fee of 0.3% is applied to the transferred amount through reForge, with half of these fees allocated towards fulfilling commitments to RYZE token holders. This includes utilizing revenues for further development and community benefits.
🧱 reForge is a cutting-edge solution designed to enable the seamless transfer of E-Assets between supported blockchains, facilitating over-the-counter (OTC) conversions from one E-Asset to another.
Discover how to integrate reForge through the following sections: