client-aftermath-ts-sdk
Version:
Client Aftermath TypeScript SDK
77 lines • 3.29 kB
TypeScript
import { AftermathApi } from "../providers/aftermathApi";
import { AnyObjectType, ObjectId, PackageId, SuiAddress } from "../../types";
import { SuiObjectDataFilter, SuiObjectDataOptions, SuiObjectResponse } from "@mysten/sui/client";
import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
import { BcsType } from "@mysten/sui/bcs";
export declare class ObjectsApiHelpers {
private readonly Provider;
private static readonly constants;
constructor(Provider: AftermathApi);
fetchDoesObjectExist: (objectId: ObjectId | PackageId) => Promise<boolean>;
fetchIsObjectOwnedByAddress: (inputs: {
objectId: ObjectId;
walletAddress: SuiAddress;
}) => Promise<boolean>;
fetchObjectsOfTypeOwnedByAddress: (inputs: {
walletAddress: SuiAddress;
objectType: AnyObjectType;
withDisplay?: boolean;
options?: SuiObjectDataOptions;
}) => Promise<SuiObjectResponse[]>;
fetchOwnedObjects: (inputs: {
walletAddress: SuiAddress;
filter?: SuiObjectDataFilter;
withDisplay?: boolean;
options?: SuiObjectDataOptions;
}) => Promise<SuiObjectResponse[]>;
fetchObject: (inputs: {
objectId: ObjectId;
withDisplay?: boolean;
}) => Promise<SuiObjectResponse>;
fetchObjectGeneral: (inputs: {
objectId: ObjectId;
options?: SuiObjectDataOptions;
}) => Promise<SuiObjectResponse>;
fetchCastObject: <ObjectType>(inputs: {
objectId: ObjectId;
objectFromSuiObjectResponse: (SuiObjectResponse: SuiObjectResponse) => ObjectType;
withDisplay?: boolean | undefined;
}) => Promise<ObjectType>;
fetchCastObjectGeneral: <ObjectType>(inputs: {
objectId: ObjectId;
objectFromSuiObjectResponse: (SuiObjectResponse: SuiObjectResponse) => ObjectType;
options?: SuiObjectDataOptions | undefined;
}) => Promise<ObjectType>;
fetchObjectBatch: (inputs: {
objectIds: ObjectId[];
options?: SuiObjectDataOptions;
}) => Promise<SuiObjectResponse[]>;
fetchCastObjectBatch: <ObjectType>(inputs: {
objectIds: ObjectId[];
objectFromSuiObjectResponse: (data: SuiObjectResponse) => ObjectType;
options?: SuiObjectDataOptions | undefined;
}) => Promise<ObjectType[]>;
fetchCastObjectsOwnedByAddressOfType: <ObjectType>(inputs: {
walletAddress: SuiAddress;
objectType: AnyObjectType;
objectFromSuiObjectResponse: (SuiObjectResponse: SuiObjectResponse) => ObjectType;
withDisplay?: boolean | undefined;
options?: SuiObjectDataOptions | undefined;
}) => Promise<ObjectType[]>;
fetchObjectBcs: (objectId: ObjectId) => Promise<SuiObjectResponse>;
fetchCastObjectBcs: <T, U>(inputs: {
objectId: ObjectId;
bcsType: BcsType<U, U>;
fromDeserialized: (deserialized: U) => T;
}) => Promise<T>;
burnObjectTx: (inputs: {
tx: Transaction;
object: TransactionObjectArgument;
}) => Promise<TransactionObjectArgument>;
publicShareObjectTx: (inputs: {
tx: Transaction;
object: TransactionObjectArgument;
objectType: AnyObjectType;
}) => Promise<TransactionObjectArgument>;
}
//# sourceMappingURL=objectsApiHelpers.d.ts.map