REDNODE / DOCS

Keys test

Example apps / keys-test / v0.1.0

Node modkeys:rednode-test permissionneeds rednode

Reads one of the player's shared keys with secrets.shared, asks for it with secrets.askShared, and moves a key the package kept itself into the shared store.

Simulated game starting
Mod log

    A preview has no keys: every read gives null, and the ask only logs what the game would show.

    How it works

    The manifest lists "keys:rednode-test", a made-up service, so the test never touches a real key. secrets.shared answers null until the player allows the package or while no key is set.

    secrets.askShared opens REDnode's own Key request window: the player allows the package and, when no key is saved, pastes one. The package gets the key, or null when the player denies.

    With offer, a key the package kept in its own secrets moves to the shared store; the window shows only its last 4 characters. Then the package deletes its own copy, as REDagent does.

    A key the manifest does not list is refused with an error.

    What it uses

    secrets.shared secrets.askShared keys:<service> permission

    Try this

    Use it

    Copy the files into red4ext/plugins/REDnode/apps/keys-test/ in the game folder, or start your own package from them: change id and name in the manifest first. The whole folder is on GitHub.