@aptos-labs/ts-sdk
Version:
Aptos TypeScript SDK
24 lines (21 loc) • 913 B
text/typescript
import { Deserializer } from '../bcs/deserializer.mjs';
import { Serializable } from '../bcs/serializer.mjs';
import '../types/index.mjs';
import './apiEndpoints.mjs';
import '../types/indexer.mjs';
import '../types/generated/operations.mjs';
import '../types/generated/types.mjs';
import '../core/hex.mjs';
import '../core/common.mjs';
type DeserializableClass<T extends Serializable> = {
deserialize(deserializer: Deserializer): T;
};
/**
* Utility function that serializes and deserialize an object back into the same bundle as the sdk.
* This is a workaround to have the `instanceof` operator work when input objects come from a different
* bundle.
* @param cls The class of the object to normalize
* @param value the instance to normalize
*/
declare function normalizeBundle<T extends Serializable>(cls: DeserializableClass<T>, value: T): T;
export { type DeserializableClass, normalizeBundle };