Skip to content

SdkLike.federation ​

ts
federation(id: FederationId): FederationLike | undefined

Looks up an open federation by its id. Synchronous.

Parameters

NameTypeDescription
idFederationIdThe federation to look up.

Returns. FederationLike | undefined. The open federation handle, or undefined when none is open.

Throws. InvalidInput. InvalidInput means the id is a malformed string.

Example

example.ts
ts
import type { FederationId, SdkLike } from '@fedimint/react-native'

declare const sdk: SdkLike
declare const id: FederationId

const fed = sdk.federation(id) 
console.log(fed?.name())

Used in. Quickstart, step 02, Join, step 03, Errors, step 01