UNPKG

@ar.io/sdk

Version:

[![codecov](https://codecov.io/gh/ar-io/ar-io-sdk/graph/badge.svg?token=7dXKcT7dJy)](https://codecov.io/gh/ar-io/ar-io-sdk)

38 lines (37 loc) 1.75 kB
/** * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { ANTRecords, AoANTState, HyperBeamANTState, SortedANTRecords } from '../types/ant.js'; /** * Sorts ANT records by priority and then lexicographically. * * Note: javascript guarantees that the order of objects in an object is persistent. Still, adding index to each record is useful for enforcing against undername limits. * * Reference: https://github.com/ar-io/ar-io-node/blob/e0a9ec56559cad1b3e35d668563871afb8649913/docs/madr/003-arns-undername-limits.md * * @param antRecords - The ANT records to sort. */ export declare const sortANTRecords: (antRecords: ANTRecords) => SortedANTRecords; /** * @deprecated - this is no longer necessary because HyperBeam now uses the AoANTState type */ export declare const isHyperBeamANTState: (state: any) => state is HyperBeamANTState; /** * Convert HyperBeam serialized ANT state to backwards compatible format. * * @deprecated - this is no longer necessary because HyperBeam now uses the AOANTState type * @param state - The HyperBeam serialized ANT state. */ export declare const convertHyperBeamStateToAoANTState: (initialState: HyperBeamANTState) => AoANTState;