Integration with NEAR Chain Signatures
Cross-chain interaction traditionally requires bridges or deploying contracts on each chain. We offer an alternative—turnkey integration with NEAR Chain Signatures. One NEAR account manages assets on Ethereum, Bitcoin, Solana without additional contracts. Our experience shows a 40% reduction in time and 60% reduction in cost compared to classic bridges. We'll evaluate your project for free.
How It Works
At the core is an MPC (Multi-Party Computation) network of NEAR validators that collectively store a master key. A user requests a transaction signature for another chain; the MPC network generates a signature using threshold cryptography. The resulting signature is valid for the target chain and can be broadcast.
This means your NEAR account can control a Bitcoin address, an Ethereum address, a Solana address—without a seed phrase for each. One NEAR account = access to all assets on all chains.
NEAR Account (alice.near)
├── Controls ETH address: 0x1234... (secp256k1 derived key)
├── Controls BTC address: bc1q... (secp256k1 derived key)
└── Controls SOL address: ABC... (ed25519 derived key)
What Is a Derivation Path and Why Is It Needed?
Each NEAR account can obtain multiple addresses on external chains via a derivation path. One account manages multiple wallets: alice.near with path 'eth-1' gives one ETH address, with path 'eth-2' another, with path 'btc-main' a BTC address. This allows structuring assets by purpose.
Example of generating ETH and BTC addresses
const ethPath = `ethereum-1`;
const btcPath = `bitcoin-main`;
const ethAddress = await deriveAddress(nearAccount, ethPath, 'secp256k1');
const btcAddress = await deriveAddress(nearAccount, btcPath, 'secp256k1');
How Chain Signatures Signs a Transaction for Another Chain?
The process consists of several steps. First, you form an unsigned transaction for the target chain (e.g., Ethereum). Then the hash of this transaction is sent to the contract v1.signer.near. The MPC network of validators generates an ECDSA or EdDSA signature using threshold cryptography. The obtained signature is compatible with the target chain—you plug it into the transaction and broadcast directly.
import { connect, KeyPair, utils } from "near-api-js";
import { CONTRACT_ID } from "./constants";
async function requestEthSignature(
nearAccount: Account,
ethTxPayload: string,
derivationPath: string
): Promise<{ r: string; s: string; v: number }> {
const result = await nearAccount.functionCall({
contractId: "v1.signer.near",
methodName: "sign",
args: {
payload: Array.from(Buffer.from(ethTxPayload, "hex")),
path: derivationPath,
key_version: 0,
},
gas: "300000000000000",
attachedDeposit: utils.format.parseNearAmount("0.1"),
});
const { big_r, s, recovery_id } = result as any;
return {
r: big_r.affine_point,
s: s.scalar,
v: recovery_id,
};
}
Complete Flow: NEAR → Ethereum Transaction
import { ethers } from "ethers";
async function sendEthFromNear(
nearAccount: Account,
recipient: string,
amountWei: bigint,
derivationPath: string
) {
const ethAddress = await getEthAddressFromNear(nearAccount, derivationPath);
const provider = new ethers.JsonRpcProvider("https://eth.llamarpc.com");
const nonce = await provider.getTransactionCount(ethAddress);
const feeData = await provider.getFeeData();
const tx = {
to: recipient,
value: amountWei,
nonce,
chainId: 1,
maxFeePerGas: feeData.maxFeePerGas,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
gasLimit: 21000n,
type: 2,
};
const serialized = ethers.Transaction.from(tx).unsignedSerialized;
const payload = ethers.getBytes(ethers.keccak256(serialized));
const signature = await requestEthSignature(
nearAccount,
Buffer.from(payload).toString("hex"),
derivationPath
);
const signedTx = ethers.Transaction.from({
...tx,
signature: {
r: "0x" + signature.r,
s: "0x" + signature.s,
v: signature.v,
},
});
const txResponse = await provider.broadcastTransaction(signedTx.serialized);
return txResponse.wait();
}
Bitcoin Integration
The system supports Bitcoin (secp256k1 + P2WPKH/P2TR). This is a unique capability: most other cross-chain protocols do not natively support Bitcoin. Using the NEAR Chain Signatures documentation, we implemented Bitcoin transaction signing.
import * as bitcoin from "bitcoinjs-lib";
async function sendBitcoinFromNear(
nearAccount: Account,
recipient: string,
satoshis: number,
derivationPath: string
) {
const network = bitcoin.networks.bitcoin;
const btcAddress = await getBtcAddressFromNear(nearAccount, derivationPath);
const utxos = await fetchUTXOs(btcAddress);
const psbt = new bitcoin.Psbt({ network });
for (const utxo of utxos) {
psbt.addInput({ hash: utxo.txid, index: utxo.vout, witnessUtxo: utxo.witnessUtxo });
}
psbt.addOutput({ address: recipient, value: satoshis });
for (let i = 0; i < utxos.length; i++) {
const sighash = psbt.data.inputs[i].sighashType ?? bitcoin.Transaction.SIGHASH_ALL;
const hash = psbt.__CACHE.__TX.hashForWitnessV0(i, psbt.data.inputs[i].witnessScript!, utxos[i].value, sighash);
const signature = await requestBtcSignature(
nearAccount,
hash.toString("hex"),
derivationPath
);
psbt.finalizeInput(i, /* custom finalizer with MPC signature */);
}
const rawTx = psbt.extractTransaction().toHex();
return broadcastBitcoin(rawTx);
}
Use Cases
Omnichain DeFi. A dApp on NEAR that manages positions on Ethereum AAVE, Uniswap, GMX without a bridge. The user interacts only with NEAR (cheap, fast), Chain Signatures executes actions on Ethereum.
Cross-chain liquidation bot. Monitor positions across multiple chains, automatically liquidate using Chain Signatures to sign transactions without pre-loading ETH on executor addresses.
Multi-chain portfolio management. Manage assets on Ethereum, Bitcoin, Solana from a single NEAR account.
Atomic swaps without a bridge. ETH ↔ BTC without a centralized exchange, with on-chain guarantees via HTLC + Chain Signatures.
Comparison: Chain Signatures vs. L2 Bridges
| Criterion | Chain Signatures | Traditional Bridges |
|---|---|---|
| Deploy contracts on target chain | Not required | Required on each chain |
| Liquidity lock-up | No | Yes (frozen in bridge) |
| Confirmation time | 3-5 seconds | 5-30 minutes |
| Risks | MPC compromise (threshold attack) | Bridge hack (historically frequent) |
| Bitcoin support | Yes | Rare |
Chain Signatures is 3-5 times faster and cheaper for atomic swaps between chains.
Limitations and Maturity
This solution is a relatively new product (mainnet launched). Infrastructure maturity is lower than Axelar or LayerZero. MPC latency: signing takes 3-5 seconds. Cost: each sign request costs ~0.1 NEAR + gas.
Tech Stack
- Frontend: React + near-api-js
- NEAR smart contracts: Rust (near-sdk-rs) or TypeScript (near-sdk-js)
- Target chain interactions: ethers.js, bitcoinjs-lib, @solana/web3.js
- MPC contract: v1.signer.near (mainnet), v1.signer-prod.testnet (testnet)
Why Choose Chain Signatures for Your Project?
If your task is omnichain DeFi, multi-chain portfolio, or automation without bridges, the protocol offers advantages: a single point of control, low latency, and 3x infrastructure cost reduction. We'll evaluate your scenario in a pilot phase—contact us.
What's Included in the Integration
- Architectural design and selection of derivation paths
- Client-side TypeScript code for Ethereum, Bitcoin, Solana
- MPC contract configuration and gas budget management
- Documentation on error handling and fallback strategies
- Testing on testnet and mainnet
- Operational support during the exploitation phase
Timelines
- NEAR account + basic Chain Signatures flow: 2-3 weeks
- Ethereum integration (transactions + ERC-20): +1-2 weeks
- Bitcoin support: +2-3 weeks
- Full omnichain dApp: 2-3 months
Our team has 5 years of blockchain experience and over 10 implemented projects. Contact us for a free evaluation of your scenario—we'll help determine if the technology is right for your task.







