# SharingAPI

```swift
struct SharingAPI
```

Share link construction. Obtained from `FrakClient.sharing`.

**Conforms to** `Swift.Sendable`

Defined in: [Sources/FrakSDK/SharingAPI.swift:4](https://github.com/frak-id/wallet/blob/35995d05c807efe1e0d6319fdede3ad363124d1e/sdk/ios/Sources/FrakSDK/SharingAPI.swift#L4)

## Methods

### buildLink(_:)

```swift
func buildLink(_ request: SharingRequest) async throws -> String?
```

Builds a share link for `request`.

Returns nil only when there is nothing to link to: the request carried no link, none of its
products did, and neither the resolved config nor `FrakMetadata.homepageLink` supplies one.
That is answerable without a network round trip, so it is an absence rather than a failure.

- Throws: `FrakError` when a link could have been built but could not be: tracking is
  disabled, the device refused key material, or no merchant could be resolved.