# Description of Changes
This exports the following API from `spacetime:sys@1.0`:
```ts
export type ModuleHooks = {
__describe_module__(): Uint8Array;
__call_reducer__(
reducerId: u32,
sender: u256,
connId: u128,
timestamp: bigint,
argsBuf: Uint8Array
): { tag: 'ok' } | { tag: 'err'; value: string };
};
export function register_hooks(hooks: ModuleHooks);
```
This is then called by the `spacetimedb` package. This means that users
no longer need to export `__call_reducer__` and `__describe_module__`
from their own code, and differently from how it was before it doesn't
pollute the global namespace. It also means that the signatures for
`__call_reducer__` can be changed when we change the ABI version - the
bindings would then do `import { register_hooks } from
"spacetime:sys@2.0";` and that version of the function would expect a
different signature..
# Expected complexity level and risk
2 - it's a change, but not all that different from the existing way
we've been doing it.
# Testing, and also , and also
<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->
- [x] Automated testing
- [ ] <!-- maybe a test you want a reviewer to do, so they can check it
off when they're satisfied. -->