Build on the Origin Layer โ The Honor-Bound Bitcoin L2
Create games, DeFi apps, social platforms, and more.
Every action anchored in Bitcoin. Every TX verified with honor.
Each user action creates a Truth Anchor (TX L2) that can be verified forever.
Every TX that moves KRAY must be signed by the user. Honor-bound.
Counters and balances are derived from TXs. Never increment directly.
Users can always withdraw to Bitcoin L1. This is a right, not a feature.
Every transaction must follow this structure
{
// ๐ IDENTIFICATION (Required)
id: "unique_txhash_32bytes",
tx_type: "transfer",
// ๐ฐ MOVEMENT (Required)
from_account: "bc1p...",
to_account: "bc1p...",
amount: "1000",
// ๐ METADATA (Required)
gas_fee: "0",
memo: "Human-readable description",
status: "completed",
// ๐ EXTRAS (Optional)
metadata: { game_id: "xyz", ... },
// โฐ TIMESTAMP (Required)
created_at: "2026-01-16T15:30:00.000Z"
}
Standard and custom types for your application
transfer KRAY transfer between usersdeposit Bridge deposit from Bitcoin L1withdrawal Bridge withdrawal to Bitcoin L1social_post Post creation feesocial_repost Repost reward claimsocial_escrow Repost pool depositswap Token swapadd_liquidity Add to poolstake Stake tokensgame_reward Game rewardsnft_mint NFT mintingvote_cast Voting systemsdoc_certify Document certificationEvery action must be signed by the user
const message = `action at ${Date.now()}`;
await krayWallet.signMessage(message);
{ address, signature, message, ...data }
verifySignature(address, message, sig)
Base URL: https://api.kray.space
/l2/health
Health check
/l2/account/:address
Get balance
/l2/transaction/recent
Recent TXs
/l2/transaction/:id
TX details
/l2/bridge/deposit
Initiate deposit
/l2/bridge/withdraw
Initiate withdrawal
/api/social/feed
Posts feed
/api/social/post/:id/like
Like (1 KRAY)
/api/social/post/:id/repost
Claim reward
async function giveGameReward(playerAddress, amount, gameData, signature, message) {
// 1. Verify player signature (Honor-bound)
if (!verifySignature(playerAddress, message, signature)) {
throw new Error('Invalid signature');
}
// 2. Create unique TX ID (DNA of the action)
const txHash = `game_reward_${Date.now()}_${crypto.randomBytes(4)}`;
// 3. Transfer from treasury to player
await updateBalance('GAME_TREASURY', -amount);
await updateBalance(playerAddress, +amount);
// 4. Create TX L2 (Truth Anchor) โ THIS IS THE KEY!
await supabase.from('l2_transactions').insert({
id: txHash,
tx_type: 'game_reward',
from_account: 'GAME_TREASURY',
to_account: playerAddress,
amount: amount.toString(),
memo: `${gameData.game_name} - ${gameData.achievement}`,
status: 'completed',
metadata: JSON.stringify(gameData),
created_at: new Date().toISOString()
});
return { success: true, txHash };
}
Play-to-earn, tournaments, in-game items, achievements
DEX, lending, staking, yield farming
Paid content, creator monetization, tipping
Marketplace, minting, auctions, royalties
DAOs, voting, proposals, treasuries
Certificates, notarization, timestamps
I. I create Truth Anchors for every action.
II. I verify signatures before moving value.
III. I derive counters from TXs, not increments.
IV. I protect user keys โ they never leave the device.
V. I let the Code speak โ it is my sworn oath.
Join the Origin Builders and create the future of Bitcoin scaling.