Caelus3,462 checksGitHubv0.25.0MIT
API Reference / registerMintedBody · function

Function: registerMintedBody()

function registerMintedBody(
   engine, 
   bytes, 
certificate): Promise<MintCertificate>;

Verify a minted pack and register its body on an engine under the certificate's id. The body then answers position, longitude, and heliocentric inside the certificate's span and throws outside it, and engineCapabilities reports it with that span.

Parameters

ParameterTypeDescription
engineEngineThe engine to register on.
bytesUint8ArrayThe pack's bytes.
certificateMintCertificateThe certificate published beside the pack.

Returns

Promise<MintCertificate>

The certificate.

Example

const cert = await registerMintedBody(engine, bytes, certificate);
engine.position(cert.id, julianDay(2012, 1, 31)).lon;
cert.error.angle_bound_arcsec; // how far off that longitude can be

Start building

Quickstart →