Skip to main content

Function: MoneriumProvider()

MoneriumProvider(params: { children: ReactNode; clientId: string; debug: boolean; environment: "production" | "sandbox"; onRefreshTokenUpdate: (token: string) => void; redirectUri: string; redirectUrl: string; refreshToken: string; }): Element

Wrap your application with the Monerium provider.

Parameters

ParameterTypeDescription
params{ children: ReactNode; clientId: string; debug: boolean; environment: "production" | "sandbox"; onRefreshTokenUpdate: (token: string) => void; redirectUri: string; redirectUrl: string; refreshToken: string; }
params.childrenReactNodeRest of the application.
params.clientIdstringMonerium auth flow client id.
params.debug?booleanEnable debug mode.
params.environment?"production" | "sandbox"Monerium environment.
params.onRefreshTokenUpdate?(token: string) => voidCallback that is called when the refresh token is updated. Store it securely.
params.redirectUristringMonerium auth flow redirect url.
params.redirectUrl?stringDeprecated use redirectUri
params.refreshToken?stringProvide the securely stored refresh token to reconnect.

Returns

Element

Deprecated

This provider is obsolete and incompatible with @monerium/sdk v4. It is recommended to manage your own server-side token state and integrate with the new functional API directly.