Skip to content

@loontail/minecraft-kit v0.8.14 / UploadSkinInput

Type alias: UploadSkinInput

ts
type UploadSkinInput: {
  accessToken: string;
  fileName: string;
  signal: AbortSignal;
  skin: Uint8Array;
  variant: SkinVariantInput;
};

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",
};

Type declaration

MemberTypeDescription
accessTokenstringMinecraft bearer (session.minecraft.accessToken).
fileNamestringOptional filename part of the multipart entry. Defaults to "skin.png".
signalAbortSignal-
skinUint8ArrayRaw PNG bytes of the skin (64×64 or 64×32 pixels per Mojang's rules).
variantSkinVariantInput

Skin model variant — "CLASSIC" for standard arms, "SLIM" for Alex, or "AUTO" to pick the variant by inspecting the PNG pixels (see

detectSkinVariant).

Source

src/auth/profile-mutations.ts:163

MIT License