Skip to content

Commit

Permalink
fix: justfile and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodylow committed Mar 28, 2024
1 parent 0402c7a commit 5ddd9f0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
14 changes: 2 additions & 12 deletions JUSTFILE
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
# THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
set dotenv-load := true

dev:
mprocs -c mprocs.yaml

mprocs:
./scripts/mprocs-nix.sh dev-fed mprocs-new.yaml
import 'justfile.local.just'

test-ts:
bun run wrappers/fedimint-ts/test.ts

test-go:
cd wrappers/fedimint-go && go run cmd/main.go
set dotenv-load := true

alias b := build
alias c := check
Expand Down
11 changes: 11 additions & 0 deletions justfile.local.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
dev:
mprocs -c mprocs.yaml

mprocs:
./scripts/mprocs-nix.sh dev-fed mprocs-new.yaml

test-ts:
bun run wrappers/fedimint-ts/test.ts

test-go:
cd wrappers/fedimint-go && go run cmd/main.go
18 changes: 18 additions & 0 deletions wrappers/fedimint-ts/FedimintClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,19 @@ import type {
JoinResponse,
} from "./types";

/**
* All the methods calling to fedimint clientd are asynchronous and return a Promise that resolves to the data returned by the API.
* @param T - The type of data that the API returns
* @returns - The data returned by the API
*/
type FedimintResponse<T> = Promise<T>;

/**
* Builder pattern for creating a FedimintClient.
* @param baseUrl - The base URL of the Fedimint API
* @param password - The password of the Fedimint client
* @param activeFederationId - The ID of the active federation
*/
class FedimintClientBuilder {
private baseUrl: string;
private password: string;
Expand Down Expand Up @@ -98,6 +109,13 @@ class FedimintClientBuilder {
}
}

/**
* FedimintClient provides methods for interacting with a fedimint-clientd's admin, mint, lightning, and onchain methods over HTTP.
* @param baseUrl - The base URL of the Fedimint Clientd instance, must be running and accessible e.g. http://localhost:3333
* @param password - The password of the Fedimint client, becomes the bearer token
* @param activeFederationId - The ID of the active federation to use for module methods
* @param activeGatewayId - Optional, the ID of the active gateway, if not provided, the first gateway in the active federation will be used
*/
class FedimintClient {
private baseUrl: string;
private password: string;
Expand Down
Empty file.

0 comments on commit 5ddd9f0

Please sign in to comment.