Skip to content

Commit 113468e

Browse files
committed
.NET 2.1 // Unity 5.1 Docs (#4564)
<!-- start pr-codex --> ## PR-Codex overview The focus of this PR is to add new methods and documentation for interacting with smart wallets in the .NET SDK. ### Detailed summary - Added methods for getting personal wallet, all admins, active signers, transaction count, and transferring in .NET SDK - Updated documentation for In-App Wallet and Ecosystem Wallet login methods > The following files were skipped due to too many changes: `apps/portal/src/app/dotnet/wallets/providers/ecosystem-wallet/page.mdx`, `apps/portal/src/app/dotnet/sidebar.tsx`, `apps/portal/src/app/unity/v5/wallets/ecosystem-wallet/page.mdx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent a24de21 commit 113468e

File tree

11 files changed

+406
-108
lines changed

11 files changed

+406
-108
lines changed

apps/portal/src/app/dotnet/sidebar.tsx

Lines changed: 104 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -33,60 +33,102 @@ const walletActions: SidebarLink = (() => {
3333
name: "Wallet Actions",
3434
links: [
3535
{
36-
name: "GetAddress",
37-
href: `${parentSlug}/getaddress`,
36+
name: "IThirdwebWallet",
37+
isCollapsible: false,
38+
links: [
39+
{
40+
name: "GetAddress",
41+
href: `${parentSlug}/getaddress`,
42+
},
43+
{
44+
name: "IsConnected",
45+
href: `${parentSlug}/isconnected`,
46+
},
47+
{
48+
name: "Sign",
49+
href: `${parentSlug}/sign`,
50+
},
51+
{
52+
name: "SignTypedDataV4",
53+
href: `${parentSlug}/signtypeddatav4`,
54+
},
55+
{
56+
name: "Authenticate",
57+
href: `${parentSlug}/authenticate`,
58+
},
59+
{
60+
name: "Disconnect",
61+
href: `${parentSlug}/disconnect`,
62+
},
63+
{
64+
name: "SendTransaction",
65+
href: `${parentSlug}/sendtransaction`,
66+
},
67+
{
68+
name: "ExecuteTransaction",
69+
href: `${parentSlug}/executetransaction`,
70+
},
71+
],
3872
},
3973
{
40-
name: "IsConnected",
41-
href: `${parentSlug}/isconnected`,
74+
name: "InAppWallet & EcosystemWallet",
75+
isCollapsible: false,
76+
links: [
77+
{
78+
name: "GetEmail",
79+
href: `${parentSlug}/getemail`,
80+
},
81+
{
82+
name: "GetPhoneNumber",
83+
href: `${parentSlug}/getphonenumber`,
84+
},
85+
],
4286
},
4387
{
44-
name: "Sign",
45-
href: `${parentSlug}/sign`,
46-
},
47-
{
48-
name: "SignTypedDataV4",
49-
href: `${parentSlug}/signtypeddatav4`,
50-
},
51-
{
52-
name: "Authenticate",
53-
href: `${parentSlug}/authenticate`,
54-
},
55-
{
56-
name: "Disconnect",
57-
href: `${parentSlug}/disconnect`,
58-
},
59-
{
60-
name: "GetEmail",
61-
href: `${parentSlug}/getemail`,
62-
},
63-
{
64-
name: "GetPhoneNumber",
65-
href: `${parentSlug}/getphonenumber`,
66-
},
67-
{
68-
name: "IsDeployed",
69-
href: `${parentSlug}/isdeployed`,
70-
},
71-
{
72-
name: "SendTransaction",
73-
href: `${parentSlug}/sendtransaction`,
74-
},
75-
{
76-
name: "CreateSessionKey",
77-
href: `${parentSlug}/createsessionkey`,
78-
},
79-
{
80-
name: "AddAdmin",
81-
href: `${parentSlug}/addadmin`,
82-
},
83-
{
84-
name: "RemoveAdmin",
85-
href: `${parentSlug}/removeadmin`,
86-
},
87-
{
88-
name: "GetBalance",
89-
href: `${parentSlug}/getbalance`,
88+
name: "SmartWallet",
89+
isCollapsible: false,
90+
links: [
91+
{
92+
name: "IsDeployed",
93+
href: `${parentSlug}/isdeployed`,
94+
},
95+
{
96+
name: "CreateSessionKey",
97+
href: `${parentSlug}/createsessionkey`,
98+
},
99+
{
100+
name: "AddAdmin",
101+
href: `${parentSlug}/addadmin`,
102+
},
103+
{
104+
name: "RemoveAdmin",
105+
href: `${parentSlug}/removeadmin`,
106+
},
107+
{
108+
name: "GetAllActiveSigners",
109+
href: `${parentSlug}/getallactivesigners`,
110+
},
111+
{
112+
name: "GetAllAdmins",
113+
href: `${parentSlug}/getalladmins`,
114+
},
115+
{
116+
name: "GetPersonalWallet",
117+
href: `${parentSlug}/getpersonalwallet`,
118+
},
119+
{
120+
name: "GetBalance",
121+
href: `${parentSlug}/getbalance`,
122+
},
123+
{
124+
name: "GetTransactionCount",
125+
href: `${parentSlug}/gettransactioncount`,
126+
},
127+
{
128+
name: "Transfer",
129+
href: `${parentSlug}/transfer`,
130+
},
131+
],
90132
},
91133
],
92134
};
@@ -99,6 +141,10 @@ const contracts: SidebarLink = {
99141
name: "Create Contract",
100142
href: "/dotnet/contracts/create",
101143
},
144+
{
145+
name: "Contract Extensions",
146+
href: "/dotnet/contracts/extensions",
147+
},
102148
{
103149
name: "Read Contract",
104150
href: "/dotnet/contracts/read",
@@ -111,10 +157,6 @@ const contracts: SidebarLink = {
111157
name: "Prepare Transaction",
112158
href: "/dotnet/contracts/prepare",
113159
},
114-
{
115-
name: "Contract Extensions",
116-
href: "/dotnet/contracts/extensions",
117-
},
118160
],
119161
};
120162

@@ -233,10 +275,14 @@ export const sidebar: SideBar = {
233275
{
234276
name: "Blockchain API",
235277
isCollapsible: false,
236-
links: [contracts, transactions, {
237-
name: "Common Utils",
238-
href: "/dotnet/utils",
239-
}],
278+
links: [
279+
contracts,
280+
transactions,
281+
{
282+
name: "Common Utils",
283+
href: "/dotnet/utils",
284+
},
285+
],
240286
},
241287
{ separator: true },
242288
{
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { Details, createMetadata } from "@doc";
2+
3+
export const metadata = createMetadata({
4+
title: "SmartWallet.GetAllActiveSigners | Thirdweb .NET SDK",
5+
description: "Method to get all active signers for a smart wallet.",
6+
});
7+
8+
# SmartWallet.GetAllActiveSigners
9+
10+
This method retrieves a list of all active signers with their permissions for a smart wallet.
11+
12+
## Usage
13+
14+
```csharp
15+
// Get all active signers
16+
List<SignerPermissions> signers = await smartWallet.GetAllActiveSigners();
17+
```
18+
19+
<Details summary="Parameters">
20+
21+
### None
22+
23+
This method does not require any parameters.
24+
25+
</Details>
26+
27+
<Details summary="Return Value">
28+
29+
### List of `SignerPermissions`
30+
31+
The method returns a list of `SignerPermissions` objects, each representing a signer and their permissions.
32+
33+
Each `SignerPermissions` object contains the following properties:
34+
35+
- `Signer`: The address of the signer.
36+
- `ApprovedTargets`: A list of addresses that the signer is approved to interact with.
37+
- `NativeTokenLimitPerTransaction`: The maximum amount of native tokens the signer can transfer per transaction.
38+
- `StartTimestamp`: The start time for the signer's permissions.
39+
- `EndTimestamp`: The end time for the signer's permissions.
40+
41+
42+
</Details>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
import { Details, createMetadata } from "@doc";
3+
4+
export const metadata = createMetadata({
5+
title: "SmartWallet.GetAllAdmins | Thirdweb .NET SDK",
6+
description: "Method to get all admin addresses for a smart wallet.",
7+
});
8+
9+
# SmartWallet.GetAllAdmins
10+
11+
This method retrieves a list of all admin addresses for a smart wallet.
12+
13+
## Usage
14+
15+
```csharp
16+
// Get all admin addresses
17+
List<string> admins = await smartWallet.GetAllAdmins();
18+
```
19+
20+
<Details summary="Parameters">
21+
22+
### None
23+
24+
This method does not require any parameters.
25+
26+
</Details>
27+
28+
<Details summary="Return Value">
29+
30+
### List of `string`
31+
32+
The method returns a list of `string` objects, each representing an admin address.
33+
34+
</Details>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { Details, createMetadata } from "@doc";
2+
3+
export const metadata = createMetadata({
4+
title: "SmartWallet.GetPersonalWallet | thirdweb .NET SDK",
5+
description: "Get the current signer of the connected SmartWallet.",
6+
});
7+
8+
# GetPersonalWallet
9+
10+
This method retrieves the current signer of the connected SmartWallet.
11+
12+
## Usage
13+
14+
```csharp
15+
var signer = await smartWallet.GetPersonalWallet();
16+
```
17+
18+
<Details summary="Return Value">
19+
20+
### IThirdwebWallet
21+
22+
The method returns an instance of `IThirdwebWallet` representing the current signer of the connected SmartWallet.
23+
24+
</Details>

apps/portal/src/app/dotnet/wallets/actions/getsigneraddress/page.mdx

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { Details, createMetadata } from "@doc";
2+
3+
export const metadata = createMetadata({
4+
title: "IThirdwebWallet.GetTransactionCount | Thirdweb .NET SDK",
5+
description: "Extension method to get the transaction count (nonce) of a wallet on a specific chain.",
6+
});
7+
8+
# IThirdwebWallet.GetTransactionCount
9+
10+
This method retrieves the transaction count (i.e., nonce) for a specified wallet address on a given chain.
11+
12+
## Usage
13+
14+
```csharp
15+
BigInteger transactionCount = await wallet.GetTransactionCount(chainId, address);
16+
```
17+
18+
<Details summary="Parameters">
19+
20+
### wallet (required)
21+
22+
An instance of `IThirdwebWallet`. This represents the wallet for which you want to retrieve the transaction count.
23+
24+
### chainId (required)
25+
26+
The chain ID from which you want to retrieve the transaction count.
27+
28+
### address (required)
29+
30+
The wallet address for which you want to retrieve the transaction count.
31+
32+
### blocktag (optional)
33+
34+
The block tag to retrieve the transaction count at. Defaults to `"pending"`. You can set this to `"latest"` or `"earliest"`.
35+
36+
</Details>
37+
38+
<Details summary="Return Value">
39+
40+
### BigInteger
41+
42+
The method returns a `BigInteger` representing the transaction count (nonce) of the wallet.
43+
44+
</Details>

0 commit comments

Comments
 (0)