Skip to content

Commit 327d80c

Browse files
AyushBherwani1998yashovardhan
authored andcommitted
update the core-kit docs
1 parent 5ae23ab commit 327d80c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

docs/sdk/core-kit/mpc-core-kit-ios/usage.mdx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,44 @@ Returns the current factor key in usage within the state of the SDK.
238238
let factorKey = try mpcCoreKit.getCurrentFactorKey();
239239
```
240240

241+
## User & Wallet Account Functions
242+
243+
---
244+
245+
### getUserInfo()
246+
247+
The function returns the `NSDictonary` containing the user information. The information can be
248+
different depending on the login provider and method used.
249+
250+
#### Usage
251+
252+
```swift
253+
let userInfo: [String: Any] = try mpcCoreKit.getUserInfo()
254+
```
255+
256+
### getKeyDetails()
257+
258+
The function return `MpcKeyDetails` containing the information regarding threshold, public key, and
259+
user's shares. For more details, please check the table below.
260+
261+
#### MpcKeyDetails Class
262+
263+
| Name | Description |
264+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
265+
| `tssPubKey` | TSS Public Key for the user's account. |
266+
| `metadataPubKey` | Metadata Public Key for the user's account. |
267+
| `requiredFactors` | `requiredFactors` denotes the factors required for the SDK to be in write state. If the value is greater than 0, the SDK will be in read state. The variable can be used to check the required factors after using the login methods to verify if user has enough factors to access the account. |
268+
| `threshold` | `threshold` defines the total number factors required for write state. |
269+
| `shareDescriptions` | Returns the description for the shares. |
270+
| `totalShares` | Returns the total number shares for the account. |
271+
| `totalFactors` | Returns the total number of factors for the account. |
272+
273+
#### Usage
274+
275+
```swift
276+
let keyDetails: MpcKeyDetails = try await mpcCoreKit.getKeyDetails()
277+
```
278+
241279
## Mnemonic Conversations
242280

243281
---

0 commit comments

Comments
 (0)