-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New commands: DeriveAccountKeyCommand and ConvertVerificationKeyCommand
* New commands: DeriveAccountKeyCommand and ConvertVerificationKeyCommand
- Loading branch information
1 parent
7625b2e
commit 13a1478
Showing
17 changed files
with
683 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
using CardanoSharp.Wallet.Enums; | ||
using Refit; | ||
|
||
namespace Cscli.ConsoleTool.Koios | ||
namespace Cscli.ConsoleTool.Koios; | ||
|
||
public static class BackendGateway | ||
{ | ||
public static class BackendGateway | ||
{ | ||
public static T GetBackendClient<T>(NetworkType networkType) => | ||
RestService.For<T>(GetBaseUrlForNetwork(networkType)); | ||
public static T GetBackendClient<T>(NetworkType networkType) => | ||
RestService.For<T>(GetBaseUrlForNetwork(networkType)); | ||
|
||
private static string GetBaseUrlForNetwork(NetworkType networkType) => networkType switch | ||
{ | ||
NetworkType.Mainnet => "https://api.koios.rest/api/v0", | ||
NetworkType.Testnet => "https://testnet.koios.rest/api/v0", | ||
_ => throw new ArgumentException($"{nameof(networkType)} {networkType} is invalid", nameof(networkType)) | ||
}; | ||
} | ||
private static string GetBaseUrlForNetwork(NetworkType networkType) => networkType switch | ||
{ | ||
NetworkType.Mainnet => "https://api.koios.rest/api/v0", | ||
NetworkType.Testnet => "https://testnet.koios.rest/api/v0", | ||
_ => throw new ArgumentException($"{nameof(networkType)} {networkType} is invalid", nameof(networkType)) | ||
}; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.