Skip to content

Commit 46197c5

Browse files
committed
Add limitToTokenAddresses
1 parent c34d52a commit 46197c5

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,17 @@ A representation of all possible shortcuts for a given project.
4848

4949
A shortcut object represents a single action that can be performed in a client such as Phantom. It has the following properties:
5050

51-
| Field | Type | Description |
52-
| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
53-
| label | string | The suggested text to display on the link |
54-
| uri | string | URI pointing to the destination of the shortcut |
55-
| type | string | (Optional) The type of token this shortcut applies to. Possible values are `fungible` or `collectible`. If omitted, the token will be assumed to be a `collectible`. |
56-
| icon | string | (Optional) The suggested icon to display on the link. The following options are available: `vote`, `vote-2`, `stake`, `stake-2`, `view`, `chat`, `tip`, `mint`, `mint-2`, `discord`, `twitter`, `x`, `instagram`, `telegram`, `leaderboard`, `gaming`, `gaming-2`, `generic-link`, `generic-add` |
57-
| prefersExternalTarget | boolean | (Optional) Whether the shortcut prefers to be opened outside of the client (e.g. Outside of Phantom's in-app browser). Defaults to `false` |
58-
| preferredPresentation | string | (Optional) How the shortcut prefers to be displayed. Possible values are `default` and `immerse`. The platform would choose how that translates to their UX. Defaults to `immerse` |
59-
| limitToCollections | string[] | (Optional) A list of collection addresses that should display this shortcut. If provided, the client should only show the shortcut on collections that are in this array. Other collections that share the same `external_url` will not show this shortcut. Addresses should be provided as strings. Defaults to an empty array `[]` |
60-
| platform | string | (Optional) Indicates to the client that this shortcut should only be displayed for the specified platform. Possible options are `desktop`, `mobile`, and `all`. Defaults to `all`. |
51+
| Field | Type | Description |
52+
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53+
| label | string | The suggested text to display on the link |
54+
| uri | string | URI pointing to the destination of the shortcut |
55+
| type | string | (Optional) The type of token this shortcut applies to. Possible values are `fungible` or `collectible`. If omitted, the token will be assumed to be a `collectible`. |
56+
| icon | string | (Optional) The suggested icon to display on the link. The following options are available: `vote`, `vote-2`, `stake`, `stake-2`, `view`, `chat`, `tip`, `mint`, `mint-2`, `discord`, `twitter`, `x`, `instagram`, `telegram`, `leaderboard`, `gaming`, `gaming-2`, `generic-link`, `generic-add` |
57+
| prefersExternalTarget | boolean | (Optional) Whether the shortcut prefers to be opened outside of the client (e.g. Outside of Phantom's in-app browser). Defaults to `false` |
58+
| preferredPresentation | string | (Optional) How the shortcut prefers to be displayed. Possible values are `default` and `immerse`. The platform would choose how that translates to their UX. Defaults to `immerse` |
59+
| limitToCollections | string[] | (Optional) A list of collection addresses that should display this shortcut. Only applicable if `type === "collectible"`. If provided, the client should only show the shortcut on collections that are in this array. Other collections that share the same `external_url` will not show this shortcut. Addresses should be provided as strings. Defaults to an empty array `[]` |
60+
| limitToTokenAddresses | string[] | (Optional) A list of token addresses that should display this shortcut. Only applicable if `type === "fungible"`. If provided, the client should only show the shortcut on tokens that are in this array. Other tokens that share the same `external_url` will not show this shortcut. Addresses should be provided as strings. Defaults to an empty array `[]` |
61+
| platform | string | (Optional) Indicates to the client that this shortcut should only be displayed for the specified platform. Possible options are `desktop`, `mobile`, and `all`. Defaults to `all`. |
6162

6263
When designing shortcuts, creators are not limited to static URLs. Instead, creators can specify placeholder variables that can be replaced by a given client. These variables include `{{collectionId}}`, `{{tokenId}}`, and `{{ownerAddress}}`. If you are interested in using more placeholder variables, please let us know by opening an issue on this repository.
6364

@@ -301,6 +302,7 @@ Projects can partner with providers to do things like loans and provide quick ac
301302
Released February 2024.
302303

303304
- Add `type` field that supports `fungible` and `collectible` tokens
305+
- Add `limitToTokenAddresses` field for `fungible` tokens
304306

305307
#### v1
306308

0 commit comments

Comments
 (0)