NAVI Protocol Developer Docs
  • đŸ–Ĩī¸Build with NAVI Protocol
  • 📖Smart Contract Overview
    • 1ī¸Lending Core
    • 2ī¸Flash Loan
    • 3ī¸Calculator
    • 4ī¸Dynamic Calculator
    • 5ī¸Storage
  • 🕓Decentralized Oracle
    • đŸ’ŊOracle Interface
  • đŸ—ēī¸Contract Configuration
    • 1ī¸âƒŖGet the Latest Package ID
    • 2ī¸âƒŖGet Pools Config and Oracle Price Feeds
    • 3ī¸âƒŖGet Flashloan Config
  • đŸ›Šī¸NAVI SDK
    • 1ī¸Getting Started
    • 2ī¸Retrieve Info & Data
    • 3ī¸Interactions With NAVI
    • 4ī¸PTB Functions
    • 5ī¸Other Ways to Interact with NAVI
    • 6ī¸Demo
  • 📲NAVI UI SDK
    • ⭐Getting Started
    • đŸ…°ī¸Aggregator Components
  • 🎧Contract Integration with NAVI
    • 1ī¸âƒŖRetrieve Pools Info inside Contract
    • 2ī¸âƒŖIntegration with Account Cap
    • 3ī¸âƒŖDemo
  • 🏅NAVI Aggregator
    • 1ī¸âƒŖGetting Started
    • 2ī¸âƒŖAggregator SDK
    • 3ī¸âƒŖAggregator API
    • 🛜Contact Page
  • NAVI Bridge
    • 🚀Quick Start
    • 📄Bridge SDK
  • 📊NAVI Uptime Status Page
  • 📚NAVI API Collection
    • NAVI API
    • afSui, haSui, vSui API
  • ❓FAQ
Powered by GitBook
On this page
  1. Contract Configuration

Get the Latest Package ID

PreviousContract ConfigurationNextGet Pools Config and Oracle Price Feeds

Last updated 8 months ago

getPackageId - NAVI API

The getPackageId API is publicly accessible and retrieves the latest package information for the NAVI Protocol. This endpoint provides the current packageId in use, along with a list of outdated package IDs for reference. It helps developers ensure they are working with the most up-to-date package when interacting with NAVI's smart contracts.

getPackageId - NAVI SDK

The getLatestProtocolPackageId function in the NAVI SDK retrieves the most recent packageId used in the NAVI Protocol. This function is essential for PTB developers to ensure they are interacting with the latest version of NAVI’s smart contracts in their JavaScript-based code.

import { getLatestProtocolPackageId } from 'navi-sdk/dist/libs/PoolInfo';

const id = await getLatestProtocolPackageId();

đŸ—ēī¸
1ī¸âƒŖ

Get the latest package information

get
Responses
200
Successful response with the latest package and outdated packages
application/json
404
Package not found
get
GET /api/package HTTP/1.1
Host: open-api.naviprotocol.io
Accept: */*
{
  "packageId": "0x834a86970ae93a73faf4fff16ae40bdb72b91c47be585fff19a2af60a19ddca3",
  "outdated": [
    {
      "packageId": "0x66aa3335901ce7e04b85ed6597ee42d4b479f7110bf98e8ebd474fa32a0027e1",
      "version": 19
    },
    {
      "packageId": "0xc6374c7da60746002bfee93014aeb607e023b2d6b25c9e55a152b826dbc8c1ce",
      "version": 18
    },
    {
      "packageId": "0x2c256d2ae030db12c7015aa1617ad928e60cc99d460b279fe76bbb9f82fa7063",
      "version": 17
    },
    {
      "packageId": "0x7c9b90b3fda0fa4aa8ee88ae6c4a0b83c773f74936b5354448cb94662e94442d",
      "version": 16
    },
    {
      "packageId": "0x9b3f433217c2bbfd13368b264653fc9989fcf8daab1144fa4b44a9fc168c243e",
      "version": 15
    },
    {
      "packageId": "0x06007a2d0ddd3ef4844c6d19c83f71475d6d3ac2d139188d6b62c052e6965edd",
      "version": 14
    },
    {
      "packageId": "0xd92d9db3ae5e2e932eda336b15f97e02255d152201d0cf29a29ca0c4fb0205f3",
      "version": 13
    },
    {
      "packageId": "0xdd01308cf0b874407dcfcae8d769090421111567954139083c776261c5f0e2b0",
      "version": 12
    },
    {
      "packageId": "0x3e8e806c3028adfffec57e380bb458f8286b73f1bf9b8906f89a2bb6b817616c",
      "version": 11
    },
    {
      "packageId": "0x66c91a8560cd64d73d93dd1ec7b61f3f21ad2f66553dd3d7038ca69255479bb7",
      "version": 10
    },
    {
      "packageId": "0xe66f07e2a8d9cf793da1e0bca98ff312b3ffba57228d97cf23a0613fddf31b65",
      "version": 9
    },
    {
      "packageId": "0x461364d0dc7edb74d73f8366605c63a3f67c37fc1dabf0c31780b37cc77820f6",
      "version": 8
    },
    {
      "packageId": "0xf5f8e3dc0252b22c61f24cbcaefba49bf6ccfff4ce7159e34d9aec0ba5112105",
      "version": 7
    },
    {
      "packageId": "0x81be491340a6964eb9903141c3068db55704b5892072eb9e372cc98f4b04639c",
      "version": 6
    },
    {
      "packageId": "0x0440aedc27c9a57ea357bd8fe1525a00d60d7f442a380924a7e7c1d79853bb8b",
      "version": 5
    },
    {
      "packageId": "0xb2345915de1f9bd661e9ab27eb27e376cdf6391359ea64fbfdb4550b092c1aa0",
      "version": 4
    },
    {
      "packageId": "0xd92bc457b42d48924087ea3f22d35fd2fe9afdf5bdfe38cc51c0f14f3282f6d5",
      "version": 3
    },
    {
      "packageId": "0xcd265ef828babd6d6b78693218d377aab349b3b2319bca1a3b4d614f91156d33",
      "version": 2
    },
    {
      "packageId": "0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca",
      "version": 1
    }
  ]
}
  • getPackageId - NAVI API
  • GETGet the latest package information
  • getPackageId - NAVI SDK