Skip to content

Commit 4ca1fdf

Browse files
committed
Add live mint demo section to README and update deployment docs
1 parent c077517 commit 4ca1fdf

7 files changed

Lines changed: 46 additions & 10 deletions

File tree

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,32 @@ with zero external dependencies (the asset is a dev UDT standing in for RUSD), a
7171
**`deploy/testnet.md`** does it on public testnet with the real Stable++ RUSD — honest about the one
7272
hard part, which is acquiring testnet RUSD.
7373

74-
## Run it
74+
## Try the live mint
75+
76+
A mint is live on public testnet at **https://mint.strawhatcrew.xyz**, with the wallet at
77+
**https://fibernuts.strawhatcrew.xyz** — open it and it's already pointed at the mint. Holding,
78+
sending, and receiving ecash needs nothing but that URL.
79+
80+
To **mint** (deposit RUSD) you pay the mint's Fiber invoice from your own Fiber node, so first
81+
connect your node to the mint and open an RUSD channel (the mint auto-accepts channels ≥ 10 RUSD):
82+
83+
```sh
84+
fnn() { fnn-cli -u <your-node-rpc> "$@"; }
85+
MINT_ADDR="/ip4/192.241.151.135/tcp/8228/p2p/QmViPrRPGD8SFsnXt2X3bd8becn7sc1xpBV1hCooMUsKGH"
86+
MINT_PUBKEY="02b97fb5bb5e6b60a65ab129065e3d4de16e57a5cc3069ba78164bf7f7e956bc34"
87+
RUSD='{"code_hash":"0x1142755a044bf2ee358cba9f2da187ce928c91cd4dc8692ded0337efa677d21a","hash_type":"type","args":"0x878fcc6f1f08d48e87bb1c3b3d5083f23f8a39c5d5c764f253b55b998526439b"}'
88+
89+
fnn peer connect_peer --address "$MINT_ADDR"
90+
fnn channel open_channel --pubkey "$MINT_PUBKEY" --funding-amount 1000000000 --public true --funding-udt-type-script "$RUSD"
91+
fnn channel list_channels # wait until state is ChannelReady
92+
```
93+
94+
Then in the wallet: **Mint** → enter an amount → it shows a `fibt…` invoice → pay it with
95+
`fnn payment send_payment --invoice <fibt…>` and the balance credits. **Send/Receive** move ecash
96+
browser-to-browser; **Melt** cashes out to an invoice from `fnn invoice new_invoice --currency Fibt
97+
--udt-type-script "$RUSD"`. Wallet amounts are RUSD; `fnn-cli` uses base units (`1.00 RUSD = 100_000_000`).
98+
99+
## Run your own mint
75100

76101
You need a Fiber node, `protoc`, and a Rust toolchain.
77102

deploy/command.md

Whitespace-only changes.

deploy/fiber-local.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
base_dir: /fiber
2+
rpc_listen: 0.0.0.0:8227
3+
listening_addr: /ip4/0.0.0.0/tcp/8228
4+
announced_node_name: fibernuts-local
5+
auto_accept_channel_ckb_funding_amount: 0
6+
tlc_expiry_delta: 144
7+
tlc_min_value: 0
8+
tlc_max_value: 18446744073709551615
9+
tlc_fee_proportional_millionths: 1000
10+
channel_cell_lock_code_hash: 0x0000000000000000000000000000000000000000000000000000000000000000
11+
udt_whitelist: []

deploy/mintd.config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ url = "http://127.0.0.1:8085"
1111
listen_host = "127.0.0.1"
1212
listen_port = 8085
1313
# Replace before running anything you care about: this seeds the mint's signing keys.
14-
mnemonic = "put your own twelve word mnemonic here before you run this mint at all"
14+
mnemonic = "abandon ability able about above absent absorb abstract absurd abuse access accident"
1515

1616
[ln]
1717
# Exact serde spelling of LnBackend::GrpcProcessor. Not "grpc-processor", not "grpc_processor".

deploy/testnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ curl -s http://127.0.0.1:8237 -H 'content-type: application/json' \
160160
The processor defaults are already correct for testnet RUSD — only the RPC URL changes:
161161

162162
```sh
163-
cd /Users/truthixify/dev/hacks/fib/fibernuts
163+
cd fibernuts # your fibernuts project directory
164164
cargo build --release --manifest-path mint/Cargo.toml -p fibernuts-processor
165165
FIBERNUTS_FIBER_RPC=http://127.0.0.1:8227 ./mint/target/release/fibernuts-processor
166166
# NETWORK=testnet (Fibt), UNIT=rusd, UNIT_SCALE=1000000, and the RUSD script are all defaults.

wallet/package-lock.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wallet/vite.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ export default defineConfig({
99
server: {
1010
port: 5174,
1111
// Proxying keeps the dev wallet same-origin, so a mint without permissive CORS still works.
12-
proxy: { "/v1": { target: MINT, changeOrigin: true } },
12+
proxy: {
13+
"/v1": {
14+
target: MINT,
15+
changeOrigin: true,
16+
secure: false, // Allow self-signed certificates
17+
}
18+
},
1319
},
1420
});

0 commit comments

Comments
 (0)