Skip to content

Commit d702d61

Browse files
Merge pull request #3 from tkey/alpha
ci update
2 parents 6bc12aa + 9f2930b commit d702d61

File tree

2 files changed

+37
-23
lines changed

2 files changed

+37
-23
lines changed

.github/workflows/pr.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Enforce PR Source Branch
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
jobs:
10+
enforce-branch:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check PR source branch
15+
run: |
16+
if ["${{ github.event.pull_request.base.ref }}" == "main" && "${{ github.event.pull_request.head.ref }}" != "alpha" ]; then
17+
echo "Only pull requests from the alpha branch are allowed to main."
18+
exit 1
19+
fi

README.md

+18-23
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
1-
# tkey iOS SDK
1+
# tkey iOS SDK - TSS
22

3-
The tKey SDK manages private keys by generating shares of it using Shamir Secret Sharing. Multi-party computation of shares is also planned for this SDK and is currently in an advanced stage of development but not quite ready to be merged into the main codebase yet.
3+
Web3Auth uses tKey MPC to manage user wallets in a distributed fashion, leveraging various factors or shares managed by users, including their devices, private inputs, backup locations, and cloud service providers. As long as a user can access 2 out of n (2/n) of these shares, they can access their key.
44

5-
The companion example application is [here](https://github.com/torusresearch/tkey-rust-ios-example/).
5+
The companion example application is [here](https://github.com/torusresearch/tkey-rust-ios-example/tree/alpha).
66

77
If you are instead seeking the Android implementation, please see [here](https://github.com/torusresearch/tkey-rust-android).
88

9-
## Including this package
9+
### Add the [MPC tKey iOS SDK](https://github.com/tkey/tkey-ios/tree/alpha)
1010

11-
1. Open Xcode project > select File > Swift Packages > Add Package Dependency
11+
1. In Xcode, with your app project open, navigate to **File > Add Packages**.
1212

13-
2. Enter the url https://github.com/torusresearch/tkey-rust-ios
13+
1. When prompted, add the tKey iOS SDK repository:
1414

15+
```sh
16+
https://github.com/tkey/tkey-ios
17+
```
1518

16-
## Integration with CustomAuth
19+
From the `Dependency Rule` dropdown, select `Branch` and type `alpha` as the branch.
1720

18-
This standalone package can be used with CustomAuth. Please refer to the example application for a more comprehensive overview of the code.
21+
1. When finished, Xcode will automatically begin resolving and downloading your dependencies in the background.
1922

20-
The integration process is simple:
21-
1. Log in with CustomAuth, for detailed documentation on how to do this please refer to the documentation [here](https://github.com/torusresearch/customauth-swift-sdk).
23+
## Documentation
2224

23-
2. Use the `userData["privateKey"]` field result as the postbox key when setting up the ServiceProvider.
25+
Follow the full documentation [here](https://web3auth.io/docs/sdk/core-kit/mpc-tkey-ios).
2426

25-
3. Continue initialization as normal.
26-
27-
4. Remember to save the device share or the account will need to be reset. For existing accounts, shares will need to be imported, either by making use of a security share or via manual entry depending on how the ThresholdKey was initially setup.
28-
29-
## SDK Design Overview
27+
## SDK Overview
3028

3129
The design of the SDK is relatively straight forward.
3230

@@ -44,11 +42,9 @@ Currently only the Secp256k1 curve is supported.
4442

4543
Please note that all code examples are minimilistic in nature, this is intentionally done for clarity, since most functions can throw.
4644

47-
## SDK Overview
48-
4945
### ThresholdKey
5046

51-
The instance of tkey, this can be considered the most important object in the SDK.
47+
The instance of tkey, this can be considered the most important object in the SDK.
5248

5349
##### Creation
5450

@@ -79,7 +75,7 @@ Additionally the following optional parameters can be supplied to this call
7975
| Parameter | Type | Description |
8076
| --------- | ---- | ----------- |
8177
| import_share | String | Initialise tkey with an existing share. This allows you to directly initialise tKey without using the service provider login. |
82-
| input | ShareStore | Import an existing ShareStore into tkey. |
78+
| input | ShareStore | Import an existing ShareStore into tkey. |
8379

8480
#### Reconstructing the Private Key
8581

@@ -101,10 +97,9 @@ This returns a KeyDetails object.
10197

10298
Whenever a method is called which affects the state of the ThresholdKey, this method will need to be called again if updated details of the ThresholdKey is needed.
10399

104-
105100
#### Generating a new Share
106101

107-
Shares are generated on the same threshold (e.g, 2/3 -> 2/4). A GenerateShareStoreResult object is returned by the function.
102+
Shares are generated on the same threshold (e.g, 2/3 -> 2/4). A GenerateShareStoreResult object is returned by the function.
108103

109104
```swift
110105
let newShare = try! await threshold_key.generate_new_share()
@@ -128,7 +123,7 @@ This module provides an interface for setting, getting and managing private keys
128123

129124
#### SecurityQuestionModule
130125

131-
This module allows the creation of a security share with a password. This is particularly useful to recover a ThresholdKey
126+
This module allows the creation of a security share with a password. This is particularly useful to recover a ThresholdKey
132127

133128
#### SeedPhraseModule
134129

0 commit comments

Comments
 (0)