Skip to content

Commit aca1f18

Browse files
Merge branch 'master' into mpc-core-kit-3.4.0
2 parents d7aec9d + 2fdda50 commit aca1f18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+671
-136
lines changed

docs/connect-blockchain/solana/android.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ checking, if user is already authenticated, we can check whether private key is
8080
By default, the session is persisted for 1 day. You can modify it using `sessionTime` parameter
8181
during initialization.
8282

83-
> Note: Note: The session can be persisted only for 7 days max
83+
> Note: Note: The session can be persisted only for 30 days max
8484
8585
```kotlin
8686
import com.web3auth.core.Web3Auth

docs/connect-blockchain/solana/flutter.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ to `HomeScreen`, otherwise we can route them to `LoginScreen`.
7272
By default, the session is persisted for 1 day. You can modify it using `sessionTime` parameter
7373
during initialization.
7474

75-
> Note: The session can be persisted only for 7 days max.
75+
> Note: The session can be persisted only for 30 days max.
7676
7777
```dart
7878
// Additional imports

docs/connect-blockchain/solana/ios.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ if user is already authenticated, we can check whether `Web3Auth.state` is `nil`
9797
By default, the session is persisted for 1 day. You can modify it using `sessionTime` parameter
9898
during initialization.
9999

100-
> Note: Note: The session can be persisted only for 7 days max
100+
> Note: Note: The session can be persisted only for 30 days max
101101
102102
```swift
103103
import Web3Auth

docs/features/session-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ iOS Keychain Services.
6464
## Customizing Session Duration
6565

6666
Developers have the flexibility to define the duration of the session through the `sessionTime`
67-
parameter, setting it anywhere from 1 day to a maximum of 7 days. This allows for a balance between
67+
parameter, setting it anywhere from 1 day to a maximum of 30 days. This allows for a balance between
6868
convenience for the user and security considerations for the application. It is recommended to
6969
initiate the Web3Auth SDKs at the start of your application (e.g., in the constructor) to ensure
7070
that users benefit from an uninterrupted experience, with their login state ready and waiting as

docs/features/wallet-ui.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ you can use this feature for projects on `sapphire_devnet` for free.
1717

1818
:::
1919

20+
:::note
21+
22+
From the **v9.5.0 release**, the Embedded Wallet UI supports both Externally Owned Accounts (EOA)
23+
and Account Abstraction (AA) accounts in the Wallet Services.
24+
25+
:::
26+
2027
## Enhancing User Experience with Embedded Wallet UI
2128

2229
Web3Auth's Embedded Wallet UI service is engineered to blend effortlessly into your application,
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: PnP Flutter SDK - v5 to v6
3+
description: "PnP Flutter SDK - v5 to v6 | Documentation - Web3Auth"
4+
sidebar_label: v5 to v6
5+
---
6+
7+
This migration guide provides steps for upgrading from version v5 to v6 of the PnP Flutter SDK. The
8+
guide outlines significant changes and enhancements, including the support of Web3Auth OpenLogin
9+
version v9, and Wallet Services v3.
10+
11+
## Breaking Changes
12+
13+
### `getSignResponse` is now removed.
14+
15+
In v6, we try to improve the developer experience by removing the `getSignResponse` method and
16+
returning the result in the `request` method itself.
17+
18+
Previously, after calling the `request` method, developers had to use the `getSignResponse` method
19+
to retrieve the `SignResponse`. In the latest version v6, the `request` method will return the
20+
`SignResponse` directly.
21+
22+
```dart
23+
try {
24+
List<dynamic> params = [];
25+
// Message to be signed
26+
params.add("Hello, Web3Auth from Flutter!");
27+
// User's EOA address
28+
params.add("<User Address in Hex>");
29+
30+
// add-next-line
31+
final response = await Web3AuthFlutter.request(
32+
ChainConfig(
33+
chainId: "0x1",
34+
rpcTarget: "https://mainnet.infura.io/v3/$key",
35+
),
36+
"personal_sign",
37+
params,
38+
);
39+
40+
// remove-next-line
41+
final response = await Web3AuthFlutter.getSignResponse();
42+
43+
log(response.toString());
44+
} on UserCancelledException {
45+
log("User cancelled.");
46+
} catch(e) {
47+
log("Unknown exception occurred");
48+
}
49+
```
50+
51+
## Minimum Android SDK Version
52+
53+
The minimum Android SDK version for the PnP Flutter SDK is now 26. Please update your app level
54+
gradle file to set the minimum SDK version to 26.
55+
56+
```gradle
57+
defaultConfig {
58+
// ...
59+
// add-next-line
60+
minSdkVersion 26 //flutter.minSdkVersion
61+
// remove-next-line
62+
minSdkVersion 24 //flutter.minSdkVersion
63+
// ...
64+
}
65+
```
66+
67+
## Enhancements
68+
69+
In the latest version v6, we have added support for the Web3Auth Auth Service version v9, and Wallet
70+
Services v3. In Wallet Services v3, the prebuilt wallet UI now supports the swap functionality
71+
allowing users to swap to their favorite token from the app itself.

docs/migration-guides/modal-v8-to-v9.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,31 @@ const loginAdapter = new OpenloginAdapter(OpenloginAdapterOptions);
3434
const loginAdapter = new AuthAdapter(AuthAdapterOptions);
3535
```
3636

37+
### Private Key Provider in now needed in the Web3Auth Constructor
38+
39+
Although not marked as a mandatory param in the SDK, you need to pass the privateKeyProvider in the
40+
Web3Auth Constructor to avoid unexpected issues.
41+
42+
```tsx
43+
// add-start
44+
const privateKeyProvider = new EthereumPrivateKeyProvider({
45+
config: {
46+
chainConfig,
47+
},
48+
});
49+
// add-end
50+
51+
const web3AuthOptions: Web3AuthOptions = {
52+
chainConfig,
53+
clientId,
54+
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
55+
// add-next-line
56+
privateKeyProvider,
57+
};
58+
59+
const web3auth = new Web3Auth(web3AuthOptions);
60+
```
61+
3762
### Default EVM Adapter Enhancements
3863

3964
In v9, the functionality of `getDefaultExternalAdapters` has changed. Previously, it displayed

docs/migration-guides/no-modal-v8-to-v9.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,31 @@ const loginAdapter = new OpenloginAdapter(OpenloginAdapterOptions);
3434
const loginAdapter = new AuthAdapter(AuthAdapterOptions);
3535
```
3636

37+
### Private Key Provider in now needed in the Web3Auth Constructor
38+
39+
Although not marked as a mandatory param in the SDK, you need to pass the privateKeyProvider in the
40+
Web3Auth Constructor to avoid unexpected issues.
41+
42+
```tsx
43+
// add-start
44+
const privateKeyProvider = new EthereumPrivateKeyProvider({
45+
config: {
46+
chainConfig,
47+
},
48+
});
49+
// add-end
50+
51+
const web3AuthOptions: Web3AuthOptions = {
52+
chainConfig,
53+
clientId,
54+
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
55+
// add-next-line
56+
privateKeyProvider,
57+
};
58+
59+
const web3auth = new Web3AuthNoModal(web3AuthOptions);
60+
```
61+
3762
### Default EVM Adapter Enhancements
3863

3964
In v9, the functionality of `getDefaultExternalAdapters` has changed. Previously, it displayed

docs/migration-guides/sfa-android-v0.4.0-to-v1.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ In v8, we try to improve the developer experience by renaming the parameter and
2424
- `SingleFactorAuthArgs` is now renamed to `SFAParams`. It has been renamed to align with naming
2525
conventions across Web3Auth SDKs.
2626
- `sessionTime` was added to specify session duration in seconds. By default, the value is set to
27-
86400 seconds (1 day), with a maximum session duration of up to 7 days.
27+
86400 seconds (1 day), with a maximum session duration of up to 30 days.
2828
- `serverTimeOffset` was added to specify a custom server time offset. The default value is 0
2929

3030
```kotlin

docs/migration-guides/sfa-flutter-v4-to-v5.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ parameter for session management.
1818
- `clientid` parameter, used to define Web3Auth's Client ID, has been renamed to `clientId` to align
1919
with naming conventions.
2020
- `sessionTime` was added to specify session duration in seconds. By default, the value is set to
21-
86400 seconds (1 day), with a maximum session duration of up to 7 days
21+
86400 seconds (1 day), with a maximum session duration of up to 30 days
2222

2323
```dart
2424
final singleFactAuthFlutter = SingleFactAuthFlutter();

0 commit comments

Comments
 (0)