Docs
chromia.com

Interface

RegistrationStrategy

On this page

Functions that can be used to register an account

interface RegistrationStrategy {
    fee: (
        senderBlockchainRid: BufferId,
        feeAsset: Asset,
        authDescriptor: AnyAuthDescriptorRegistration,
        loginConfig?: LoginConfigOptions | null,
    ) => Strategy;
    importStrategy: (
        originBrid: BufferId,
        mainAuthDescriptor: AnyAuthDescriptorRegistration,
        loginConfig?: LoginConfigOptions | null,
        options?: ImportStrategyOptions,
    ) => Strategy;
    open: (
        authDescriptor: AnyAuthDescriptorRegistration,
        loginConfig?: LoginConfigOptions | null,
    ) => Strategy;
    subscription: (
        senderBlockchainRid: BufferId,
        subscriptionAsset: Asset,
        authDescriptor: AnyAuthDescriptorRegistration,
        loginConfig?: LoginConfigOptions | null,
    ) => Strategy;
    transferFee: (
        feeAsset: Asset,
        authDescriptor: AnyAuthDescriptorRegistration,
        loginConfig?: LoginConfigOptions | null,
    ) => Strategy;
    transferOpen: (
        authDescriptor: AnyAuthDescriptorRegistration,
        loginConfig?: LoginConfigOptions | null,
    ) => Strategy;
    transferSubscription: (
        subscriptionAsset: Asset,
        authDescriptor: AnyAuthDescriptorRegistration,
        loginConfig?: LoginConfigOptions | null,
    ) => Strategy;
}

Properties

fee

fee: (
    senderBlockchainRid: BufferId,
    feeAsset: Asset,
    authDescriptor: AnyAuthDescriptorRegistration,
    loginConfig?: LoginConfigOptions | null,
) => Strategy

Registers an account using the fee strategy

Type Declaration

    • (
          senderBlockchainRid: BufferId,
          feeAsset: Asset,
          authDescriptor: AnyAuthDescriptorRegistration,
          loginConfig?: LoginConfigOptions | null,
      ): Strategy
    • Parameters

      • senderBlockchainRid: BufferId

        the blockchain rid from which the assets will be paid

      • feeAsset: Asset

        the asset that will be used to pay the fee

      • authDescriptor: AnyAuthDescriptorRegistration

        the auth descriptor of the new account

      • OptionalloginConfig: LoginConfigOptions | null

        the config if the account should be created with an active session, otherwise null

      Returns Strategy

      Strategy instance that can be used to retrieve registration details

importStrategy

importStrategy: (
    originBrid: BufferId,
    mainAuthDescriptor: AnyAuthDescriptorRegistration,
    loginConfig?: LoginConfigOptions | null,
    options?: ImportStrategyOptions,
) => Strategy

Creates an account using the import strategy

Type Declaration

open

open: (
    authDescriptor: AnyAuthDescriptorRegistration,
    loginConfig?: LoginConfigOptions | null,
) => Strategy

Registers an account using the open strategy

Type Declaration

subscription

subscription: (
    senderBlockchainRid: BufferId,
    subscriptionAsset: Asset,
    authDescriptor: AnyAuthDescriptorRegistration,
    loginConfig?: LoginConfigOptions | null,
) => Strategy

Registers an account using the subscription strategy

Type Declaration

    • (
          senderBlockchainRid: BufferId,
          subscriptionAsset: Asset,
          authDescriptor: AnyAuthDescriptorRegistration,
          loginConfig?: LoginConfigOptions | null,
      ): Strategy
    • Parameters

      • senderBlockchainRid: BufferId

        the blockchain rid from which the assets will be paid

      • subscriptionAsset: Asset

        the asset that will be used to pay the subscription

      • authDescriptor: AnyAuthDescriptorRegistration

        the auth descriptor of the new account

      • OptionalloginConfig: LoginConfigOptions | null

        the config if the account should be created with an active session, otherwise null

      Returns Strategy

      Strategy instance that can be used to retrieve registration details

transferFee

transferFee: (
    feeAsset: Asset,
    authDescriptor: AnyAuthDescriptorRegistration,
    loginConfig?: LoginConfigOptions | null,
) => Strategy

Creates an account that previously had assets transferred to it, and paying a fee

Type Declaration

transferOpen

transferOpen: (
    authDescriptor: AnyAuthDescriptorRegistration,
    loginConfig?: LoginConfigOptions | null,
) => Strategy

Creates an account that previously had assets transferred to it, without paying a fee

Type Declaration

transferSubscription

transferSubscription: (
    subscriptionAsset: Asset,
    authDescriptor: AnyAuthDescriptorRegistration,
    loginConfig?: LoginConfigOptions | null,
) => Strategy

Creates an account that previously had assets transferred to it, paying a subscription fee

Type Declaration