Skip to content

avnu-labs/avnu-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

62e3c4d Β· Dec 5, 2024

History

76 Commits
Dec 19, 2023
Dec 5, 2024
Dec 5, 2024
Apr 25, 2023
Apr 25, 2023
Apr 25, 2023
Apr 25, 2023
Apr 25, 2023
Jul 15, 2024
Dec 5, 2024
Aug 17, 2023
Jul 13, 2023
Dec 5, 2024

Repository files navigation

AVNU-SDK

AVNU-sdk is a typeScript SDK for building exchange functionality on Layers 2 with the AVNU API.

Installation

npm install @avnu/avnu-sdk

# or

yarn add @avnu/avnu-sdk

Usage

const params = {
  sellTokenAddress: ethAddress,
  buyTokenAddress: wBtcAddress,
  sellAmount: formatUnits('200000000000000000', 18),
  takerAddress: account.address,
}
const quotes = await fetchQuotes(params);
await executeSwap(account, quotes[0]);

Example

This repository includes a basic example in the [/examples](/examples) folder.