Skip to content

Core

Pre-authentication helpers: proof-of-work challenges and email checks used during signup and login.

Endpoints

EndpointArgumentsReturns
v3.core.challenge-object
v3.core.checkEmailemail: string, identifier: stringboolean
v3.core.proofOfWorkchallenge: { identifier: string, salt: string }, endpoint: string, args: anyunknown
v3.proofOfWork.callchallenge: string, hash: string, endpoint: string, args: any[]unknown
v3.proofOfWork.challenge-object

v3.core.challenge

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Undocumented

This endpoint declares no argument schema in the source yet.

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.core.challenge', []);
console.log(result);

Returns

FieldTypeRequiredDescription
challengestringno
identifierstringno
difficultynumberno

Auth: callable without authentication.

Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.

v3.core.checkEmail

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (string, required):

Argument 2 (string, required):

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.core.checkEmail', [
  'string', // argument 1 (required)
  'string', // argument 2 (required)
]);
console.log(result);

Returns

boolean

Auth: callable without authentication.

Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.

v3.core.proofOfWork

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, optional):

FieldTypeRequiredDescription
identifierstringno
saltstringno

Argument 2 (string, optional):

Argument 3 (any, optional):

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.core.proofOfWork', [
  {
    identifier: 'string',
    salt: 'string',
  },
  'string', // argument 2
  '...', // argument 3
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: callable without authentication.

Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.

v3.proofOfWork.call

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (string, optional): Challenge

Argument 2 (string, optional): Hash

Argument 3 (string, optional): Endpoint

Argument 4 (any[], optional): Arguments

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.proofOfWork.call', [
  'string', // Challenge
  'string', // Hash
  'string', // Endpoint
  ['...'],
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: callable without authentication.

Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.

v3.proofOfWork.challenge

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Undocumented

This endpoint declares no argument schema in the source yet.

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('v3.proofOfWork.challenge', []);
console.log(result);

Returns

FieldTypeRequiredDescription
challengestringno
difficultynumberno

Auth: callable without authentication.

Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.

Hailer Developer Documentation