aftermath-ts-sdk - v3.3.3
    Preparing search index...

    Converts gRPC object views into NFT and kiosk domain objects.

    All methods are local casts. They perform no network I/O and expect the caller to have requested the gRPC json view. NFT methods also require the Display view when they need to read display.

    Index
    • Casts a Mysten personal-kiosk owner-cap gRPC object view.

      The gRPC JSON view must contain cap.for. The nested cap struct is unwrapped before the kiosk ID is normalized to a zero-padded object ID.

      Parameters

      • object: SuiObjectView

        A gRPC object view for the personal-kiosk cap type.

      Returns KioskOwnerCapObject

      The owner cap and the personal kiosk object ID it controls.

      Error when the object identity, type, nested cap, or for field is missing.

    • Casts a regular KioskOwnerCap gRPC object view.

      The gRPC JSON view must contain the cap's for field. The field is normalized to a zero-padded object ID, and the returned object keeps the source object's ID and Move type.

      Parameters

      • object: SuiObjectView

        A gRPC object view for 0x2::kiosk::KioskOwnerCap.

      Returns KioskOwnerCapObject

      The owner cap and the kiosk object ID it controls.

      Error when the object identity, type, or for field is missing.

    • Casts one gRPC object view into an NFT.

      Display data with an error or no output becomes empty suggested and other maps. This method does not filter the result, so it can return an NFT with empty display maps even though nftsFromSuiObjects would omit it.

      Parameters

      • object: SuiObjectView

        The gRPC object view with JSON and Display data.

      Returns Nft

      The object's identity and normalized Display fields.

      Error when the object ID or Move type is absent.

    • Casts and filters a list of gRPC object views into renderable NFTs.

      Objects without a Display response are omitted. Objects whose Display response has no suggested or other fields are also omitted. The remaining objects preserve input order.

      Parameters

      • objects: SuiObjectView[]

        gRPC object views with JSON and Display data requested.

      Returns Nft[]

      Renderable NFT objects in input order.

      Errors from the NFT caster when an included object lacks identity.