Skip to content

Commit 16a7966

Browse files
committed
Fix for vale and style guide
1 parent bd7e42b commit 16a7966

15 files changed

Lines changed: 138 additions & 192 deletions

File tree

embedded-wallets/connect-blockchain/_ios-connect-blockchain/_evm-get-account.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Use the `EthereumAccount` class to retrieve the user's Ethereum address. This account can
22
also be used to sign transactions and messages.
33

4-
The package doesn't provides any direct way to consume the the private key and create an account.
4+
The package doesn't provide any direct way to consume the private key and create an account.
55
Hence, we'll create an extension for the `Web3AuthResponse` extending the
66
`EthereumSingleKeyStorageProtocol` to retrieve the private key and create an account.
77

embedded-wallets/connect-blockchain/solana/ios.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: 'Integrate Embedded Wallets with the Solana Blockchain in iOS | Emb
1010
import TabItem from '@theme/TabItem'
1111
import Tabs from '@theme/Tabs'
1212

13-
While using the Embedded Wallets iOS SDK (formerly Web3Auth), you can retrieve the Ed25519 private key upon successful authentication. This private key can be used to derive the user's public address and interact with the [Solana](https://solana.org/) chain. We've highlighted a few methods here to get you started quickly.
13+
While using the Embedded Wallets iOS SDK (formerly Web3Auth), you can retrieve the Ed25519 private key upon successful authentication. This private key can be used to derive the user's public address and interact with the [Solana](https://solana.org/) chain. We've highlighted a few methods here to get you started.
1414

1515
:::note
1616

@@ -72,14 +72,14 @@ The SDKs are now branded as MetaMask Embedded Wallet SDKs (formerly Web3Auth Plu
7272

7373
To interact with the Solana blockchain in iOS, you can use any Solana compatible SDK. Here, we're using [SolanaSwift](https://github.com/p2p-org/solana-swift) to demonstrate how to interact with Solana chain using Web3Auth.
7474

75-
<Tabs defaultValue = "spm"
75+
<Tabs defaultValue = "swift-package-manager"
7676
values={[
77-
{ label: "Swift Package Manager", value: "spm", },
78-
{ label: "CocoaPods", value: "cocoapods", },
77+
{ label: "Swift Package Manager", value: "swift-package-manager", },
78+
{ label: "CocoaPods", value: "cocoa-pods", },
7979
]}
8080
>
8181

82-
<TabItem value="spm">
82+
<TabItem value="swift-package-manager">
8383

8484
To install `SolanaSwift` through Swift Package Manager, follow the below steps:
8585

@@ -97,7 +97,7 @@ Once finished, Xcode will automatically begin resolving and downloading your dep
9797

9898
</TabItem>
9999

100-
<TabItem value="cocoapods">
100+
<TabItem value="cocoa-pods">
101101

102102
To install using CocoaPods, simply add the following line to your Podfile
103103

@@ -116,7 +116,7 @@ pod install
116116

117117
## Initialize
118118

119-
To Initialize the `JSONRPCAPIClient` we require a RPC URL. The `JSONRPCAPIClient` instance will provide a gateway & protocol to interact with Solana cluster while sending requests and receving response. For this example, we are using the RPC URL for Devnet-beta. To interact with Testnet or Mainnet, change the RPC URL.
119+
To Initialize the `JSONRPCAPIClient` we require a RPC URL. The `JSONRPCAPIClient` instance will provide a gateway & protocol to interact with Solana cluster while sending requests and receiving response. For this example, we are using the RPC URL for Devnet-beta. To interact with Testnet or Mainnet, change the RPC URL.
120120

121121
### Initializing the Solana SDK
122122

@@ -136,7 +136,7 @@ let solanaJSONRPCClient = JSONRPCAPIClient(endpoint: endpoint)
136136

137137
### Initializing the Web3Auth SDK
138138

139-
In the following code block, we'll initialize the Web3Auth SDK and check whether the user has any Web3Auth session persisted or not. If the user is already authenticated, you can route them directly to home view, otherwise you can route them to login view for authentication purpose. For checking, if user is already authenticated, we can check whether `web3Auth.web3AuthResponse` is `nil` or not.
139+
In the following code block, we'll initialize the Web3Auth SDK and check whether the user has any Web3Auth session persisted or not. If the user is already authenticated, you can route them directly to home view, otherwise you can route them to the sign-in view for authentication purpose. For checking, if user is already authenticated, we can check whether `web3Auth.web3AuthResponse` is `nil` or not.
140140

141141
By default, the session is persisted for 30 days. You can modify it using `sessionTime` parameter during initialization.
142142

@@ -168,7 +168,7 @@ let isUserAuthenticated = web3Auth.web3AuthResponse != nil
168168

169169
## Get account
170170

171-
We can use `getEd25519PrivateKey` method in Web3Auth to retrive the priavte key for the Solana ecosystem. In the following code block, we'll use the Ed25519 private key to retive user's public address by creating `KeyPair`. The `KeyPair` struct from `SolanaSwift` SDK once created can be used to sign the Solana transactions.
171+
We can use `getEd25519PrivateKey` method in Web3Auth to retrieve the private key for the Solana ecosystem. In the following code block, we'll use the Ed25519 private key to retrieve user's public address by creating `KeyPair`. The `KeyPair` struct from `SolanaSwift` SDK once created can be used to sign the Solana transactions.
172172

173173
```swift
174174
let ed25519PrivateKey = try web3Auth.getEd25519PrivateKey()
@@ -180,7 +180,7 @@ let userAccount = keyPair.publicKey.base58EncodedString
180180

181181
## Get User balance
182182

183-
Once we have retrived userAccount, we can use it to fetch user balance. We'll use `getBalance` method from `JSONRPCAPIClient` instance to interact with Solana cluster and fetch user balance. The response of `getBalance` is UInt64, we will need to divide it by 10^9, because Solana's token decimals is 9. To help us with the calculation, the SDK also provides a `convertToBalance` function.
183+
Once we have retrieved `userAccount`, we can use it to fetch user balance. We'll use `getBalance` method from `JSONRPCAPIClient` instance to interact with Solana cluster and fetch user balance. The response of `getBalance` is UInt64, we will need to divide it by 10^9, because Solana's token decimals is 9. To help us with the calculation, the SDK also provides a `convertToBalance` function.
184184

185185
```swift
186186
// focus-start
@@ -197,7 +197,7 @@ let userBalance = return balanceResponse.convertToBalance(decimals: 9)
197197

198198
## Sign a transaction
199199

200-
Let's now go through how can we sign the transaction. In the below codeblock, we'll create a new function `perpareTransaction` which can be used to retrive the Base58 signature as well as broadcast transaction to the cluster. We'll use `BlockchainClient.prepareSendingNativeSOL` to create the transaction to self transfer 0.01 Sol and sign it. You can also checkout `prepareSendingSPLTokens`, and `prepareTransaction` for other types of transaction.
200+
Let's now go through how can we sign the transaction. In the below code block, we'll create a new function `perpareTransaction` which can be used to retrieve the Base58 signature as well as broadcast transaction to the cluster. We'll use `BlockchainClient.prepareSendingNativeSOL` to create the transaction to self transfer 0.01 Sol and sign it. You can also checkout `prepareSendingSPLTokens`, and `prepareTransaction` for other types of transaction.
201201

202202
```swift
203203
let blockchainClient = BlockchainClient(apiClient: solanaJSONRPCClient)
@@ -213,7 +213,7 @@ let blockchainClient = BlockchainClient(apiClient: solanaJSONRPCClient)
213213
}
214214
```
215215

216-
Once we have created `perpareTransaction` function, we'll use it to prepare, sign the transaction, and retrive Base58 signature. You can use `findSignature` to retrive the signature for the respective signer.
216+
Once we have created `perpareTransaction` function, we'll use it to prepare, sign the transaction, and retrieve Base58 signature. You can use `findSignature` to retrieve the signature for the respective signer.
217217

218218
```swift
219219
do {

embedded-wallets/migration-guides/ios.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ let result = try await web3Auth.connectTo(
123123
try await web3Auth.showWalletUI()
124124
```
125125

126-
Remove any `setResultUrl` / `onOpenURL` handlers v12 uses `ASWebAuthenticationSession` internally.
126+
Remove any `setResultUrl` / `onOpenURL` handlers; v12 uses `ASWebAuthenticationSession` internally.
127127

128128
### Network and init params (from v7)
129129

@@ -234,10 +234,10 @@ If you're upgrading from an older SDK, adopt the v10 signatures shown above.
234234
| API | Added in | Purpose |
235235
| ------------------------ | -------- | ---------------------------------------------------- |
236236
| `enableMFA()` | v8 | Initiate MFA setup for logged-in users |
237-
| `launchWalletServices()` | v8 | Open the templated wallet UI |
237+
| `launchWalletServices()` | v8 | Open the built-in wallet UI |
238238
| `request()` | v8 | Sign transactions with confirmation screens |
239-
| SMS Passwordless login | v8.3 | `Web3AuthProvider.SMS_PASSWORDLESS` with `loginHint` |
240-
| Farcaster login | v8.3 | `.Farcaster` login provider |
239+
| SMS Passwordless sign-in | v8.3 | `Web3AuthProvider.SMS_PASSWORDLESS` with `loginHint` |
240+
| Farcaster sign-in | v8.3 | `.Farcaster` sign-in provider |
241241

242242
See [Wallet Services](/embedded-wallets/sdk/ios/usage/showWalletUI) and
243243
[MFA](/embedded-wallets/sdk/ios/advanced/mfa) for usage details.
@@ -248,7 +248,7 @@ See [Wallet Services](/embedded-wallets/sdk/ios/usage/showWalletUI) and
248248
| ----------------- | ------------------------- | ------------------------ | --------------------------- |
249249
| Network | `.mainnet`, `.cyan`, etc. | Sapphire supported | `.SAPPHIRE_MAINNET` |
250250
| Init params | `W3AInitParams` | `W3AInitParams` | `Web3AuthOptions` |
251-
| Login | N/A | `login(W3ALoginParams)` | `connectTo(LoginParams)` |
251+
| Sign-in | N/A | `login(W3ALoginParams)` | `connectTo(LoginParams)` |
252252
| `redirectUrl` | Optional | Mandatory (v8.4+) | Mandatory |
253253
| Whitelabel `name` | `name` | `appName` | `appName` |
254254
| Wallet UI | N/A | `launchWalletServices` | `showWalletUI()` |

embedded-wallets/sdk/ios/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To use Embedded Wallets for iOS, allowlist your `bundleId` in your Embedded Wall
6464

6565
## Initialize Embedded Wallets
6666

67-
The iOS SDK uses an async initializer.
67+
The iOS SDK uses an async initialization pattern.
6868
The constructor fetches project configuration and restores any active session automatically.
6969
The SDK does not require a separate `initialize()` call.
7070

embedded-wallets/sdk/ios/advanced/README.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The constructor takes a `Web3AuthOptions` struct as input.
5050
| `web3AuthNetwork` | Web3Auth Network: `.SAPPHIRE_MAINNET`, `.SAPPHIRE_DEVNET`, `.MAINNET`, `.CYAN`, `.AQUA`, or `.TESTNET`. Mandatory field of type `Web3AuthNetwork`. |
5151
| `redirectUrl` | URL that Web3Auth will redirect API responses upon successful authentication. It's a mandatory field of type `String`. |
5252
| `sessionTime?` | Session duration in seconds. Default is `86400 * 30` (30 days). Maximum is 30 days. |
53-
| `useSFAKey?` | Use SFA key to get single factor auth key. Default is `false`. Useful for wallet pregeneration and SFA mode. |
53+
| `useSFAKey?` | Use SFA key to get single factor auth key. Default is `false`. Useful for wallet pre-generation and SFA mode. |
5454
| `defaultChainId?` | Default chain ID to use. Default is `"0x1"` (Ethereum mainnet). |
5555
| `enableLogging?` | Enable SDK logging. Default is `false`. |
5656

@@ -62,7 +62,7 @@ The constructor takes a `Web3AuthOptions` struct as input.
6262
| `authConnectionConfig?` | Auth connection config for custom auth connections. Takes `[AuthConnectionConfig]` as a value. |
6363
| `mfaSettings?` | Configure MFA settings for authentication. Takes `MfaSettings` as a value. |
6464
| `chains?` | Custom chain configuration for blockchain networks. Takes `[Chains]` as a value. See [Chains configuration](#chains-configuration) below. |
65-
| `walletServicesConfig?` | Configuration for wallet services including whitelabel options. Takes `WalletServicesConfig` as a value. |
65+
| `walletServicesConfig?` | Configuration for Wallet Services including whitelabel options. Takes `WalletServicesConfig` as a value. |
6666

6767
</TabItem>
6868

@@ -97,7 +97,6 @@ Control how long users stay authenticated and how sessions persist. The session
9797

9898
- `sessionTime` - Session duration in seconds. Controls how long users remain authenticated
9999
before needing to sign in again.
100-
101100
- Minimum: 1 second (`1`).
102101
- Maximum: 30 days (`86400 * 30`).
103102
- Default: 30 days (`86400 * 30`).
@@ -116,7 +115,7 @@ web3Auth = try await Web3Auth(
116115
## Chains configuration
117116

118117
The `chains` parameter lets you specify custom blockchain networks for the SDK.
119-
When set, these chains are used by wallet services (`showWalletUI`, `request`) in addition to
118+
When set, these chains are used by Wallet Services (`showWalletUI`, `request`) in addition to
120119
any chains configured in the project dashboard.
121120

122121
### `Chains` fields
@@ -180,7 +179,7 @@ For full configuration options, see the [Smart Accounts](./smart-accounts.mdx) s
180179
| Parameter | Description |
181180
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
182181
| `confirmationStrategy?` | Controls how transaction confirmations are displayed. Accepts `ConfirmationStrategy`. Default is `.defaultStrategy`. |
183-
| `whiteLabel?` | Whitelabel settings specific to the wallet services UI. When set, merged with the project-level whitelabel config. Accepts `WhiteLabelData`. |
182+
| `whiteLabel?` | Whitelabel settings specific to the Wallet Services UI. When set, merged with the project-level whitelabel config. Accepts `WhiteLabelData`. |
184183

185184
```swift
186185
web3Auth = try await Web3Auth(
@@ -207,7 +206,6 @@ Customize the Embedded Wallets sign-in screens to match your dapp's design.
207206
For complete customization options, see
208207
[Whitelabeling and UI customization](./whitelabel.mdx).
209208

210-
211209
## Multi-Factor Authentication
212210

213211
Add security layers to protect user accounts with two-factor authentication.

0 commit comments

Comments
 (0)