Simple applicaiton to redirect your krist!
Important
I am no longer interested in Krist, and as such this repository has been archived.
To get started download the config.example.json file as config.json
.
You will need to modify it to your own needs. Hopefully you can understand how the format works based on the contents.
There is a JSON schema which will help you with autocompletition if you use a supported IDE, like VSCode.
The JSON file is an object, which has the following properties:
splits
node
node
refers to the krist syncnode to use. This property is optional, and is set to the krist.dev node by default.
splits
is an array of different splits. Each item in this array is an object which features the following properties:
secret
output
walletFormat
The secret
field will contain the private key (or password) of your wallet.
Check out the section about "Getting private key from KristWeb"!
output
is either a string with the krist address which all krist should be sent to, or an object.
If you go the route of objects, you have to make a key-value pair where the key is an output address,
and the value is a number representing the percent to send to it.
walletFormat
refers to the wallet format you want to use with your private key.
You most likly want KristWallet, but in some cases your private key might already be transformed, and you should use api
.
This field is optional, and if you don't specify it, it will make an educated guess.
conditions
is a set of conditions on which the transaction will be split.
If a condition fails, the transaction will be ignored.
These are the following conditions you can use:
sender
filters for a specific sender. This can be an addressdestination
filters for a the destination. This can be a name, with or without metanameminAmount
filters for the minimum (inclusive) krist amount sent to splitmaxAmount
filters for the maximum (inclusive) krist amount sent to split
Anywhere in the config that you can put an address, you can also put a krist name with or without a metaname.
- Go to "My Wallets"
- Find the wallet you want to use
- Find and press the "..." menu
- Press "Wallet info"
- Find where it says "Privatekey", click "Reveal".
No. You cannot use your Kristsplit configs accross major version bumps without migration.
Krist is a virtual currency used on some Minecraft servers, mainly SwitchCraft. More information about Krist is available at krist's website.
Private key and password are two different things in the krist world!
A password, is what you give into a wallet hasher, and it outputs a private key!
If you have a private key (hashed password), you should set the format to API
.
Let's say we have a 50/50 split is configured, but it receives k3 from someone. It will then give k2 to the first address in the split configuration, and k1 to the other.
Run the following in the same directory as the config.
docker run -d -it --mount type=bind,source="$(pwd)/config.json",target="/usr/src/app/config.json" ghcr.io/erb3/kristsplit:latest
To run with docker compose, add this to your composefile:
kristsplit:
image: ghcr.io/erb3/kristsplit:latest
container_name: kristsplit
restart: unless-stopped
volumes:
- type: bind
source: "[Output of `pwd` in the directory of your config]/config.json"
target: "/usr/src/app/config.json"
This application is tested-ish with the Bun test runner.
After installing dependencies, you can run bun run test
to run the tests.
Kristsplit uses Biome to lint and format the code.
Use bun run lint
to lint the code, bun run format
to format the code, or bun run check
for both.
In linting you can automatically fix some problems by using --apply
or --apply-unsafe
.
Currently implemented:
- Split krist sent to an address
- Split krist sent to a specific (meta)name
Not done yet:
- Real tests with alternative krist nodes
- Loop detection
- Config examples
- Config builder
- Condition actions
- Prometheus