Interface RegistrationStrategy

Functions that can be used to register an account

interface RegistrationStrategy {
    fee: ((senderBlockchainRid, feeAsset, authDescriptor, loginConfig?) => Strategy);
    open: ((authDescriptor, loginConfig?) => Strategy);
    subscription: ((senderBlockchainRid, subscriptionAsset, authDescriptor, loginConfig?) => Strategy);
    transferFee: ((feeAsset, authDescriptor, loginConfig?) => Strategy);
    transferOpen: ((authDescriptor, loginConfig?) => Strategy);
    transferSubscription: ((subscriptionAsset, authDescriptor, loginConfig?) => Strategy);
}

Properties

fee: ((senderBlockchainRid, feeAsset, authDescriptor, loginConfig?) => Strategy)

Registers an account using the fee strategy

Type declaration

    • (senderBlockchainRid, feeAsset, authDescriptor, loginConfig?): 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

      • Optional loginConfig: null | LoginConfigOptions

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

      Returns Strategy

Returns

Strategy instance that can be used to retrieve registration details

open: ((authDescriptor, loginConfig?) => Strategy)

Registers an account using the open strategy

Type declaration

Returns

Strategy instance that can be used to retrieve registration details

subscription: ((senderBlockchainRid, subscriptionAsset, authDescriptor, loginConfig?) => Strategy)

Registers an account using the subscription strategy

Type declaration

    • (senderBlockchainRid, subscriptionAsset, authDescriptor, loginConfig?): 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

      • Optional loginConfig: null | LoginConfigOptions

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

      Returns Strategy

Returns

Strategy instance that can be used to retrieve registration details

transferFee: ((feeAsset, authDescriptor, loginConfig?) => Strategy)

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

Type declaration

    • (feeAsset, authDescriptor, loginConfig?): Strategy
    • Parameters

      • feeAsset: Asset

        the asset in which to pay the fee. The asset needs to be present on the account

      • authDescriptor: AnyAuthDescriptorRegistration

        the auth descriptor of the new account

      • Optional loginConfig: null | LoginConfigOptions

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

      Returns Strategy

Returns

Strategy instance that can be used to retrieve registration details

transferOpen: ((authDescriptor, loginConfig?) => Strategy)

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

Type declaration

Returns

Strategy instance that can be used to retrieve registration details

transferSubscription: ((subscriptionAsset, authDescriptor, loginConfig?) => Strategy)

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

Type declaration

    • (subscriptionAsset, authDescriptor, loginConfig?): Strategy
    • Parameters

      • subscriptionAsset: Asset

        the asset that will be used to pay the subscription. The asset must already have been sent to the account

      • authDescriptor: AnyAuthDescriptorRegistration

        the auth descriptor of the new account

      • Optional loginConfig: null | LoginConfigOptions

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

      Returns Strategy

Returns

Strategy instance that can be used to retrieve registration details