Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs: fix errors/typos #111

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
6 changes: 3 additions & 3 deletions api-reference/auth/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ description: 'Find Frequently Asked Questions about Particle Auth.'
<Accordion title="How can I ensure the signature result is consistent each time?" icon="signature">
**Answer:** Due to the unique characteristics of Multi-Party Computation (MPC), the signature result for the same message can vary each time, unlike traditional private key wallets such as MetaMask.

To address scenarios requiring a consistent signature result, we provide the `uniq` parameter. This parameter ensures that the signature remains consistent every time you sign the same message.
To address scenarios requiring a consistent signature result, we provide the `unique` parameter. This parameter ensures that the signature remains consistent every time you sign the same message.

```tsx App.tsx
// Sign a message with the uniq flag
// Sign a message with the unique flag
const result = await signMessage(message, true);
```
</Accordion>
Expand Down Expand Up @@ -195,4 +195,4 @@ description: 'Find Frequently Asked Questions about Particle Auth.'
**Still need help?**

[Open a ticket](https://t.me/particle_developer_bot) with Particle's Developer Relations team through the dedicated Telegram support bot.
</Note>
</Note>
12 changes: 6 additions & 6 deletions api-reference/auth/mobile-sdks/flutter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ flutter pub add particle_auth_core
- compileSdkVersion, targetSdkVersion **34** or higher.
- JavaVersion **17**.
- [Jetpack (AndroidX)](https://developer.android.com/jetpack/androidx/migrate?authuser=0).
- Android Gradle Plugin Version : 8.5.1 or higher.
- Gradle Version : 8.9 or higher.
- Android Gradle Plugin Version: 8.5.1 or higher.
- Gradle Version: 8.9 or higher.

If you're building an Android application with Flutter, follow the steps below to configure Particle Auth. To begin, you'll need to go ahead and open your `build.gradle` file, often found at the following file path: `${project name}/android/app/build.gradle`

Expand Down Expand Up @@ -271,7 +271,7 @@ If you need the same message to return a unique signature each time, use the `Ev

| Field | Type | Description |
| --------- | -------- | --------------------------------------------------------------------------------- |
| `message` | `String` | On Evm requires a hexadeciaml string, on Solana, requires a UTF-8/readable string |
| `message` | `String` | On Evm requires a hexadecimal string, on Solana, requires a UTF-8/readable string |

```dart
final messageHex = "0x${StringUtils.toHexString("Hello Particle")}";
Expand Down Expand Up @@ -316,7 +316,7 @@ This will propose a signature (on both EVM and Solana) and then immediately push

| Field | Type | Description |
| ------------- | -------- | ------------------------------------------------------------------------- |
| `transaction` | `String` | On Evm requires a hexadeciaml string, on Solana, requires a base58 string |
| `transaction` | `String` | On Evm requires a hexadecimal string, on Solana, requires a base58 string |

```dart
final signature = await Evm.sendTransaction(transaction);
Expand Down Expand Up @@ -540,7 +540,7 @@ final result = await EvmService.readContract(publicAddress, contractAddress, met
| `from` | `String` | The user's public address. |
| `data` | `String` | The transaction's data. |
| `value` | `BigInt` | The native amount. |
| `to` | `String` | If you send a erc20, erc721, erc1155 or interact with a contract, this is the contract address, if you send native, this is receiver address. |
| `to` | `String` | If you send an erc20, erc721, erc1155 or interact with a contract, this is the contract address, if you send native, this is receiver address. |
| `gasFeeLevel` | `GasFeeLevel` | (Optional) the gas fee level, `high`, `medium` or `low`, default is `high`. |

```dart
Expand Down Expand Up @@ -693,7 +693,7 @@ final result = await SolanaService.getPrice(tokenAddresses, currencies);

### Get Transactions by address

To retrieve transactions executed by a specific a address, call `SolanaService.getTransactionsByAddress`.
To retrieve transactions executed by a specific address, call `SolanaService.getTransactionsByAddress`.

```dart
final result = await SolanaService.getTransactionsByAddress(address);
Expand Down
14 changes: 7 additions & 7 deletions api-reference/auth/mobile-sdks/unity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Your Unity project needs to meet several requirements to avoid any compatibility
- compileSdkVersion, targetSdkVersion **34** or higher.
- JavaVersion **17**.
- [Jetpack (AndroidX)](https://developer.android.com/jetpack/androidx/migrate?authuser=0).
- Android Gradle Plugin Version : 8.5.1 or higher.
- Gradle Version : 8.9 or higher.
- Android Gradle Plugin Version: 8.5.1 or higher.
- Gradle Version: 8.9 or higher.

### Setting up the Particle dashboard

Expand Down Expand Up @@ -81,7 +81,7 @@ You'll also need to configure your Podfile if you haven't already. If you don't
<p>Copy our example Podfile</p>
<p></p>
<p>
You can copy our examole
You can copy our example
[Podfile](https://github.com/Particle-Network/particle-unity/blob/main/ios-build/Podfile),
it will always use the latest version.
</p>
Expand Down Expand Up @@ -131,7 +131,7 @@ installer.pods_project.targets.each do |target|
end
```

Also you can copy the example [Podfile](https://github.com/Particle-Network/particle-unity/blob/main/ios-build/Podfile) .
Also, you can copy the example [Podfile](https://github.com/Particle-Network/particle-unity/blob/main/ios-build/Podfile) .

With your Podfile set, you'll need to run `pod install` and open your `.xcworkspace` file, such as is shown below:

Expand Down Expand Up @@ -513,12 +513,12 @@ var result = (string)JObject.Parse(rpcResult)["result"];
| `gasFeeLevel` | `GasFeeLevel` | (Optional) the gas fee level, `High`, `Medium` or `Low`, default is `High`. |

```csharp
var transaction = await EvmService.CreateTransaction(from, data, value, reciver);
var transaction = await EvmService.CreateTransaction(from, data, value, receiver);
```

### Estimate Gas

Given a standard transaction structure (detached set of values, as shown below), gas estimations can be ran to simulate and retrieve the volume of gas to be consumed by a specified transaction (wrapper for `eth_estimateGas`). This is done through `EvmService.EstimateGas`.
Given a standard transaction structure (detached set of values, as shown below), gas estimations can be run to simulate and retrieve the volume of gas to be consumed by a specified transaction (wrapper for `eth_estimateGas`). This is done through `EvmService.EstimateGas`.

```csharp
final result = await EvmService.EstimateGas(from, to, value, data);
Expand Down Expand Up @@ -585,7 +585,7 @@ await SolanaService.GetTokensAndNFTs(publicAddress, true);

`SolanaService.SerializeSOLTransaction` facilitates the construction of a SOL transaction object.

These transactions, once constructed , can be passed for in-UI proposal with `ParticleAuthCore.Instance.SolanaSendTransaction`.
These transactions, once constructed, can be passed for in-UI proposal with `ParticleAuthCore.Instance.SolanaSendTransaction`.

```csharp
string receiver = "";
Expand Down
2 changes: 1 addition & 1 deletion api-reference/btc/desktop/web.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ Below is the full list of functions derived from `useETHProvider`:
- `switchChain`, for forcibly changing the EVM chain used through the smart account. This takes a specific `chainId` (should be one of the aforementioned supported chains).
- `provider`, the EIP-1193 provider object associated with the smart account.
- `getFeeQuotes`, for retrieving fee quotes (a collection of UserOperation structures based upon different fee payment mechanisms); this is equivalent to [getFeeQuotes](/api-reference/aa/rpc/getfeequotes).
- `buildUserOp`, to build a execution-ready UserOperation with a standard transaction object.
- `buildUserOp`, to build an execution-ready UserOperation with a standard transaction object.
- `sendUserOp`, for sending UserOperations (either objects derived from `getFeeQuotes`/`buildUserOp`, or standard transaction objects).
- `publicClient`, the [viem](https://github.com/wevm/viem) `PublicClient` object for making standard JSON-RPC requests.

Expand Down
8 changes: 4 additions & 4 deletions api-reference/connect/mobile/unity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Your **Unity** project must meet several requirements to avoid compatibility iss
- compileSdkVersion, targetSdkVersion **34** or higher.
- JavaVersion **17**.
- [Jetpack (AndroidX)](https://developer.android.com/jetpack/androidx/migrate?authuser=0).
- Android Gradle Plugin Version : 8.5.1 or higher.
- Gradle Version : 8.9 or higher.
- Android Gradle Plugin Version: 8.5.1 or higher.
- Gradle Version: 8.9 or higher.

### Setting up the Particle dashboard

Expand Down Expand Up @@ -193,9 +193,9 @@ An example of the above process can be found below.
| Field | Type | Description |
| ----------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `chainInfo` | `ChainInfo` | The primary chain to be used within your application. This should be indicated by an overall blockchain, followed by a specific network. Within this example, it's `.Ethereum`(alternatively it could be `.EthereumSepolia`, and so on.) |
| `dAppData` | `DAppMetadata` | Metadata that describes your application and should be provided as an instance of `DAppMetadata` with the following parameters: `walletConnectProjectId`, the WalletConnect project ID retrieved from the [WalletConnect dashboard](https://cloud.walletconnect.com), `name`, the name of your project. `icon`, a URL linking to the icon of your project; this should be 512x512, ideally. `url`, the URL of your project's website. `description`, the description of your project, `redirect`, optional, a redirect universal link to you project, `verifyUrl`, optional. |
| `dAppData` | `DAppMetadata` | Metadata that describes your application and should be provided as an instance of `DAppMetadata` with the following parameters: `walletConnectProjectId`, the WalletConnect project ID retrieved from the [WalletConnect dashboard](https://cloud.walletconnect.com), `name`, the name of your project. `icon`, a URL linking to the icon of your project; this should be 512x512, ideally. `url`, the URL of your project's website. `description`, the description of your project, `redirect`, optional, a redirect universal link to your project, `verifyUrl`, optional. |
| `rpcUrl` | `RpcUrl?` | Customize the RPC URL. |
| `env` | `Env` | The specific environmennt to be used. This can be either `.DEV`, `.STAGING`, `.PRODUCTION`, this should be set to `.PRODUCTION` when released. |
| `env` | `Env` | The specific environment to be used. This can be either `.DEV`, `.STAGING`, `.PRODUCTION`, this should be set to `.PRODUCTION` when released. |

```csharp
var metadata = new DAppMetaData(TestConfig.walletConnectProjectId,"Particle Connect",
Expand Down
12 changes: 6 additions & 6 deletions api-reference/wallet/mobile/ios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ let result = try await ParticleWalletAPI.getEvmService().getTransactionsFromDB(b
| Field | Type | Description |
| ---------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `from` | `String` | The user's public address, which to sign the transaction. |
| `to` | `String?` | If you send a erc20, erc721, erc1155 or interact with a contract, this is the contract address, if you send native, this is receiver address, if you want to deploy a contract, this to should be `nil` |
| `to` | `String?` | If you send an erc20, erc721, erc1155 or interact with a contract, this is the contract address, if you send native, this is receiver address, if you want to deploy a contract, this to should be `nil` |
| `value` | `String?` | Native value, default is nil, expressed as a hex string. |
| `data` | `String` | If you send a erc20, erc721, erc1155 or interact with a contract, this is the data field, if you send native, this should be `0x`, default value is `0x` |
| `data` | `String` | If you send an erc20, erc721, erc1155 or interact with a contract, this is the data field, if you send native, this should be `0x`, default value is `0x` |
| `contractParams` | `ContractParams?` | You can use this object to describe a write contract function |
| `type` | `String` | Default is 0x2. Support EIP1559, you can ignore this parameter |
| `gasFeeLevel` | `gasFeeLevel` | The specific gas fee level to be used. This can be either `.low`, `.medium`, `.high`, default is `.medium` |
Expand Down Expand Up @@ -259,7 +259,7 @@ Specifically, four key parameters are available within `ParticleWalletAPI.getEvm
| `params` | `[Encodable]` | The parameters of the method, each parameter requires a hexadecimal string. |
| `abiJsonString` | `String?` | (Optional) The ABI JSON string for the method. |

Here is a abiJsonString example.
Here is an abiJsonString example.

```swift
let abiJsonString = "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"quantity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
Expand Down Expand Up @@ -526,7 +526,7 @@ The specific parameters that can be used within `PNRouter.navigatorBuy` are list
| `fixFiatAmt` | `bool` | (Optional) Lock selection of fiat amount in the buy menu, default is false. |
| `fixCryptoCoin` | `bool` | (Optional) Lock selection of crypto coin in the buy menu, default is false. |
| `theme` | `String` | (Optional) The buy page theme, `dark` or `light`, default is current appearance. |
| `language` | `Language?` | (Optional) The buy page lanuage, default is current language. |
| `language` | `Language?` | (Optional) The buy page language, default is current language. |
| `modalStyle` | `IOSModalPresentStyle?` | (Optional) Control iOS presentation style, default is `pageSheet`. |

```swift
Expand Down Expand Up @@ -571,8 +571,8 @@ if let url = URL(string: "app.uniswap.org") {
}
```

### (Optional) Custom WalletConnect Projcet ID
### (Optional) Custom WalletConnect Project ID

```swift
ParticleWalletConnect.setWalletConnectV2ProjectId("WalletConnect project ID")
```
```
Loading