@hyperionxyz/sdk
v0.1.1
Published
This SDK allows you to interact with the Hyperion API. You can use it to request data, create pools/positions and more.
Readme
@hyperionxyz/sdk
This SDK allows you to interact with the Hyperion API.
You can use it to request data, create pools/positions and more.
Installation
pnpm install @aptos-labs/ts-sdk @aptos-labs/script-composer-sdk @hyperionxyz/sdkVersion 0.1 Compatibility
@hyperionxyz/[email protected] migrates Hyperion data reads from GraphQL to REST.
Most integrations do not need code changes if they use the high-level SDK modules:
SDK.PoolSDK.PositionSDK.RewardSDK.Swap
The following low-level GraphQL integration points were removed:
requestModule.queryIndexerrequestModule.queryOfficialIndexer- imports from
src/config/queries SDKOptions.officialFullNodeIndexerURL
New SDK options should use the Hyperion API host:
import { Network } from "@aptos-labs/ts-sdk";
import { HyperionSDK } from "@hyperionxyz/sdk";
const SDK = new HyperionSDK({
network: Network.MAINNET,
contractAddress:
"0x8b4a2c4bb53857c718a04c020b98f8c2e1f99a68b0f57389a8bf5434cd22e05c",
hyperionFullNodeIndexerURL: "https://api.hyperion.xyz",
hyperionAPIHost: "https://api.hyperion.xyz",
APTOS_API_KEY: "",
});Legacy hyperionFullNodeIndexerURL values ending in /v1/graphql are normalized internally, but new code should pass the API host directly.
