Skip to content

Instantly share code, notes, and snippets.

@xstelea
xstelea / PRODUCT_SCOPE.md
Created March 4, 2026 15:47
Multisig Vaults

Multisig Vaults — Product Scope Document

1. Overview

What & Why:

On Radix, on-chain accounts can hold tokens and other assets. When an organization shares an account, multiple people need to approve transactions (multisig) so no single person can move funds unilaterally. Coordinating this manually — passing around transaction payloads, collecting signatures offline — is painful and error-prone.

  • Vault — An on-chain Radix account that holds a team's assets, controlled by multisig so transactions require approval from multiple signers before executing.
  • Team — The set of signers whose public keys are listed in the multisig access rule. They collectively approve all vault transactions via threshold signing (n-of-m).
@xstelea
xstelea / scheme_exact_radix.md
Last active March 3, 2026 16:11
Radix x402

Scheme: exact on Radix

Versions supported

  • v1
  • v2

Supported Networks

This spec uses CAIP-2 style identifiers (provisional — no ratified Radix namespace exists in CAIP yet):

Multisig Architecture

Technical design for the synchronous multisig solution that will hold DAO funds after the Foundation transition.

Requirements

  • Support the Radix Wallet as a signing source
  • Allow flexibility for other signers (custodians, private keys)
  • Work with DAO representatives as key holders
  • Handle complex access rules without hitting fee loan limits
@xstelea
xstelea / consultation-dapp-v2.md
Created January 13, 2026 15:44
Consultation dApp v2 Proposal

Consultation dApp v2 Proposal

Overview

The Radix Foundation is winding down and handing control to the community. As part of this transition, the Consultation dApp becomes the primary tool for community decision-making — proposals are put to a vote, and the outcome is respected and executed on.

Version 1 has served us well, but relies on centralized infrastructure that won't be viable once the Foundation steps back. We're proposing v2 with a focus on decentralization and simplicity so it can run independently.

What's Changing

@xstelea
xstelea / deriveNftLocalId.ts
Created December 30, 2025 15:32
derive virtual badge from ed21559 public key
import { blake2b } from '@noble/hashes/blake2b';
import { bytesToHex, hexToBytes } from '@noble/hashes/utils';
const publicKeyHex = '554a6db54c09d609deabf5b234ab3627cdd182ebf0d60baa070ba4ba2e8e5b7a';
function deriveNftLocalId(publicKeyHex: string): string {
const publicKeyBytes = hexToBytes(publicKeyHex);
const hash = blake2b(publicKeyBytes, { dkLen: 32 }); // Blake2b-256
const last26Bytes = hash.slice(-26); // Last 26 bytes
return bytesToHex(last26Bytes);
@xstelea
xstelea / README.md
Last active May 26, 2025 22:28
Hookah Transaction intent JSON-RPC API

E2E Test Scripts

This directory contains end-to-end test scripts for the Hookah JSON-RPC API.

JSON-RPC Test Script

The json-rpc-test.sh script replicates the functionality of the TypeScript e2e test, performing a complete authentication and transaction flow using bash and command-line tools.

Dependencies

import { BlueprintInterface } from "@radixdlt/babylon-core-api-sdk";
import { GatewayApiClient } from "@radixdlt/babylon-gateway-api-sdk";
export const gatewayClientImplementation = (gateway: GatewayApiClient) => {
const getComponentInformation = async (
address: string
): Promise<{ packageAddress: string; blueprintName: string } | null> => {
const { items } = await gateway.state.innerClient.stateEntityDetails({
stateEntityDetailsRequest: {
addresses: [address],
import { describe, it, expect } from 'vitest';
import { createHookahSdk } from 'hookah-sdk';
import {
createEd25519KeyPair,
createRadixWeb3Client,
deriveAccountAddressFromPublicKey,
manifests,
} from 'radix-web3.js';
import { PrivateKey } from '@radixdlt/radix-engine-toolkit';