BiatecRouterConnector 1.0.0.2026011820

dotnet add package BiatecRouterConnector --version 1.0.0.2026011820
                    
NuGet\Install-Package BiatecRouterConnector -Version 1.0.0.2026011820
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BiatecRouterConnector" Version="1.0.0.2026011820" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BiatecRouterConnector" Version="1.0.0.2026011820" />
                    
Directory.Packages.props
<PackageReference Include="BiatecRouterConnector" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BiatecRouterConnector --version 1.0.0.2026011820
                    
#r "nuget: BiatecRouterConnector, 1.0.0.2026011820"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BiatecRouterConnector@1.0.0.2026011820
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BiatecRouterConnector&version=1.0.0.2026011820
                    
Install as a Cake Addin
#tool nuget:?package=BiatecRouterConnector&version=1.0.0.2026011820
                    
Install as a Cake Tool

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: ReceiveMinimum is 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, compute ReceiveMinimum from 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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