Client-side identity
Create or restore locally with the SDK, Postern Wallet or an integrator-controlled signer. Never submit a seed phrase to a web form or RPC.
OPSBloch Inc ↗03 / WALLET + EXCHANGE OPERATIONS
The published Genesis-4 JavaScript SDK creates or restores a wallet locally, builds signed transfers and queries complete receipts. A node never receives a mnemonic or creates an address.
Generate and back up wallet keys in a trusted client or signer. This site has no mnemonic field, key store, transaction signer or broadcast button.
01 / LOCAL WALLET CREATION
The Genesis-4 SDK now exposes createLocalWallet() and deriveLocalAddress(). They use the pinned wallet core inside your Node.js process and do not call an RPC or remote API.
import { createLocalWallet } from '@blochprotocol/genesis4-sdk';
const wallet = createLocalWallet();
// wallet.address is a checksummed mainnet address.
// Back up wallet.mnemonic in your controlled key ceremony.
console.log(wallet.address);The function returns a 24-word mnemonic once to the caller. The SDK does not persist or encrypt it; do not log it or send it to a website.
import { deriveLocalAddress } from '@blochprotocol/genesis4-sdk';
const recovered = deriveLocalAddress({ mnemonic });
if (recovered.address !== expectedAddress) {
throw new Error('Address mismatch');
}Restoration returns an address without transmitting the phrase. For an interactive encrypted wallet, use Postern Wallet. Older identities may need their original derivation convention.
There is no mnemonic form or key store on Bloch Ops. Protect the calling process, backup ceremony and resulting wallet according to your own custody policy.
02 / HIGH-LEVEL TRANSACTION INTERFACE
createSignedTransaction handles UTXO selection, the current fee and epoch, construction, signing and serialization through the pinned Genesis-4 wallet core. Amounts are decimal strings.
npm install https://ops-blochinc.xyz/wallets/downloads/blochprotocol-genesis4-sdk-0.1.5.tgzThe package is source-distributed and versioned. Check its code and pinned WASM hash before processing value.
Download SDK package ↗ Verify SHA-256 ↗import { createSignedTransaction } from '@blochprotocol/genesis4-sdk';
const signed = await createSignedTransaction({
addressFrom: process.env.BLOCH_ADDRESS_FROM,
mnemonic: process.env.BLOCH_MNEMONIC,
addressTo: process.env.BLOCH_ADDRESS_TO,
amount: '1.25000000',
rpcUrl: process.env.BLOCH_RPC_URL,
});
console.log(signed.txid, signed.rawHex);rawHex is the complete signed serialized transaction for sendrawtransaction([rawHex]). Store both txid and the exact bytes before sending.
Use an exchange-controlled Genesis-4 node or an authenticated write endpoint. The public gateway may be read-only. A timeout does not prove that a transaction failed: check the original txid and retry the same bytes if appropriate.
03 / TRANSACTION RECEIPT
The archival API joins an included transaction with a fresh chain-head observation. It returns inputs, outputs, satoshi amounts, height, slot, confirmations and finality fields.
GET https://blochl1.com/api/v1/transactions/{txid}Example included transaction:
Open live JSON receipt ↗import { getTransaction } from '@blochprotocol/genesis4-sdk';
const tx = await getTransaction(txid);
console.log({
inputs: tx.inputs,
outputs: tx.outputs,
height: tx.height,
slot: tx.slot,
confirmations: tx.confirmations,
finalized: tx.finalized,
});Enter a 64-character txid. This page reads the public archival API and checks node status if no included receipt exists. It does not submit transactions.
Use inspectDepositOutputs() to match the expected address script hash, list each outpoint and sum integer value_sat strings.
Record txid, block ID, height, slot and transaction index. Recheck the block ID if the chain reorganizes.
Credit only against your explicit confirmation and corroborated finality policy. Mempool acceptance is not a receipt.
The SDK provides inspectDepositOutputs() for exact outpoint and satoshi matching, plus getTransactionObservation() and compareTransactionObservations() for unresolved or changed receipts. These are measurements, not credit decisions. Pause crediting if the index or corroborated chain head is unavailable.
04 / HOSTED SERVICE BOUNDARY
Genesis-4 nodes explicitly reject getnewaddress because they hold no wallet. Local SDK creation is available; a hosted endpoint that accepts a mnemonic would change the custody and security model.
Create or restore locally with the SDK, Postern Wallet or an integrator-controlled signer. Never submit a seed phrase to a web form or RPC.
Read chain identity, UTXOs, fees and transaction status from a node. Bind signing to the verified Genesis-4 network.
Versioned address validation, unsigned preparation and signer adapters are roadmap work. They do not include server-held keys.