Metadata Reactor Capabilities
This browser-only demo showcases MetadataReactor capabilities using a local
IDL service definition, so it can run without a live canister.
Features Demonstrated
Section titled “Features Demonstrated”- Generate runtime input metadata with
getInputMeta()andgetAllInputMeta() - Generate runtime output metadata with
getOutputMeta()andgetAllOutputMeta() - Build dynamic variable references with
buildMethodVariableCandidates() - Hydrate form values from hex-encoded Candid args with
buildForMethod() - Resolve rich method outputs with metadata-driven resolvers
Open in StackBlitzEdit and run in your browser
View on GitHubBrowse the source code
Live Preview
Section titled “Live Preview”Key Code
Section titled “Key Code”const inputMeta = reactor.getInputMeta(methodName)const outputMeta = reactor.getOutputMeta(methodName)const variableCandidates = reactor.buildMethodVariableCandidates(methodName)
const candidArgsHex = toHex(IDL.encode(argTypes, args))const hydrated = await reactor.buildForMethod(methodName, { candidArgsHex })
const resolved = outputMeta?.resolve(sampleOutputs[methodName])