Skip to content

Instantly share code, notes, and snippets.

View tequdev's full-sized avatar

tequ tequdev

View GitHub Profile
@tequdev
tequdev / README.md
Created December 4, 2025 11:46 — forked from muzam1l/README.md

Starter

Starter is the simplest possible hook: it just accepts all transactions and logs that it is running.

to test:

  • in the develop pane, compile starter.c
  • in the deploy pane, deploy it to Alice account
  • set up payment transaction from Alice to Bob
  • run it and see in the debug stream 'Accept.c: Called.'
@tequdev
tequdev / vpra-battlev2-definition.json
Last active November 3, 2024 16:44
VPRA Definitions
{
"name": "vpra-battleV2",
"hook_account": "rUYiTLYpN8M4xLhtRD9HQZFwqZ4WaKJc89",
"hook_namespace_id": "56277180A4B87ACE92DF021099B68B027311BBCF5CE8277B6E61EDBB0EEA097D",
"hook_definition": {
"name": "VPRA Battle V2",
"description": "",
"account": "rUYiTLYpN8M4xLhtRD9HQZFwqZ4WaKJc89",
"namespace_id": "56277180A4B87ACE92DF021099B68B027311BBCF5CE8277B6E61EDBB0EEA097D",
"hook_hash": "",
@tequdev
tequdev / gist:af48e08b8dc019346ddc090f9361c5a5
Last active November 3, 2024 14:10
CHook local build script
# Prerequisites
- binaryen
```sh
brew install binaryen
```
- wasienv
```sh
curl https://raw.githubusercontent.com/wasienv/wasienv/master/install.sh | sh
source ~/.wasienv/wasienv.sh
import { Client, Wallet } from "xrpl";
import { deriveKeypair } from "ripple-keypairs";
import sign from "xrpl-sign-keypairs";
const wallet = {
main: Wallet.fromSeed("sndMkPQCG2EC5fd5a7CgEauyLid5m"),
key1: Wallet.fromSeed("ssegRQk2SdRj8QmFs8YhGRhVkUeGS"),
key2: Wallet.fromSeed("shHfNuZQNnoaeLk3RrtVrhxghy8FY"),
regKey: Wallet.fromSeed("shipA3KBwJpkGVo2WsWCwRDL1CR5V"),
};
import { Client, Wallet, AccountSetAsfFlags } from "xrpl";
/**
* レギュラーキー設定済みかつマスターキー無効済みアカウントから別のアカウントへレギュラーキーを移譲
*/
const client = new Client("wss://hooks-testnet-v2.xrpl-labs.com");
const wallets = {
// https://hooks-testnet-v2.xrpl-labs.com/
//@ts-check
const { Client, Wallet, convertStringToHex, AccountSetAsfFlags } = require("xrpl");
const client = new Client("wss://hooks-testnet-v2.xrpl-labs.com");
const seeds = {
master: 'snig4CzYC9XXB1fg6vQMi3aKfNxPp',
minter: "ssnd4ZspykaHfetiT3JknVJQMb8Pk",
buyer: 'snwyuJemxPvp1WrZrChbBiJVb4iyq',
buyer2: 'ssbfpn9v8PYH8FCXGhXBYF1KzADMs'
}