spaceship-engines.mdView |
---|
| 1 | +# spaceship engine spec |
| 2 | + |
| 3 | +following the [schema](./spaceship-schema.md), a spaceship needs an engine to |
| 4 | +travel a cypherspace galaxy. an engine is constructed from a set of functions |
| 5 | +that realise the spaceship schema. this resembles an API. unlike an API though, |
| 6 | +these requirements are not set out by a central server and presented to |
| 7 | +clients--spaceships own their engines and builders may customise them as they |
| 8 | +like. |
| 9 | + |
| 10 | +what we present here is a limited set of functions a codebase should provide to |
| 11 | +properly function as a spaceship engine. not all of these functions need |
| 12 | +implementing on their own--many of them are easily realised as |
| 13 | +compositions. |
| 14 | + |
| 15 | +## engine spec |
| 16 | + |
| 17 | +### pilot/spaceship internal functions |
| 18 | + |
| 19 | +- createIdentifier |
| 20 | +- destroyIdentifier |
| 21 | +- exportData/entombData |
| 22 | + |
| 23 | +### record functions |
| 24 | + |
| 25 | +- createRecord |
| 26 | +- editRecord |
| 27 | + |
| 28 | +### orbital functions |
| 29 | + |
| 30 | +- createOrbital |
| 31 | +- viewOrbital |
| 32 | +- sendIdentifier/hailOrbital |
| 33 | +- inviteTraveler |
| 34 | +- abandonResidency/emigrateOrbital |
| 35 | +- deportResident |
| 36 | + |
| 37 | +#### notes |
| 38 | + |
| 39 | +- a non-conforming engine build that does not obey `deportResident` calls is |
| 40 | + easily imagined. it is best not to rely on these types of functions. |
| 41 | +- speaking generally, inviting a traveler to an orbital is implicitly allowing |
| 42 | + them to bring stowaways, by virtue of the fact that any spaceship can pass on |
| 43 | + messages. trust is, as it has always been, up to the people involved, not the |
| 44 | + machines they operate. |
| 45 | + |
| 46 | +### galaxy functions |
| 47 | + |
| 48 | +- enterGalaxy |
| 49 | +- leaveGalaxy/disconnectGalaxy |