Appearance
@loontail/minecraft-kit / UploadSkinInput
Type Alias: UploadSkinInput
ts
type UploadSkinInput = {
accessToken: string;
fileName?: string;
signal?: AbortSignal;
skin: Uint8Array;
variant: SkinVariantInput;
};Defined in: src/auth/profile-mutations.ts:163
Inputs to uploadSkin.
Example
ts
import { readFile } from "node:fs/promises";
import type { UploadSkinInput } from "@loontail/minecraft-kit";
const input: UploadSkinInput = {
accessToken: session.minecraft.accessToken,
skin: await readFile("./my-skin.png"),
variant: "SLIM",
};Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
accessToken | readonly | string | Minecraft bearer (session.minecraft.accessToken). | src/auth/profile-mutations.ts:165 |
fileName? | readonly | string | Optional filename part of the multipart entry. Defaults to "skin.png". | src/auth/profile-mutations.ts:175 |
signal? | readonly | AbortSignal | - | src/auth/profile-mutations.ts:176 |
skin | readonly | Uint8Array | Raw PNG bytes of the skin (64×64 or 64×32 pixels per Mojang's rules). | src/auth/profile-mutations.ts:167 |
variant | readonly | SkinVariantInput | Skin model variant — "CLASSIC" for standard arms, "SLIM" for Alex, or "AUTO" to pick the variant by inspecting the PNG pixels (see detectSkinVariant). | src/auth/profile-mutations.ts:173 |