diff --git a/Cargo.lock b/Cargo.lock index 5c95211..6433acf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -986,8 +986,8 @@ checksum = "8d79878f18e518d77cfb3126939d0e63a62cad845d51a3266f4ac866f2efe57f" [[package]] name = "fedimint-aead" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "argon2", @@ -998,8 +998,8 @@ dependencies = [ [[package]] name = "fedimint-bitcoind" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "async-trait", @@ -1019,16 +1019,16 @@ dependencies = [ [[package]] name = "fedimint-build" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "serde_json", ] [[package]] name = "fedimint-client" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "aquamarine", @@ -1096,8 +1096,8 @@ dependencies = [ [[package]] name = "fedimint-core" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "async-lock", @@ -1149,8 +1149,8 @@ dependencies = [ [[package]] name = "fedimint-derive" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "itertools 0.12.1", "proc-macro2", @@ -1160,8 +1160,8 @@ dependencies = [ [[package]] name = "fedimint-derive-secret" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "fedimint-core", @@ -1173,16 +1173,16 @@ dependencies = [ [[package]] name = "fedimint-hkdf" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "bitcoin_hashes 0.11.0", ] [[package]] name = "fedimint-ln-client" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "aquamarine", @@ -1215,8 +1215,8 @@ dependencies = [ [[package]] name = "fedimint-ln-common" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "aquamarine", @@ -1245,8 +1245,8 @@ dependencies = [ [[package]] name = "fedimint-logging" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "tracing-subscriber", @@ -1254,8 +1254,8 @@ dependencies = [ [[package]] name = "fedimint-mint-client" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "aquamarine", @@ -1289,8 +1289,8 @@ dependencies = [ [[package]] name = "fedimint-mint-common" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "async-trait", @@ -1313,8 +1313,8 @@ dependencies = [ [[package]] name = "fedimint-rocksdb" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "async-trait", @@ -1327,8 +1327,8 @@ dependencies = [ [[package]] name = "fedimint-tbs" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "bitcoin_hashes 0.11.0", "bls12_381", @@ -1364,8 +1364,8 @@ dependencies = [ [[package]] name = "fedimint-wallet-client" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "aquamarine", @@ -1395,8 +1395,8 @@ dependencies = [ [[package]] name = "fedimint-wallet-common" -version = "0.3.0-rc.2" -source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.2#44f129b216df39a4d896f96146eb89efe264d838" +version = "0.3.0-rc.3" +source = "git+https://github.com/fedimint/fedimint?tag=v0.3.0-rc.3#c32bbe8ed8d95ae420b5879e92dda6ce48f5c914" dependencies = [ "anyhow", "async-trait", diff --git a/example.env b/example.env index df84e0f..23cb907 100644 --- a/example.env +++ b/example.env @@ -1,4 +1,10 @@ -FEDIMINT_CLIENTD_INVITE_CODE='fed1...' +# this is the invite code to the Fedi Alpha federation mutinynet, +# you can replace it with another but it's the most useful one for testing so good to at least have it +FEDIMINT_CLIENTD_INVITE_CODE='fed11qgqrgvnhwden5te0v9k8q6rp9ekh2arfdeukuet595cr2ttpd3jhq6rzve6zuer9wchxvetyd938gcewvdhk6tcqqysptkuvknc7erjgf4em3zfh90kffqf9srujn6q53d6r056e4apze5cw27h75' + +# just make this a new dir called `fm_db` in the root and use the absolute path to that FEDIMINT_CLIENTD_DB_PATH='/absolute/path/to/fm_db_dir' -FEDIMINT_CLIENTD_PASSWORD='some-secure-password-that-becomes-the-bearer-token' + +FEDIMINT_CLIENTD_PASSWORD='password' +FEDIMINT_CLIENTD_BASE_URL='http://127.0.0.1:3333' FEDIMINT_CLIENTD_ADDR='127.0.0.1:3333' diff --git a/fedimint-clientd/Cargo.toml b/fedimint-clientd/Cargo.toml index 2ddb589..5fcb652 100644 --- a/fedimint-clientd/Cargo.toml +++ b/fedimint-clientd/Cargo.toml @@ -18,12 +18,12 @@ serde_json = "1.0.108" tokio = { version = "1.34.0", features = ["full"] } tracing = "0.1.40" tracing-subscriber = "0.3.18" -fedimint-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-core = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-wallet-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-mint-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-ln-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-rocksdb = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } +fedimint-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-core = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-wallet-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-mint-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-ln-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-rocksdb = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } url = "2.5.0" lazy_static = "1.4.0" async-utility = "0.2.0" diff --git a/flake.nix b/flake.nix index 365e42f..e5f0040 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,9 @@ { - description = "A fedimint client daemon for server side applications to hold, use, and manage Bitcoin"; + description = + "A fedimint client daemon for server side applications to hold, use, and manage Bitcoin"; inputs = { - nixpkgs = { - url = "github:nixos/nixpkgs/nixos-23.11"; - }; + nixpkgs = { url = "github:nixos/nixpkgs/nixos-23.11"; }; flakebox = { url = "github:rustshop/flakebox"; @@ -13,7 +12,7 @@ fedimint = { url = - "github:fedimint/fedimint?rev=9d552fdf82f4af429165a1fd409615809ada4058"; + "github:fedimint/fedimint?rev=c32bbe8ed8d95ae420b5879e92dda6ce48f5c914"; }; flake-utils.url = "github:numtide/flake-utils"; @@ -23,8 +22,8 @@ flake-utils.lib.eachDefaultSystem (system: let nixpkgs = fedimint.inputs.nixpkgs; - pkgs = import nixpkgs { - inherit system; + pkgs = import nixpkgs { + inherit system; overlays = fedimint.overlays.fedimint; }; lib = pkgs.lib; @@ -47,51 +46,39 @@ }; # all standard toolchains provided by flakebox - toolchainsStd = - flakeboxLib.mkStdFenixToolchains toolchainArgs; + toolchainsStd = flakeboxLib.mkStdFenixToolchains toolchainArgs; - toolchainsNative = (pkgs.lib.getAttrs - [ - "default" - ] - toolchainsStd - ); + toolchainsNative = (pkgs.lib.getAttrs [ "default" ] toolchainsStd); - toolchainNative = flakeboxLib.mkFenixMultiToolchain { - toolchains = toolchainsNative; - }; + toolchainNative = + flakeboxLib.mkFenixMultiToolchain { toolchains = toolchainsNative; }; commonArgs = { - buildInputs = [ - pkgs.openssl - ] ++ lib.optionals pkgs.stdenv.isDarwin [ - pkgs.darwin.apple_sdk.frameworks.SystemConfiguration - ]; - nativeBuildInputs = [ - pkgs.pkg-config - ]; + buildInputs = [ pkgs.openssl ] ++ lib.optionals pkgs.stdenv.isDarwin + [ pkgs.darwin.apple_sdk.frameworks.SystemConfiguration ]; + nativeBuildInputs = [ pkgs.pkg-config ]; }; - outputs = (flakeboxLib.craneMultiBuild { toolchains = toolchainsStd; }) (craneLib': - let - craneLib = (craneLib'.overrideArgs { - pname = "flexbox-multibuild"; - src = rustSrc; - }).overrideArgs commonArgs; - in - rec { - workspaceDeps = craneLib.buildWorkspaceDepsOnly { }; - workspaceBuild = - craneLib.buildWorkspace { cargoArtifacts = workspaceDeps; }; - fedimint-clientd = craneLib.buildPackageGroup - { pname = "fedimint-clientd"; packages = [ "fedimint-clientd" ]; mainProgram = "fedimint-clientd"; }; - }); - in - { + outputs = (flakeboxLib.craneMultiBuild { toolchains = toolchainsStd; }) + (craneLib': + let + craneLib = (craneLib'.overrideArgs { + pname = "flexbox-multibuild"; + src = rustSrc; + }).overrideArgs commonArgs; + in rec { + workspaceDeps = craneLib.buildWorkspaceDepsOnly { }; + workspaceBuild = + craneLib.buildWorkspace { cargoArtifacts = workspaceDeps; }; + fedimint-clientd = craneLib.buildPackageGroup { + pname = "fedimint-clientd"; + packages = [ "fedimint-clientd" ]; + mainProgram = "fedimint-clientd"; + }; + }); + in { legacyPackages = outputs; - packages = { - default = outputs.fedimint-clientd; - }; - devShells = fmLib.devShells // { + packages = { default = outputs.fedimint-clientd; }; + devShells = fmLib.devShells // { default = fmLib.devShells.default.overrideAttrs (prev: { nativeBuildInputs = [ pkgs.mprocs diff --git a/multimint/Cargo.toml b/multimint/Cargo.toml index 1f7096e..b4502fe 100644 --- a/multimint/Cargo.toml +++ b/multimint/Cargo.toml @@ -13,12 +13,12 @@ anyhow = "1.0.75" serde = "1.0.193" serde_json = "1.0.108" tokio = { version = "1.34.0", features = ["full"] } -fedimint-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-core = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-wallet-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-mint-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-ln-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } -fedimint-rocksdb = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.2" } +fedimint-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-core = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-wallet-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-mint-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-ln-client = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } +fedimint-rocksdb = { git = "https://github.com/fedimint/fedimint", tag = "v0.3.0-rc.3" } futures-util = "0.3.30" rand = "0.8.5" tracing = "0.1.40"