Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Please specify base64 encoding, Solana recognizes base58 as default. If you do not specify, you might get malformed transaction error
curl https://nozomi.temporal.xyz/?c=<YOUR_API_KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "sendTransaction",
"params": [
"<YOUR_BASE_64_ENCODED_TXN_BYTES>",
{
"encoding": "base64"
}
]
}'curl -X POST \
"https://nozomi.temporal.xyz/api/sendBatch?c=YOUR_API_KEY" \
-H "Content-Type: application/octet-stream" \
--data-binary @batch.binUse full service RPC for fetching latest blockhash.. Nozomi only supports sendTransaction.
Use full service RPC for fetching latest blockhash. Nozomi only supports sendTransaction.
Use full service RPC for fetching latest blockhash. Nozomi only supports sendTransaction.
Use full service RPC for fetching latest blockhash.
Use full service RPC for fetching latest blockhash.
Use full service RPC for fetching latest blockhash.
Use full service RPC for fetching latest blockhash.
[
{
"time": "string (ISO 8601 timestamp)",
"landed_tips_25th_percentile": "number",
"landed_tips_50th_percentile": "number",
"landed_tips_75th_percentile": "number",
"landed_tips_95th_percentile": "number",
"landed_tips_99th_percentile": "number"
}
]import asyncio
from typing import List
from solders.pubkey import Pubkey
from solders.keypair import Keypair
from solders.signature import Signature
from solders.instruction import Instruction
from solana.transaction import Transaction
from solders.system_program import transfer, TransferParams
from solana.rpc.async_api import AsyncClient
NOZOMI_ENDPOINT = "https://nozomi.temporal.xyz/?c=<YOUR_API_KEY>"
NOZOMI_TIP = Pubkey.from_string("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq")
MIN_TIP_AMOUNT = 1_000_000
SOLANA_RPC_ENDPOINT = "https://api.mainnet-beta.solana.com"
async def send_nozomi_txn(ixns: List[Instruction], signer: Keypair, nozomi_rpc_client: AsyncClient, solana_rpc_client: AsyncClient) -> Signature:
tip_ixn = transfer(TransferParams(
from_pubkey=signer.pubkey(),
to_pubkey=NOZOMI_TIP,
lamports=MIN_TIP_AMOUNT
))
ixns.append(tip_ixn)
blockhash = (await solana_rpc_client.get_latest_blockhash()).value.blockhash
txn = Transaction()
for ixn in ixns:
txn.add(ixn)
# solanapy does not expose an encoding option via TxOpts
return (await nozomi_rpc_client.send_transaction(txn, signer, recent_blockhash=blockhash)).value
def build_ixns() -> List[Instruction]:
# your instruction building logic here..
return []
async def main():
nozomi_rpc_client = AsyncClient(NOZOMI_ENDPOINT)
solana_rpc_client = AsyncClient(SOLANA_RPC_ENDPOINT)
# replace with actual keypair loading logic
signer = Keypair()
ixns = build_ixns()
signature = await send_nozomi_txn(ixns, signer, nozomi_rpc_client, solana_rpc_client)
print(f"Transaction sent with signature: {signature}")
if __name__ == "__main__":
asyncio.run(main())import { Connection, PublicKey, Keypair, SystemProgram, TransactionMessage, VersionedTransaction } from "@solana/web3.js";
const NOZOMI_ENDPOINT = "https://nozomi.temporal.xyz/?c=<YOUR_API_KEY>";
const NOZOMI_TIP = new PublicKey("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq");
const MIN_TIP_AMOUNT = 1_000_000;
const SOLANA_RPC_ENDPOINT = "https://api.mainnet-beta.solana.com";
async function sendNozomiTxn(ixns, signer, nozomiRpcClient, solanaRpcClient) {
const tipIxn = SystemProgram.transfer({
fromPubkey: signer.publicKey,
toPubkey: NOZOMI_TIP,
lamports: MIN_TIP_AMOUNT
});
ixns.push(tipIxn);
const { blockhash } = await solanaRpcClient.getLatestBlockhash();
const messageV0 = new TransactionMessage({
payerKey: signer.publicKey,
recentBlockhash: blockhash,
instructions: ixns,
}).compileToV0Message();
const versionedTxn = new VersionedTransaction(messageV0);
versionedTxn.sign([signer]);
return await nozomiRpcClient.sendTransaction(versionedTxn);
}
function buildIxns() {
// your instruction building logic here..
return [];
}
async function main() {
const nozomiRpcClient = new Connection(NOZOMI_ENDPOINT);
const solanaRpcClient = new Connection(SOLANA_RPC_ENDPOINT);
// replace with actual keypair loading logic
const signer = Keypair.generate();
const ixns = buildIxns();
const signature = await sendNozomiTxn(ixns, signer, nozomiRpcClient, solanaRpcClient);
console.log(`Transaction sent with signature: ${signature}`);
}
main().catch(err => {
console.error(err);
});import { Connection, PublicKey, Keypair, TransactionInstruction, SystemProgram, TransactionMessage, VersionedTransaction, TransactionSignature } from "@solana/web3.js";
const NOZOMI_ENDPOINT = "https://nozomi.temporal.xyz/?c=<YOUR_API_KEY>";
const NOZOMI_TIP = new PublicKey("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq");
const MIN_TIP_AMOUNT = 1_000_000;
const SOLANA_RPC_ENDPOINT = "https://api.mainnet-beta.solana.com";
async function sendNozomiTxn(ixns: TransactionInstruction[], signer: Keypair, nozomiRpcClient: Connection, solanaRpcClient: Connection): Promise<TransactionSignature> {
const tipIxn = SystemProgram.transfer({
fromPubkey: signer.publicKey,
toPubkey: NOZOMI_TIP,
lamports: MIN_TIP_AMOUNT
});
ixns.push(tipIxn);
const { blockhash } = await solanaRpcClient.getLatestBlockhash();
const messageV0 = new TransactionMessage({
payerKey: signer.publicKey,
recentBlockhash: blockhash,
instructions: ixns,
}).compileToV0Message();
const versionedTxn = new VersionedTransaction(messageV0);
versionedTxn.sign([signer]);
return await nozomiRpcClient.sendTransaction(versionedTxn);
}
function buildIxns(): TransactionInstruction[] {
// your instruction building logic here..
return [];
}
async function main() {
const nozomiRpcClient = new Connection(NOZOMI_ENDPOINT);
const solanaRpcClient = new Connection(SOLANA_RPC_ENDPOINT);
// replace with actual keypair loading logic
const signer = Keypair.generate();
const ixns = buildIxns();
const signature = await sendNozomiTxn(ixns, signer, nozomiRpcClient, solanaRpcClient);
console.log(`Transaction sent with signature: ${signature}`);
}
main().catch(err => {
console.error(err);
});
use solana_client::rpc_client::RpcClient;
use solana_sdk::{message::Instruction, pubkey, pubkey::Pubkey, signature::Keypair, signer::Signer, transaction::Transaction};
use base64::{Engine as _, engine::general_purpose};
const NOZOMI_ENDPOINT: &str = "https://nozomi.temporal.xyz/api/sendTransaction2?c=<YOUR_API_KEY>";
const NOZOMI_TIP: Pubkey = pubkey!("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq");
const MIN_TIP_AMOUNT: u64 = 1_000_000;
const SOLANA_RPC_ENDPOINT: &str = "https://api.mainnet-beta.solana.com";
fn send_nozomi_txn(
ixns: &mut Vec<Instruction>,
signer: &Keypair,
nozomi_endpoint: &str,
solana_rpc_client: &RpcClient
) -> Result<(), Box<dyn std::error::Error>> {
let tip_ixn = solana_system_interface::instruction::transfer(
&signer.pubkey(),
&NOZOMI_TIP,
MIN_TIP_AMOUNT
);
ixns.push(tip_ixn);
let blockhash = solana_rpc_client.get_latest_blockhash()?;
let txn = Transaction::new_signed_with_payer(
ixns,
Some(&signer.pubkey()),
&[signer],
blockhash
);
let txn_bytes = bincode::serialize(&txn)?;
let txn_base64 = general_purpose::STANDARD.encode(&txn_bytes);
let client = reqwest::blocking::Client::new();
let response = client
.post(nozomi_endpoint)
.header("Content-Type", "text/plain")
.body(txn_base64)
.send()?;
// api v2 does not return a signature, just check for success
if response.status().is_success() {
Ok(())
} else {
Err(Box::new(response.error_for_status().unwrap_err()))
}
}
fn build_ixns() -> Vec<Instruction> {
// your instruction building logic here..
vec![]
}
fn main() {
let solana_rpc_client = RpcClient::new(SOLANA_RPC_ENDPOINT.to_string());
// replace with actual keypair loading logic
let signer = Keypair::new();
let mut ixns = build_ixns();
if send_nozomi_txn(
&mut ixns,
&signer,
NOZOMI_ENDPOINT,
&solana_rpc_client
).is_ok() {
println!("Transaction sent successfully");
}
}import aiohttp
import asyncio
import base64
from typing import List
from solders.pubkey import Pubkey
from solders.keypair import Keypair
from solders.instruction import Instruction
from solders.transaction import Transaction
from solders.system_program import transfer, TransferParams
from solders.hash import Hash
from solana.rpc.async_api import AsyncClient
NOZOMI_ENDPOINT = "https://nozomi.temporal.xyz/api/sendTransaction2?c=<YOUR_API_KEY>"
NOZOMI_TIP = Pubkey.from_string("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq")
MIN_TIP_AMOUNT = 1_000_000
SOLANA_RPC_ENDPOINT = "https://api.mainnet-beta.solana.com"
async def send_nozomi_txn(
ixns: List[Instruction],
signer: Keypair,
nozomi_endpoint: str,
solana_rpc_client: AsyncClient
) -> None:
tip_ixn = transfer(TransferParams(
from_pubkey=signer.pubkey(),
to_pubkey=NOZOMI_TIP,
lamports=MIN_TIP_AMOUNT
))
ixns.append(tip_ixn)
blockhash_resp = await solana_rpc_client.get_latest_blockhash()
blockhash = blockhash_resp.value.blockhash
txn = Transaction.new_signed_with_payer(
ixns,
signer.pubkey(),
[signer],
blockhash
)
txn_bytes = bytes(txn)
txn_base64 = base64.b64encode(txn_bytes).decode('utf-8')
async with aiohttp.ClientSession() as session:
async with session.post(
nozomi_endpoint,
headers={"Content-Type": "text/plain"},
data=txn_base64
) as response:
# api v2 does not return a signature, just check for success
if response.status >= 200 and response.status < 300:
print("Transaction sent successfully")
else:
error_text = await response.text()
raise Exception(f"Transaction failed with status {response.status}: {error_text}")
def build_ixns() -> List[Instruction]:
# your instruction building logic here..
return []
async def main():
solana_rpc_client = AsyncClient(SOLANA_RPC_ENDPOINT)
# replace with actual keypair loading logic
signer = Keypair()
ixns = build_ixns()
await send_nozomi_txn(ixns, signer, NOZOMI_ENDPOINT, solana_rpc_client)
if __name__ == "__main__":
asyncio.run(main())import { Connection, PublicKey, Keypair, SystemProgram, TransactionMessage, VersionedTransaction } from "@solana/web3.js";
const NOZOMI_ENDPOINT = "https://nozomi.temporal.xyz/api/sendTransaction2?c=<YOUR_API_KEY>";
const NOZOMI_TIP = new PublicKey("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq");
const MIN_TIP_AMOUNT = 1_000_000;
const SOLANA_RPC_ENDPOINT = "https://api.mainnet-beta.solana.com";
async function sendNozomiTxn(ixns, signer, nozomiEndpoint, solanaRpcClient) {
const tipIxn = SystemProgram.transfer({
fromPubkey: signer.publicKey,
toPubkey: NOZOMI_TIP,
lamports: MIN_TIP_AMOUNT
});
ixns.push(tipIxn);
const { blockhash } = await solanaRpcClient.getLatestBlockhash();
const messageV0 = new TransactionMessage({
payerKey: signer.publicKey,
recentBlockhash: blockhash,
instructions: ixns,
}).compileToV0Message();
const versionedTxn = new VersionedTransaction(messageV0);
versionedTxn.sign([signer]);
const txnBytes = versionedTxn.serialize();
const txnBase64 = Buffer.from(txnBytes).toString('base64');
const response = await fetch(nozomiEndpoint, {
method: 'POST',
headers: {
'Content-Type': 'text/plain',
},
body: txnBase64
});
if (!response.ok) {
const errorText = await response.text();
throw new Error(`Transaction failed with status ${response.status}: ${errorText}`);
}
// api v2 does not return a signature, just check for success
console.log('Transaction sent successfully');
}
function buildIxns() {
// your instruction building logic here..
return [];
}
async function main() {
const solanaRpcClient = new Connection(SOLANA_RPC_ENDPOINT);
// replace with actual keypair loading logic
const signer = Keypair.generate();
const ixns = buildIxns();
await sendNozomiTxn(ixns, signer, NOZOMI_ENDPOINT, solanaRpcClient);
}
main().catch(err => {
console.error(err);
});import { Connection, PublicKey, Keypair, TransactionInstruction, SystemProgram, TransactionMessage, VersionedTransaction } from "@solana/web3.js";
const NOZOMI_ENDPOINT = "https://nozomi.temporal.xyz/api/sendTransaction2?c=<YOUR_API_KEY>";
const NOZOMI_TIP = new PublicKey("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq");
const MIN_TIP_AMOUNT = 1_000_000;
const SOLANA_RPC_ENDPOINT = "https://api.mainnet-beta.solana.com";
async function sendNozomiTxn(
ixns: TransactionInstruction[],
signer: Keypair,
nozomiEndpoint: string,
solanaRpcClient: Connection
): Promise<void> {
const tipIxn = SystemProgram.transfer({
fromPubkey: signer.publicKey,
toPubkey: NOZOMI_TIP,
lamports: MIN_TIP_AMOUNT
});
ixns.push(tipIxn);
const { blockhash } = await solanaRpcClient.getLatestBlockhash();
const messageV0 = new TransactionMessage({
payerKey: signer.publicKey,
recentBlockhash: blockhash,
instructions: ixns,
}).compileToV0Message();
const versionedTxn = new VersionedTransaction(messageV0);
versionedTxn.sign([signer]);
const txnBytes = versionedTxn.serialize();
const txnBase64 = Buffer.from(txnBytes).toString('base64');
const response = await fetch(nozomiEndpoint, {
method: 'POST',
headers: {
'Content-Type': 'text/plain',
},
body: txnBase64
});
if (!response.ok) {
const errorText = await response.text();
throw new Error(`Transaction failed with status ${response.status}: ${errorText}`);
}
// api v2 does not return a signature, just check for success
console.log('Transaction sent successfully');
}
function buildIxns(): TransactionInstruction[] {
// your instruction building logic here..
return [];
}
async function main() {
const solanaRpcClient = new Connection(SOLANA_RPC_ENDPOINT);
// replace with actual keypair loading logic
const signer = Keypair.generate();
const ixns = buildIxns();
await sendNozomiTxn(ixns, signer, NOZOMI_ENDPOINT, solanaRpcClient);
}
main().catch(err => {
console.error(err);
});{
"jsonrpc": "2.0",
"id": 1,
"method": "sendTransaction",
"params": [
"<YOUR_BASE_64_ENCODED_TXN_BYTES>",
{ "encoding": "base64" }
]
}{
"jsonrpc": "2.0",
"id": 1,
"result": "<TRANSACTION_SIGNATURE>"
}while true; do
curl -s https://nozomi.temporal.xyz/ping > /dev/null
sleep 60
donecurl https://nozomi.temporal.xyz/api/sendTransaction2?c=<YOUR_API_KEY> \
-X POST \
-H "Content-Type: text/plain" \
-d '<YOUR_BASE_64_ENCODED_TXN_BYTES>'Use full service RPC for fetching latest blockhash. Nozomi only supports sendTransaction.
use solana_client::rpc_client::RpcClient;
use solana_sdk::{message::Instruction, pubkey, pubkey::Pubkey, signature::Keypair, signer::Signer, transaction::Transaction};
const NOZOMI_ENDPOINT: &str = "https://nozomi.temporal.xyz/?c=<YOUR_API_KEY>";
const NOZOMI_TIP: Pubkey = pubkey!("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq");
const MIN_TIP_AMOUNT: u64 = 1_000_000;
const SOLANA_RPC_ENDPOINT: &str = "https://api.mainnet-beta.solana.com";
fn send_nozomi_txn(ixns: &mut Vec<Instruction>, signer: &Keypair, nozomi_rpc_client: &RpcClient, solana_rpc_client: &RpcClient) {
let tip_ix = solana_system_interface::instruction::transfer(&signer.pubkey(), &NOZOMI_TIP, MIN_TIP_AMOUNT);
ixns.push(tip_ix);
let blockhash = solana_rpc_client.get_latest_blockhash().unwrap();
let tx = Transaction::new_signed_with_payer(ixns, Some(&signer.pubkey()), &[signer], blockhash);
nozomi_rpc_client.send_transaction(&tx).unwrap();
}
fn build_ixns() -> Vec<Instruction> {
// your instruction building logic here..
vec![]
}
fn main() {
let nozomi_rpc_client = RpcClient::new(NOZOMI_ENDPOINT.to_string());
let solana_rpc_client = RpcClient::new(SOLANA_RPC_ENDPOINT.to_string());
let keypair = Keypair::new();
let mut ixns = build_ixns();
send_nozomi_txn(&mut ixns, &keypair, &nozomi_rpc_client, &solana_rpc_client);
}?c=<YOUR_API_KEY>function encodeBatch(rawTxs) {
if (rawTxs.length === 0 || rawTxs.length > 16) {
throw new Error("batch must contain 1-16 transactions");
}
let total = 0;
for (const tx of rawTxs) {
if (tx.length < 66 || tx.length > 1232) {
throw new Error(`invalid tx size: ${tx.length}`);
}
total += 2 + tx.length;
}
const out = Buffer.allocUnsafe(total);
let off = 0;
for (const tx of rawTxs) {
out.writeUInt16BE(tx.length, off);
off += 2;
Buffer.from(tx).copy(out, off);
off += tx.length;
}
return out;
}
async function sendBatch(endpoint, apiKey, rawTxs) {
const body = encodeBatch(rawTxs);
const res = await fetch(
`${endpoint}/api/sendBatch?c=${apiKey}`,
{
method: "POST",
headers: { "Content-Type": "application/octet-stream" },
body,
}
);
if (!res.ok) {
const text = await res.text();
throw new Error(`sendBatch failed (${res.status}): ${text}`);
}
}[len_hi][len_lo][tx_bytes...][len_hi][len_lo][tx_bytes...]...