@agent-face/core
v1.1.0
Published
Chain-agnostic deterministic SVG avatar generator for wallet addresses, public keys, hashes, and any stable string.
Downloads
174
Maintainers
Readme
@agent-face/core
Chain-agnostic deterministic SVG avatar core for wallet addresses, public keys, hashes, and any stable string.
Install
pnpm add @agent-face/coreAPI
import {
CHARACTER_TYPES,
generateAgentFaceConfig,
renderAgentFaceSvg,
serializeAgentFaceConfig,
deserializeAgentFaceConfig,
} from "@agent-face/core";
const config = generateAgentFaceConfig("0xabc123", "geo");
const svg = renderAgentFaceSvg(config);
const query = serializeAgentFaceConfig(config);
const restored = deserializeAgentFaceConfig(query);
console.log(CHARACTER_TYPES);Exports
AgentFaceConfigCharacterTypeCHARACTER_TYPESgenerateAgentFaceConfig(seed: string, characterType?: CharacterType)renderAgentFaceSvg(config: AgentFaceConfig)serializeAgentFaceConfig(config: AgentFaceConfig)deserializeAgentFaceConfig(input: string | URLSearchParams)
Notes
- Same seed always produces the same config.
- Omitting
characterTypedefaults to"robot"for backward compatibility. - Works well with wallet addresses, public keys, hashes, ENS-style names, and other stable identifiers.
- SVG output is a complete string and does not depend on the browser DOM.
- Repository: https://github.com/joyboy-sats/agent-face
