BiatecRouterConnector 1.0.0.2026011820
dotnet add package BiatecRouterConnector --version 1.0.0.2026011820
NuGet\Install-Package BiatecRouterConnector -Version 1.0.0.2026011820
<PackageReference Include="BiatecRouterConnector" Version="1.0.0.2026011820" />
<PackageVersion Include="BiatecRouterConnector" Version="1.0.0.2026011820" />
<PackageReference Include="BiatecRouterConnector" />
paket add BiatecRouterConnector --version 1.0.0.2026011820
#r "nuget: BiatecRouterConnector, 1.0.0.2026011820"
#:package BiatecRouterConnector@1.0.0.2026011820
#addin nuget:?package=BiatecRouterConnector&version=1.0.0.2026011820
#tool nuget:?package=BiatecRouterConnector&version=1.0.0.2026011820
BiatecRouterConnector
NuGet library for calling the Biatec Router API (routing swaps and generating transactions to be signed on Algorand / AVM chains).
Usage
The API uses an Authorization header carrying an ARC-0014 authentication transaction. The snippet below mirrors the working integration test.
IMPORTANT:
ReceiveMinimumis your slippage protection. Setting it too low (e.g.1, as in the example) effectively disables protection and can result in receiving far less than expected. In production, computeReceiveMinimumfrom your quoted output amount and an explicit slippage tolerance (and consider fees and decimal precision).
using Algorand;
using Algorand.Algod;
using BiatecRouterConnector;
// 1) Use ALGOd (MainNet) for ARC14 Authorization
using var algodHttpClient = HttpClientConfigurator.ConfigureHttpClient(AlgodConfiguration.MainNet);
var algodApiInstance = new DefaultApi(algodHttpClient);
var txparams = await algodApiInstance.TransactionParamsAsync();
txparams.Fee = 0;
// 2) Create and sign an ARC-0014 auth transaction.
var account = AlgorandARC76AccountDotNet.ARC76.GetAccount("<MNEMONIC>");
var tx = Algorand.Algod.Model.Transactions.PaymentTransaction
.GetPaymentTransactionFromNetworkTransactionParameters(
account.Address,
account.Address,
0,
"BiatecRouter#ARC14",
txparams);
var signed = tx.Sign(account);
var authHeader = Convert.ToBase64String(Algorand.Utils.Encoder.EncodeToMsgPackOrdered(signed));
// 3) Call the router: request a route for ALGO (0) -> USDC (31566704).
var routerHttpClient = new HttpClient();
var client = new BiatecRouterClient(routerHttpClient, authorization: authHeader);
var result = await client.Api.RouteTxsAsync(new BiatecRouterConnector.Generated.RouteInputParameters
{
FromAsset = 0,
ToAsset = 31566704,
SwapAmount = 1_000_000, // 1 ALGO
ReceiveMinimum = 1, // WARNING: example only; do NOT use this value in production.
Sender = account.Address.ToString(),
TransParams = txparams.ToRouterParams()
});
// result.Routes[0].TxsToSign contains unsigned transactions to be signed and submitted.
The REST client is generated from openapi.swagger.json during build.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Algorand4 (>= 4.4.1.2026010317)
- AlgorandARC76Account (>= 1.1.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0.2026011820 | 95 | 1/18/2026 |