Interface
RegistrationStrategy
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,
) => StrategyRegisters an account using the fee strategy
Type Declaration
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 | nullthe 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
- senderBlockchainRid: BufferId
( senderBlockchainRid: BufferId, feeAsset: Asset, authDescriptor: AnyAuthDescriptorRegistration, loginConfig?: LoginConfigOptions | null, ): Strategy
importStrategy
importStrategy: (
originBrid: BufferId,
mainAuthDescriptor: AnyAuthDescriptorRegistration,
loginConfig?: LoginConfigOptions | null,
options?: ImportStrategyOptions,
) => StrategyCreates an account using the import strategy
Type Declaration
Parameters
- originBrid: BufferId
the blockchain rid where the original account exists
- mainAuthDescriptor: AnyAuthDescriptorRegistration
The main auth descriptor of the account to import
OptionalloginConfig: LoginConfigOptions | nullthe config if the account should be created with an active session, otherwise
nullOptionaloptions: ImportStrategyOptionsthe options for the import strategy
Returns Strategy
Strategy instance that can be used to retrieve registration details
- originBrid: BufferId
( originBrid: BufferId, mainAuthDescriptor: AnyAuthDescriptorRegistration, loginConfig?: LoginConfigOptions | null, options?: ImportStrategyOptions, ): Strategy
open
open: (
authDescriptor: AnyAuthDescriptorRegistration,
loginConfig?: LoginConfigOptions | null,
) => StrategyRegisters an account using the open strategy
Type Declaration
Parameters
- authDescriptor: AnyAuthDescriptorRegistration
the auth descriptor of the new account
OptionalloginConfig: LoginConfigOptions | nullthe 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
- authDescriptor: AnyAuthDescriptorRegistration
( authDescriptor: AnyAuthDescriptorRegistration, loginConfig?: LoginConfigOptions | null, ): Strategy
subscription
subscription: (
senderBlockchainRid: BufferId,
subscriptionAsset: Asset,
authDescriptor: AnyAuthDescriptorRegistration,
loginConfig?: LoginConfigOptions | null,
) => StrategyRegisters an account using the subscription strategy
Type Declaration
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 | nullthe 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
- senderBlockchainRid: BufferId
( senderBlockchainRid: BufferId, subscriptionAsset: Asset, authDescriptor: AnyAuthDescriptorRegistration, loginConfig?: LoginConfigOptions | null, ): Strategy
transferFee
transferFee: (
feeAsset: Asset,
authDescriptor: AnyAuthDescriptorRegistration,
loginConfig?: LoginConfigOptions | null,
) => StrategyCreates an account that previously had assets transferred to it, and paying a fee
Type Declaration
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
OptionalloginConfig: LoginConfigOptions | nullthe 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
- feeAsset: Asset
( feeAsset: Asset, authDescriptor: AnyAuthDescriptorRegistration, loginConfig?: LoginConfigOptions | null, ): Strategy
transferOpen
transferOpen: (
authDescriptor: AnyAuthDescriptorRegistration,
loginConfig?: LoginConfigOptions | null,
) => StrategyCreates an account that previously had assets transferred to it, without paying a fee
Type Declaration
Parameters
- authDescriptor: AnyAuthDescriptorRegistration
the auth descriptor of the new account
OptionalloginConfig: LoginConfigOptions | nullthe 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
- authDescriptor: AnyAuthDescriptorRegistration
( authDescriptor: AnyAuthDescriptorRegistration, loginConfig?: LoginConfigOptions | null, ): Strategy
transferSubscription
transferSubscription: (
subscriptionAsset: Asset,
authDescriptor: AnyAuthDescriptorRegistration,
loginConfig?: LoginConfigOptions | null,
) => StrategyCreates an account that previously had assets transferred to it, paying a subscription fee
Type Declaration
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
OptionalloginConfig: LoginConfigOptions | nullthe 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
- subscriptionAsset: Asset
( subscriptionAsset: Asset, authDescriptor: AnyAuthDescriptorRegistration, loginConfig?: LoginConfigOptions | null, ): Strategy