HandleTokenURILib

Git Source

Functions

getTokenURI

function getTokenURI(uint256 tokenId, string memory localName) external pure returns (string memory);

_getSVGImageBase64Encoded

function _getSVGImageBase64Encoded(string memory localName) private pure returns (string memory);

_localNameLengthToFontSize

Maps the local name length to a font size.

Gives the font size as a function of the local name length. This dynamic font size mapping ensures all handle token URIs will look nice when rendered as image.

function _localNameLengthToFontSize(uint256 localNameLength) internal pure returns (uint256);

Parameters

NameTypeDescription
localNameLengthuint256The handle's local name length.

Returns

NameTypeDescription
<none>uint256uint256 The font size.