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 for sdk config #86

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add groupings for preference object
  • Loading branch information
cb-jake committed Nov 14, 2024

Verified

This commit was signed with the committer’s verified signature.
ilikesymmetry Conner Swenberg
commit 0d9813377f35f5b5b5c13b2a60b43e5c4f11a9f3
Binary file modified bun.lockb
Binary file not shown.
42 changes: 27 additions & 15 deletions docs/pages/sdk/snippets/preference-parameters.mdx
Original file line number Diff line number Diff line change
@@ -13,31 +13,42 @@ type Attribution = {
}

type Preference = {
keysUrl?: string;
options?: 'all' | 'smartWalletOnly' | 'eoaOnly';
attribution?: Attribution;
cb-jake marked this conversation as resolved.
Show resolved Hide resolved
}
```
:::note
##### `preference.keysUrl` (optional)
- Type: `string`

#### `preference.options` (optional)
- Type: `'all' | 'smartWalletOnly' | 'eoaOnly'`
__Supported Values:__
- `https://keys.coinbase.com/connect`
- `https://keys-dev.coinbase.com/connect`
:::

:::note
##### `preference.options` (optional)
- Type: `all` | `smartWalletOnly` | `eoaOnly`

Determines what connection options users will see. Defaults to `all`.

Determines which connection options users will see. Defaults to `all`.
__`all`__
Users see Smart Wallet and mobile app connection options.

##### `all`
Users will see Smart Wallet and mobile app connection options.

:::info
If a user is using a browser with Coinbase Wallet Extension installed, they will be taken straight to the
> If a user is using a browser with Coinbase Wallet Extension installed, they will be taken straight to the
Coinbase Wallet Extension and not see any choice.
:::

##### `smartWalletOnly`
With this option, users will only see an option to create a Smart Wallet or sign into their Smart Wallet.
__`smartWalletOnly`__
Users only see an option to create a Smart Wallet or sign into their Smart Wallet.

##### `eoaOnly`
With this option, users will only see an option to connect with their EOA.
__`eoaOnly`__
Users only see an option to connect with their EOA.
:::

#### `preference.attribution` (optional)
:::note
##### `preference.attribution` (optional)
- Type: `Attribution`

This option only applies to Coinbase Smart Wallet. When a valid data suffix is supplied, it is appended to the initCode and executeBatch calldata.
@@ -52,12 +63,13 @@ type Attribution = {
}
```

##### `auto` (optional)
__`auto` (optional)__
- Type: `boolean`

If auto is true, the Smart Wallet will generate a 16 byte hex string from the apps origin.

##### `dataSuffix` (optional)
__`dataSuffix` (optional)__
- Type: `0x${string}`

Smart Wallet expects a 16 byte hex string. If the data suffix is not a 16 byte hex string, the Smart Wallet will ignore the property.
:::
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@
"prepare": "bun x simple-git-hooks"
},
"dependencies": {
"@coinbase/wallet-sdk": "latest",
"@types/react": "latest",
"@vercel/analytics": "^1.2.2",
"@coinbase/wallet-sdk": "latest",
"react": "latest",
"react-dom": "latest",
"typescript": "latest",
Loading