Token (NFT) Methods (Aptos)

All methods follow window.fewcha.token.<method>

async createCollection(
    name: string,
    description: string,
    uri: string,
    maxAmount?: BCS.AnyNumber
): Promise<Response<string>>;

async createToken(
    collectionName: string,
    name: string,
    description: string,
    supply: number,
    uri: string,
    max?: BCS.AnyNumber,
    royalty_payee_address?: MaybeHexString,
    royalty_points_denominator?: number,
    royalty_points_numerator?: number,
    property_keys?: Array<string>,
    property_values?: Array<string>,
    property_types?: Array<string>
): Promise<Response<string>>;

async offerToken(
    receiver: MaybeHexString,
    creator: MaybeHexString,
    collectionName: string,
    name: string,
    amount: number,
    property_version?: number
): Promise<Response<string>>;
  
async claimToken(
    sender: MaybeHexString,
    creator: MaybeHexString,
    collectionName: string,
    name: string,
    property_version?: number
): Promise<Response<string>>;

async cancelTokenOffer(
    receiver: MaybeHexString,
    creator: MaybeHexString,
    collectionName: string,
    name: string,
    property_version?: number
): Promise<Response<string>>;

async getCollectionData(
    creator: MaybeHexString,
    collectionName: string
): Promise<Response<any>>;

async getTokenData(
    creator: MaybeHexString,
    collectionName: string,
    tokenName: string
): Promise<Response<TokenTypes.TokenData>>;

async getToken(
    creator: MaybeHexString,
    collectionName: string,
    tokenName: string,
    property_version: string
): Promise<TokenTypes.Token>;

async getTokenForAccount(
    account: MaybeHexString,
    tokenId: TokenTypes.TokenId
): Promise<Response<TokenTypes.Token>>;

Last updated