diff --git a/Cargo.lock b/Cargo.lock index b70f423..6049a01 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1653,25 +1653,6 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.5", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 1.1.0", "indexmap 2.2.6", "slab", "tokio", @@ -2612,7 +2593,6 @@ checksum = "900d57987be3f2aeb70d385fff9b27fb74c5723cc9a52d904d4f9c807a0667bf" dependencies = [ "futures-core", "futures-sink", - "indexmap 2.2.5", "js-sys", "once_cell", "pin-project-lite", diff --git a/wrappers/fedimint-go/pkg/fedimint/client.go b/wrappers/fedimint-go/pkg/fedimint/client.go index 0c0e9f4..3bc6b0e 100644 --- a/wrappers/fedimint-go/pkg/fedimint/client.go +++ b/wrappers/fedimint-go/pkg/fedimint/client.go @@ -119,7 +119,6 @@ func (fc *FedimintClient) post(endpoint string, body interface{}) ([]byte, error return fc.fetchWithAuth(endpoint, "POST", jsonBody) } - // postWithFederationId takes any request object, marshals it to JSON, optionally adds a federationId, and makes a POST request. func (fc *FedimintClient) postWithFederationId(endpoint string, requestBody interface{}, federationId *string) ([]byte, error) { // Initialize an empty map for the request body. @@ -162,7 +161,6 @@ func (fc *FedimintClient) postWithFederationId(endpoint string, requestBody inte return nil, fmt.Errorf("failed to marshal modified request map: %w", err) } - fmt.Printf("modifiedRequestJSON: %s\n", modifiedRequestJSON) // Proceed to make the POST request with the modified JSON body. @@ -319,7 +317,7 @@ func (fc *FedimintClient) Join(inviteCode string, setActiveFederationId bool, us func (onchain *OnchainModule) CreateDepositAddress(timeout int, federationId *string) (*modules.OnchainDepositAddressResponse, error) { request := modules.OnchainDepositAddressRequest{Timeout: timeout} - resp, err := onchain.Client.postWithFederationId("/wallet/deposit-address", request, federationId) + resp, err := onchain.Client.postWithFederationId("/onchain/deposit-address", request, federationId) if err != nil { return nil, err } @@ -333,7 +331,7 @@ func (onchain *OnchainModule) CreateDepositAddress(timeout int, federationId *st func (onchain *OnchainModule) AwaitDeposit(operationId string, federationId *string) (*modules.OnchainAwaitDepositResponse, error) { request := modules.OnchainAwaitDepositRequest{OperationId: operationId} - resp, err := onchain.Client.postWithFederationId("/wallet/await-deposit", request, federationId) + resp, err := onchain.Client.postWithFederationId("/onchain/await-deposit", request, federationId) if err != nil { return nil, err } @@ -347,7 +345,7 @@ func (onchain *OnchainModule) AwaitDeposit(operationId string, federationId *str func (onchain *OnchainModule) Withdraw(address string, amountSat int, federationId *string) (*modules.OnchainWithdrawResponse, error) { request := modules.OnchainWithdrawRequest{Address: address, AmountSat: amountSat} - resp, err := onchain.Client.postWithFederationId("/wallet/withdraw", request, federationId) + resp, err := onchain.Client.postWithFederationId("/onchain/withdraw", request, federationId) if err != nil { return nil, err } @@ -547,7 +545,6 @@ func (ln *LnModule) ClaimPubkeyReceive(privateKey string, gatewayId string, fede return &infoResp, nil } - func (ln *LnModule) ClaimPubkeyTweakReceive(privateKey string, tweaks []uint64, gatewayId string, federationId string) (*types.InfoResponse, error) { request := modules.LnClaimPubkeyTweakedRequest{PrivateKey: privateKey, Tweaks: tweaks} resp, err := ln.Client.postWithGatewayIdAndFederationId("/ln/claim-external-receive-tweaked", request, &gatewayId, &federationId)