Appearance
Core
Pre-authentication helpers: proof-of-work challenges and email checks used during signup and login.
Endpoints
| Endpoint | Arguments | Returns |
|---|---|---|
v3.core.challenge | - | object |
v3.core.checkEmail | email: string, identifier: string | boolean |
v3.core.proofOfWork | challenge: { identifier: string, salt: string }, endpoint: string, args: any | unknown |
v3.proofOfWork.call | challenge: 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
| Field | Type | Required | Description |
|---|---|---|---|
challenge | string | no | |
identifier | string | no | |
difficulty | number | no |
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):
| Field | Type | Required | Description |
|---|---|---|---|
identifier | string | no | |
salt | string | no |
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
| Field | Type | Required | Description |
|---|---|---|---|
challenge | string | no | |
difficulty | number | no |
Auth: callable without authentication.
Errors: on failure returns the standard Hailer error object { code, msg, details?, debug? }.