mkdir osm
wget -O osm/planet.mbtiles https://hidrive.ionos.com/api/sharelink/download?id=SYEgScrRe
podman run -ti --rm -p 9000:9000 --name sms -v $(pwd)/osm/:/data/ registry.gitlab.com/markuman/sms:latest
firefox http://localhost:9000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| accept, | |
| emit, | |
| etxn_details, | |
| etxn_fee_base, | |
| etxn_reserve, | |
| hook_account, | |
| ledger_seq, | |
| otxn_field, | |
| rollback, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| accept, | |
| emit, | |
| etxn_details, | |
| etxn_fee_base, | |
| etxn_reserve, | |
| hook_account, | |
| ledger_seq, | |
| otxn_field, | |
| rollback, |
Carbon hook sends a percentage of outgoing payments to a dedicated account.
The beneficiary account is hard-coded, so while the default version of carbon.c works, it works with an account that cannot be imported into Hooks Builder (unless you know its secret key). See later examples for how to parametrize a hook.
to test:
- make sure Hooks Builder has at least 3 accounts: Alice, Bob and Carol
- in carbon.c, change hardcoded beneficiary to Carol account
- compile carbon.c and deploy it to Alice account
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @external("env", "_g") | |
| export declare function GUARD(id: i32, maxiter: i32): i32 | |
| @external("env", "accept") | |
| export declare function ACCEPT(read_ptr: string, read_len: i32, err: i64): i64 | |
| @external("env", "trace") | |
| export declare function TRACE(mread_ptr: string, mread_len: i32, dread_ptr: string, dread_len: i32, as_hex: i32): i64 | |
| //////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @external("env", "_g") | |
| export declare function _g(id: i32, maxiter: i32): i64 | |
| @external("env", "accept") | |
| export declare function accept(read_ptr: string, read_len: i32, err: i64): i64 | |
| @external("env", "trace") | |
| export declare function TRACE(mread_ptr: string, mread_len: i32, dread_ptr: string, dread_len: i32, as_hex: i32): i64 | |
| //////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import lib from "https://esm.sh/xrpl-accountlib?bundle"; | |
| import bin from "https://esm.sh/ripple-binary-codec?bundle"; | |
| import { XrplClient } from "https://esm.sh/xrpl-client?bundle"; | |
| // Alice | |
| const notary_account = '{{ notary_account }}'; | |
| // Bob | |
| const proposer_secret = '{{ proposer_secret }}'; | |
| const proposer_account = '{{ proposer_account }}'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script type="module"> | |
| import lib from "https://esm.sh/xrpl-accountlib?bundle"; | |
| import bin from "https://esm.sh/ripple-binary-codec?bundle"; | |
| import { XrplClient } from "https://esm.sh/xrpl-client?bundle"; | |
| // Alice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // oj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| asdf |
NewerOlder