RNAlchemySigner
Defined in: account-kit/rn-signer/src/signer.ts:80
Factory function to create or retrieve a singleton instance of RNAlchemySigner.
Example
import { function RNAlchemySigner(params: RNAlchemySignerParams): RNAlchemySignerSingletonFactory function to create or retrieve a singleton instance of RNAlchemySigner.
RNAlchemySigner } from "@account-kit/react-native-signer";
const const signer: RNAlchemySignerSingletonsigner = function RNAlchemySigner(params: RNAlchemySignerParams): RNAlchemySignerSingletonFactory function to create or retrieve a singleton instance of RNAlchemySigner.
RNAlchemySigner({
client: {
connection: ({
apiKey: string;
rpcUrl?: undefined;
jwt?: undefined;
} | {
jwt: string;
rpcUrl?: undefined;
apiKey?: undefined;
} | {
rpcUrl: string;
apiKey?: undefined;
jwt?: undefined;
} | {
rpcUrl: string;
jwt: string;
apiKey?: undefined;
}) & {
chainAgnosticUrl?: string | undefined;
};
rootOrgId?: string | undefined;
oauthCallbackUrl?: string | undefined;
rpId?: string | undefined;
} | RNSignerClientclient: {
connection: ({
apiKey: string;
rpcUrl?: undefined;
jwt?: undefined;
} | {
jwt: string;
rpcUrl?: undefined;
apiKey?: undefined;
} | {
rpcUrl: string;
apiKey?: undefined;
jwt?: undefined;
} | {
rpcUrl: string;
jwt: string;
apiKey?: undefined;
}) & {
chainAgnosticUrl?: string | undefined;
}connection: {
apiKey: stringapiKey: "YOUR_API_KEY",
},
},
// optional config to override default session manager configs
sessionConfig?: {
sessionKey?: string | undefined;
expirationTimeMs?: number | undefined;
} | undefinedsessionConfig: {
expirationTimeMs?: number | undefinedexpirationTimeMs: 1000 * 60 * 60, // 60 minutes
},
});
Parameters
Returns
The singleton instance of RNAlchemySigner configured with the provided parameters.