Skip to content
dayprotocolPublic

About

DAY Protocol public SDK (@dayprotocol/sdk)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

@dayprotocol/sdk

Public JavaScript and TypeScript client for DAY discovery and prepare plans.

Public boundary

This package is intentionally limited to:

  • public protocol discovery and read-only market data;
  • public wallet-balance reads; and
  • a short allowlist of prepare-plan endpoints.

It does not expose credentials, transaction signing, broadcasts, execution controls, wallet administration, automation controls, strategy management, custody, contracts, or protocol-internal adapter details. A prepare plan is data for an owner-controlled integration; this SDK never submits it.

Install

npm install @dayprotocol/sdk

Quick start

import { DayClient, toMicrosString } from "@dayprotocol/sdk";

const day = new DayClient({ baseUrl: "https://dayprotocol.com" });

const venues = await day.listVenuesByChain({ chain: "sui" });
const plan = await day.prepareStrategyDeposit({
  strategyId: "suilend",
  amountMicros: toMicrosString(1_000_000),
  owner: "0xowner_wallet",
});

console.log({ venues, plan });

API surface

Category Methods
Discovery readiness, network, whatPossible, packages, venue/form/strategy listing, opportunities, market statistics, map venues, network profiles
Public balances suiWalletBalance, solanaWalletBalance, baseWalletBalance, arbitrumWalletBalance
Prepare only prepareStrategyDeposit, prepareStrategyWithdraw, solanaStakePlan, bridgePlan
Version checkForUpdate, checkApiVersion

Prepare methods reject execute, broadcast, signature, credential, and private-key fields before issuing a request. They do not provide a fallback route that can submit or execute a plan.

Money values

Amounts are integer micros. Use toMicrosString rather than floating point values.

toMicrosString("1000000"); // "1000000"

Compatibility

Use an origin base URL (https://dayprotocol.com) or an API-v1 base URL (https://dayprotocol.com/api/v1). The client prevents a duplicate API prefix.

Development

npm test
npm pack --dry-run

About

DAY Protocol public SDK (@dayprotocol/sdk)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages