-
Include tatum package in your project:
dotnet add ${your_project} package Tatum
-
Register Tatum Client in the DI container by calling
IServiceCollection
methodAddTatumSdk
:
// In Program.cs or Startup.cs
builder.Services.AddTatumSdk(Network.Testnet);
- Inject Tatum Client to the class of your choice:
// EthereumController.cs
private readonly ITatumSdk _tatumSdk;
public SomeController(ITatumSdk tatumSdk)
{
_tatumSdk = tatumSdk;
}
- You are ready to use Tatum API!
var allNotificationsResult = await _tatumSdk.Notifications.GetAll();
Please find SDK related documentation here.
If there ever is a need to see what is going on under the hood you can use the Debug Mode to output underlying request curl
and response content
to the Debug
console.
When contacting Tatum support providing those logs can help us identifying the issue faster.
To use debug mode simply register Tatum SDK like this:
// In Program.cs or Startup.cs
builder.Services.AddTatumSdkWithDebug(Network.Testnet);
or if using simple init:
var tatumSdk = TatumSdk.Init(Network.Testnet, apiKey, config => config.EnableDebugMode = true);