Skip to content
API reference

Registration

The three functions that check and complete a user's one-time registration.

A user registers once before their first deposit. Register a user walks through the flow.

readRegistration

Use it to learn whether the user is registered now. The session's own registration is fixed when the session opens.

function readRegistration(
  session: NimbusSession,
  _args?: Readonly<Record<string, never>>,
): Promise<NimbusRegistrationStanding>;

Types used: NimbusSession, NimbusRegistrationStanding

Example

import {  } from "@umbra/nimbus-solana-web";
import type { NimbusSession } from "@umbra/nimbus-solana-web";

declare const : NimbusSession;
const  = await (, {});
if (. === "registered") {
  .(`registered in pool ${(.)}`);
}

Parameters

Prop

Type

Returns

Promise<NimbusRegistrationStanding>

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/session.ts.

createRegistrationContext

Create one before you call register. It picks the pool the user registers in.

function createRegistrationContext(
  session: NimbusSession,
  options?: RegistrationContextOptions,
): Promise<RegistrationContext>;

Types used: NimbusSession, RegistrationContextOptions, RegistrationContext

Example

import { ,  } from "@umbra/nimbus-solana-web";
import type { NimbusSession } from "@umbra/nimbus-solana-web";

declare const : NimbusSession;
const  = await (await (), {});

Parameters

Returns

Promise<RegistrationContext>

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/contexts.ts.

register

Use it once per user, while readRegistration says unregistered.

function register(
  context: RegistrationContext,
  _args?: Readonly<Record<string, never>>,
  options?: RegisterOptions,
): Promise<RegistrationResult>;

Types used: RegistrationContext, RegisterOptions, RegistrationResult

Example

import { ,  } from "@umbra/nimbus-solana-web";
import type { NimbusSession } from "@umbra/nimbus-solana-web";

declare const : NimbusSession;
const  = await (await (), {}, {
  : () => {
    .(.);
  },
});

Parameters

Prop

Type

Returns

Promise<RegistrationResult>

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

Last updated

On this page