Skip to content

Instantly share code, notes, and snippets.

@quake
quake / fiber-integration-approaches.md
Last active July 20, 2026 10:08
Fiber Integration Approaches for Bitcoin Light — comparing three architectural approaches for integrating Fiber Network (CKB Lightning) into a React Native mobile wallet

Fiber Integration Approaches for Bitcoin Light

Context

Bitcoin Light currently integrates Breez SDK Spark for Bitcoin Lightning Network. Breez operates on a hosted LSP model: a cloud service runs the LN node (via Greenlight), the mobile device holds only keys and signs locally via defaultExternalSigner. Channel management, liquidity, routing, and watchtower are all handled by Breez.

Fiber is a self-hosted Lightning Network implementation built on Nervos CKB. It can run as a native binary (fnn), as a native library compiled into mobile apps (via FFI), in WASM via @nervosnetwork/fiber-js,

@quake
quake / wechat_chatroom_prompt_template.md
Created February 19, 2025 06:19 — forked from twinsant/wechat_chatroom_prompt_template.md
微信群消息总结提示词模板

您是一位专业的中文群聊总结助手,专门负责分析和总结微信群聊记录。您的主要任务是从繁杂的群聊中提取关键信息,生成一份全面、简洁且易读的群聊报告。这份报告旨在帮助群成员快速了解当天的主要讨论内容,不错过重要信息。

请仔细阅读提供的微信群聊记录,并按照以下详细指南创建一份高质量的今日群聊总结报告:

  1. 报告标题: "群聊精华总结"

  2. 重要提醒(如果有):

  • 在报告最上方,使用"❗️重要提醒"标注任何置顶或 @所有人 这种需要所有成员注意的信息
  • 简明扼要地陈述提醒内容,确保醒目
travis_fold:start:worker_info
Worker information
hostname: 7d4318a6-17d9-4ec3-8b04-c2f086958916@1.worker-com-79d58db94b-twptq.macstadium-prod-1
version: v6.2.0 https://github.com/travis-ci/worker/tree/5e5476e01646095f48eec13196fdb3faf8f5cbf7
instance: 28eb05c9-5652-4326-8c0f-124bd022a535 travis-ci-macos10.13-xcode9.4.1-19-1576204381 (via amqp)
startup: 1m14.132745988s
travis_fold:end:worker_info
travis_time:start:06795887
travis_time:end:06795887:start=1596555768714776000,finish=1596555769359196000,duration=644420000,event=no_world_writable_dirs
travis_time:start:28309ac0
@quake
quake / kvstore.md
Last active September 26, 2025 01:16

KVStore 杂谈

Secondary Index

RDBMS and SQL

Employees table structure:

RPC

RPC 调用使用了 method missing 自动生成,统一返回结果是 Hash,而不是定义的 Class Type。优点:ckb 新加或者调整 rpc 方法,sdk 不需要跟随升级,缺点:需要查看 ckb 文档调用,ruby doc 无法生成文档,IDE 无自动提示。

RPC 参数做了 Integer 到 Hex 自动转化,方便调用(特别是分页参数这种)

调用方式和之前一样:

rpc = CKB::RPC.new
@quake
quake / README.md
Last active February 26, 2020 09:37

在本篇文档里,我们会使用 mruby 来作为编程语言演示如何在 CKB 实现一个最基础 UDT (User Defined Token) 合约

Dev Chain

首先我们需要启动一个本地的开发链来方便调试

配置矿工信息

我们先用 ckb-cli 命令生成一个新账户用于挖矿,运行 ckb-cli,然后输入

account new
fn foo(foo: u32) -> u32 {
println!("foo {}", foo);
foo + 1
}
#[derive(Debug)]
struct Bar {
bar1: u32,
bar2: u32,
bar3: u32,
@quake
quake / error.md
Last active August 12, 2019 14:49
2019-08-12 14:38:12.928 +00:00 NetworkRuntime-0 ERROR panic  thread 'NetworkRuntime-0' panicked at 'please check if reach a deadlock': src/libcore/option.rs:1036stack backtrace:
   0: ckb_logger::setup_panic_logger::{{closure}}::h37ba76f9d9060c7e (0x55e53e65775f)
             at util/logger/src/lib.rs:277
   1: std::panicking::rust_panic_with_hook::h057ff03eb4c8000f (0x55e53e75fb09)
             at src/libstd/panicking.rs:478
   2: std::panicking::continue_panic_fmt::ha6d6ae144369025b (0x55e53e75f5a2)
             at src/libstd/panicking.rs:381
   3: rust_begin_unwind (0x55e53e75f486)
             at src/libstd/panicking.rs:308
[dev-dependencies]
tokio-core = "0.1"
libp2p-tcp-transport = { path = "../tcp-transport"}
libp2p-peerstore = { path = "../peerstore"}
multiplex = { path = "../multiplex-rs" }
rand = "0.4"
env_logger = "0.5.4"
struct ContainerFoo(i32, i32);
struct ContainerBar(i64, i64);
trait Contains {
type A;
type B;
fn contains(&self, &Self::A, &Self::B) -> bool;
}