From eff7d378ad400ab6077f5ebf86d4848318ad7c26 Mon Sep 17 00:00:00 2001 From: LukassF Date: Wed, 20 Mar 2024 15:51:57 +0100 Subject: [PATCH 1/4] add: aptos docs --- sdk/apps/docs/docs/aptos/connect.md | 87 +++++++++++++++++++ sdk/apps/docs/docs/aptos/events.md | 42 +++++++++ sdk/apps/docs/docs/aptos/sign_transaction.md | 32 +++++++ sdk/apps/docs/docs/aptos/start.md | 38 ++++++++ .../docs/docs/customization/external_modal.md | 2 +- .../docs/docs/customization/ui_overrides.md | 2 +- sdk/apps/docs/docs/for_wallets/connect.md | 28 ++++++ .../docs/docs/for_wallets/sign_message.md | 30 +++++++ .../docs/docs/for_wallets/sign_transaction.md | 25 ++++++ sdk/apps/docs/docs/start.md | 4 + sdk/apps/docs/docusaurus.config.js | 71 ++++++++++----- sdk/apps/docs/sidebars.js | 13 ++- sdk/apps/docs/src/css/custom.css | 40 ++++++++- 13 files changed, 388 insertions(+), 26 deletions(-) create mode 100644 sdk/apps/docs/docs/aptos/connect.md create mode 100644 sdk/apps/docs/docs/aptos/events.md create mode 100644 sdk/apps/docs/docs/aptos/sign_transaction.md create mode 100644 sdk/apps/docs/docs/aptos/start.md diff --git a/sdk/apps/docs/docs/aptos/connect.md b/sdk/apps/docs/docs/aptos/connect.md new file mode 100644 index 00000000..72b011df --- /dev/null +++ b/sdk/apps/docs/docs/aptos/connect.md @@ -0,0 +1,87 @@ +--- +title: Build & Connect +slug: aptos/connect +--- + +:::info +This part of documentation is targeted to applications that want to implement nightly connect +as wallet interface. +::: + +To get started, we need to connect the user to the application. +In order to do so, application generates the sessionId, a unique id that identifies each connection. + +--- + +This process is initialized by one side displaying a sessionId through QR code (see the screenshot). +The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and dont need to upgrade your dapp. + +![ConnectImage](../../static/img/connect.png#connectImage) + +### Connect + +Application builds a connection using `build()` or `buildLazy()` function that returns interface to communicated with remote user. It is important to note, that the `buildLazy()` function allows for the modal to appear even when the sessionId is still undefined. App should define `AppMetadata` so wallets will be able to show it to user. + +To start sending request like `signTransaction` user first need to connect to session. +Once user establishes connection, application will get public key and the connection will be confirmed. + +API of application client is fit to match currently existing standards of corresponding blockchains + +```js +interface AppMetadata { + name: string; + url?: string; + description?: string; + icon?: string; // Url of app image + additionalInfo?: string; +} +``` + +You may also want to specify some additional connection options. This can be achieved by creating an object that implements the below interface, and using it inside the `build()` or `buildLazy()` function. Note, that the `disableModal` property can be used for implementing a custom [External modal](../../customization/customization/external_modal). + +```js +interface ConnectionOptions { + disableModal?: boolean // default: false + // Used for disabling modal in case you want to use your own + initOnConnect?: boolean // default: false + // Ensures that the app is only build upon running the connect function + disableEagerConnect?: boolean // default: false + // Do not connect eagerly, even if the previous session is saved +} +``` + +```js +import { NightlyConnectAptosAdapter } from '@nightlylabs/wallet-selector-aptos' + +const adapter = NightlyConnectAptosAdapter.buildLazy( + { + appMetadata: { + name: 'NCTestAptos', + description: 'Nightly Connect Test', + icon: 'https://docs.nightly.app/img/logo.png', + additionalInfo: 'Courtesy of Nightly Connect team' + } + // persistent: false - Add this if you want to make the session non-persistent + } + // { initOnConnect: true, disableModal: true, disableEagerConnect: true } - You may specify the connection options object here + // document.getElementById("modalAnchor") - You can pass an optional anchor element for the modal here +) + +// Trigger connection +await adapter.connect() +// After connection adapter turns into remote signer + +// Sign transaction +await adapter.signAndSubmitTransaction() + +// Disconnect client if you want to end session +await adapter.disconnect() +``` + +### Disconnect + +:::info +Both client and application can initiate disconnection. +User can force session termination in case of abuse. +Only when application disconnects and session is not persistent, session is completely removed. +::: diff --git a/sdk/apps/docs/docs/aptos/events.md b/sdk/apps/docs/docs/aptos/events.md new file mode 100644 index 00000000..8cf26348 --- /dev/null +++ b/sdk/apps/docs/docs/aptos/events.md @@ -0,0 +1,42 @@ +--- +title: Listening for events +slug: aptos/events +--- + +An app can listen to events, subscribe to them and run some code whenever the particular event occurs. + +If you have created a connection you can listen for events using the `on()` function. + +```js +const adapter = NightlyConnectAptosAdapter.buildLazy( + { + appMetadata: { + name: 'NCTestAptos', + description: 'Nightly Connect Test', + icon: 'https://docs.nightly.app/img/logo.png', + additionalInfo: 'Courtesy of Nightly Connect team' + }, + url: 'https://nc2.nightly.app' + } +) + +adapter.on('connect', (public_key) => { + ... +}) + +adapter.on('accountChange', (accInfo) => { + ... +}) + +adapter.on('networkChange', (networkInfo) => { + ... +}) + +adapter.on('disconnect', () => { + ... +}) + +adapter.on('error', (error) => { + ... +}) +``` diff --git a/sdk/apps/docs/docs/aptos/sign_transaction.md b/sdk/apps/docs/docs/aptos/sign_transaction.md new file mode 100644 index 00000000..ae502672 --- /dev/null +++ b/sdk/apps/docs/docs/aptos/sign_transaction.md @@ -0,0 +1,32 @@ +--- +title: Sign Transaction +slug: aptos/sign_transaction +--- + +Sending a signTransaction requires established connection with user wallet. + +Transaction are sent to the client via wallet interface. Client can accept or reject the request. Once client signs transaction, `signAndSubmitTransaction()` method returns resolved promise with Signed Transaction. + +```js +import { Aptos } from '@aptos-labs/ts-sdk' + +const aptos = new Aptos() + +const accountInfo = { + address: '' // Generated inside the onAccountChange event listener + ... +} + +const transaction = await aptos.transaction.build.simple({ + sender: accountInfo.address.toString(), + data: { + function: '0x1::coin::transfer', + typeArguments: ['0x1::aptos_coin::AptosCoin'], + functionArguments: ['0x960dbc655b847cad38b6dd056913086e5e0475abc27152b81570fd302cb10c38', 100] + } +}) + +const signedTx = await adapter.signAndSubmitTransaction({ + rawTransaction: transaction.rawTransaction +}) +``` diff --git a/sdk/apps/docs/docs/aptos/start.md b/sdk/apps/docs/docs/aptos/start.md new file mode 100644 index 00000000..8b8fe5f5 --- /dev/null +++ b/sdk/apps/docs/docs/aptos/start.md @@ -0,0 +1,38 @@ +--- +title: Get started with Aptos +slug: aptos/start +--- + +### Web template + +
+ +**To get started with aptos, use the source code of the template below, and follow the installation instructions.** + +
+ +> #### Preview: https://aptos-web3-template.vercel.app + +
+ +> #### Source code: https://github.com/nightly-labs/aptos-web3-template + +
+ +
+ +### Manual installation + +If you want to opt for greater flexibility, install the package, as described below and then visit the [Aptos Build & Connect](./connect). + +:::note +Simply integrate Nightly Connect to your application or wallet with our [Nightly Aptos Connect package](https://www.npmjs.com/package/@nightlylabs/wallet-selector-aptos). + +```bash +# Using NPM +npm i @nightlylabs/wallet-selector-aptos +# Using Yarn +yarn add @nightlylabs/wallet-selector-aptos +``` + +::: diff --git a/sdk/apps/docs/docs/customization/external_modal.md b/sdk/apps/docs/docs/customization/external_modal.md index 9dc36f3c..b3be5bb5 100644 --- a/sdk/apps/docs/docs/customization/external_modal.md +++ b/sdk/apps/docs/docs/customization/external_modal.md @@ -8,7 +8,7 @@ You may want to use your own design and/or change some logic for the modal. In t You can then use the modal connect function, instead of using the default one from the adapter. :::info -Example below is written for [Solana](../../solana/solana/start), but you can use it for [Sui](../../sui/sui/start) and [Substrate](../../substrate/substrate/start) as well. +Example below is written for [Solana](../../solana/solana/start), but you can use it for [Sui](../../sui/sui/start), [Aptos](../../aptos/aptos/start) and [Substrate](../../substrate/substrate/start) as well. ::: ```js diff --git a/sdk/apps/docs/docs/customization/ui_overrides.md b/sdk/apps/docs/docs/customization/ui_overrides.md index d837ac62..91a8ebf2 100644 --- a/sdk/apps/docs/docs/customization/ui_overrides.md +++ b/sdk/apps/docs/docs/customization/ui_overrides.md @@ -120,5 +120,5 @@ const adapter = NightlyConnectAdapter.buildLazy( ``` :::info -The example is built using [Substrate](../../substrate/substrate/start), but can be implemented using [Solana](../../solana/solana/start) and [Sui](../../sui/sui/start) as well. +The example is built using [Substrate](../../substrate/substrate/start), but can be implemented using [Solana](../../solana/solana/start), [Aptos](../../aptos/aptos/start) and [Sui](../../sui/sui/start) as well. ::: diff --git a/sdk/apps/docs/docs/for_wallets/connect.md b/sdk/apps/docs/docs/for_wallets/connect.md index 4d65390b..f866f8f6 100644 --- a/sdk/apps/docs/docs/for_wallets/connect.md +++ b/sdk/apps/docs/docs/for_wallets/connect.md @@ -112,6 +112,34 @@ const message: Connect = { await client.connect(message) ``` + + + + +```js +import { ClientSui } from '@nightlylabs/nightly-connect-aptos' + +const client: ClientAptos = await ClientAptos.create({ + url: RELAY_ENDPOINT // default: https://nc2.nightly.app +}) +const info: GetInfoResponse = await client.getInfo(sessionId) + +const message: Connect = { + accountInfo: { + address: accountAddress, + publicKey: publicKey, + ansName: undefined + }, + networkInfo: { + chainId: 10, + name: Network.MAINNET, + url: undefined + }, + sessionId: app.sessionId +} +await client.connect(message) +``` + diff --git a/sdk/apps/docs/docs/for_wallets/sign_message.md b/sdk/apps/docs/docs/for_wallets/sign_message.md index 4275ca65..57f7fc27 100644 --- a/sdk/apps/docs/docs/for_wallets/sign_message.md +++ b/sdk/apps/docs/docs/for_wallets/sign_message.md @@ -66,5 +66,35 @@ client.on('signMessages', async (e) => { Signing messages on Substrate works the same way as signing transactions + + + + +```js +export interface ResolveSignAptosMessage { + requestId: string + signedMessages: Array + sessionId: string +} + +client.on('signMessage', async (e) => { + const payload = e.messages[0] + const signature = alice.sign(new Buffer(payload.message).toString('hex')) + + await client.resolveSignMessage({ + requestId: e.requestId, + signedMessages: [ + { + message: payload.message, + signature: signature, + fullMessage: payload.message, + nonce: payload.nonce, + prefix: 'APTOS' + } + ], + }) +}) +``` + diff --git a/sdk/apps/docs/docs/for_wallets/sign_transaction.md b/sdk/apps/docs/docs/for_wallets/sign_transaction.md index 52a2cbaf..549c2dbc 100644 --- a/sdk/apps/docs/docs/for_wallets/sign_transaction.md +++ b/sdk/apps/docs/docs/for_wallets/sign_transaction.md @@ -108,5 +108,30 @@ client.on('signTransactions', async (e) => { }) ``` + + + + +```js +interface ResolveSignAptosTransactions { + requestId: string + signedTransactions: Array + sessionId: string +} + +client.on('signTransaction', async (e) => { + const tx = e.transactions[0] + const senderAuthenticator = aptos.transaction.sign({ + signer: alice, + transaction: tx + }) + // resolve + await client.resolveSignTransaction({ + requestId: e.requestId, + signedTransactions: [senderAuthenticator] + }) +}) +``` + diff --git a/sdk/apps/docs/docs/start.md b/sdk/apps/docs/docs/start.md index 3a390a7c..19089d63 100644 --- a/sdk/apps/docs/docs/start.md +++ b/sdk/apps/docs/docs/start.md @@ -16,4 +16,8 @@ slug: /start Substrate + + + Aptos + diff --git a/sdk/apps/docs/docusaurus.config.js b/sdk/apps/docs/docusaurus.config.js index 81b9c255..b23c686c 100644 --- a/sdk/apps/docs/docusaurus.config.js +++ b/sdk/apps/docs/docusaurus.config.js @@ -64,26 +64,56 @@ const config = { position: 'left' }, { - to: 'docs/solana/solana/start', - className: 'solana_navlink navlink', - activeBasePath: 'docs/solana/solana/start', - label: 'Solana', - position: 'left' - }, - { - to: 'docs/sui/sui/start', - className: 'sui_navlink navlink', - activeBasePath: 'docs/sui/sui/start', - label: 'Sui', - position: 'left' - }, - { - to: 'docs/substrate/substrate/start', - className: 'substrate_navlink navlink', - activeBasePath: 'docs/substrate/substrate/start', - label: 'Substrate', - position: 'left' + type: 'dropdown', + label: 'Networks', + position: 'left', + items: [ + { + to: 'docs/solana/solana/start', + label: 'Solana', + className: 'network_navlink solana_navlink' + }, + { to: 'docs/sui/sui/start', label: 'Sui', className: 'network_navlink sui_navlink' }, + { + to: 'docs/substrate/substrate/start', + label: 'Substrate', + className: 'network_navlink substrate_navlink' + }, + { + to: 'docs/aptos/aptos/start', + label: 'Aptos', + className: 'network_navlink aptos_navlink' + } + ] }, + // { + // to: 'docs/solana/solana/start', + // className: 'solana_navlink navlink', + // activeBasePath: 'docs/solana/solana/start', + // label: 'Solana', + // position: 'left' + // }, + // { + // to: 'docs/sui/sui/start', + // className: 'sui_navlink navlink', + // activeBasePath: 'docs/sui/sui/start', + // label: 'Sui', + // position: 'left' + // }, + // { + // to: 'docs/substrate/substrate/start', + // className: 'substrate_navlink navlink', + // activeBasePath: 'docs/substrate/substrate/start', + // label: 'Substrate', + // position: 'left' + // }, + // { + // to: 'docs/aptos/aptos/start', + // className: 'aptos_navlink navlink', + // activeBasePath: 'docs/aptos/aptos/start', + // label: 'Aptos', + // position: 'left' + // }, { to: 'docs/customization/customization/ui_overrides', activeBasePath: 'docs/customization/customization/ui_overrides', @@ -103,7 +133,8 @@ const config = { items: [ { href: 'https://solana-web3-template.nightly.app', label: 'Solana template' }, { href: 'https://sui-web3-template.nightly.app', label: 'Sui template' }, - { href: 'https://aleph-zero-web3-template.nightly.app', label: 'Substrate template' } + { href: 'https://aleph-zero-web3-template.nightly.app', label: 'Substrate template' }, + { href: 'https://aptos-web3-template.vercel.app', label: 'Aptos template' } ] }, { diff --git a/sdk/apps/docs/sidebars.js b/sdk/apps/docs/sidebars.js index 995ce1f6..5cc9e490 100644 --- a/sdk/apps/docs/sidebars.js +++ b/sdk/apps/docs/sidebars.js @@ -21,23 +21,30 @@ const sidebars = { type: 'category', className: 'drop solana-dropdown', label: ' Solana', - collapsed: false, + collapsed: true, items: ['solana/start', 'solana/connect', 'solana/events', 'solana/sign_transaction'] }, { type: 'category', className: 'drop sui-dropdown', label: 'Sui', - collapsed: false, + collapsed: true, items: ['sui/start', 'sui/connect', 'sui/events', 'sui/sign_transaction'] }, { type: 'category', className: 'drop substrate-dropdown', label: 'Substrate', - collapsed: false, + collapsed: true, items: ['substrate/start', 'substrate/connect', 'substrate/sign_transaction'] }, + { + type: 'category', + className: 'drop aptos-dropdown', + label: 'Aptos', + collapsed: true, + items: ['aptos/start', 'aptos/connect', 'aptos/sign_transaction', 'aptos/events'] + }, { type: 'category', label: 'Customization', diff --git a/sdk/apps/docs/src/css/custom.css b/sdk/apps/docs/src/css/custom.css index 8aeaa7bf..b7ce9cc3 100644 --- a/sdk/apps/docs/src/css/custom.css +++ b/sdk/apps/docs/src/css/custom.css @@ -99,7 +99,7 @@ img[src*='#connectImage'] { justify-content: flex-start; align-items: center; font-size: 2em; - transition: all 250ms; + transition: background-position 250ms; } .card > img { width: 80px; @@ -154,6 +154,10 @@ img[src*='#connectImage'] { background-image: url('https://registry.nightly.app/networks/polkadot.png'); } +.aptos-dropdown > div::before { + background-image: url('https://registry.nightly.app/networks/aptos.png'); +} + .highlight-template { padding: 30px; border-radius: 10px; @@ -167,6 +171,36 @@ img[src*='#connectImage'] { text-overflow: ellipsis; } +.network_navlink { + display: flex; + flex-direction: row; + align-items: center; + gap: 7px; +} + +.network_navlink::before { + content: ''; + background-size: cover; + height: 20px; + aspect-ratio: 1/1; + border-radius: 50%; +} + +.solana_navlink::before { + background-image: url('https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png'); +} +.sui_navlink::before { + background-image: url('https://registry.nightly.app/networks/sui.png'); +} + +.substrate_navlink::before { + background-image: url('https://registry.nightly.app/networks/polkadot.png'); +} + +.aptos_navlink::before { + background-image: url('https://registry.nightly.app/networks/aptos.png'); +} +/* .navbar__items > .navlink { display: flex; flex-direction: row; @@ -194,6 +228,10 @@ img[src*='#connectImage'] { background-image: url('https://registry.nightly.app/networks/polkadot.png'); } +.navbar__items > .aptos_navlink::before { + background-image: url('https://registry.nightly.app/networks/aptos.png'); +} */ + @media screen and (max-width: 996px) { .navlink { display: none !important; From 25b6f99d51e99cbab0b449f79f754062db045413 Mon Sep 17 00:00:00 2001 From: LukassF Date: Wed, 20 Mar 2024 16:06:41 +0100 Subject: [PATCH 2/4] fix: build function and remove snake case --- sdk/apps/docs/docs/aptos/connect.md | 2 +- sdk/apps/docs/docs/aptos/events.md | 2 +- sdk/apps/docs/docs/solana/events.md | 2 +- sdk/apps/docs/docs/sui/connect.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/apps/docs/docs/aptos/connect.md b/sdk/apps/docs/docs/aptos/connect.md index 72b011df..0c08c8b4 100644 --- a/sdk/apps/docs/docs/aptos/connect.md +++ b/sdk/apps/docs/docs/aptos/connect.md @@ -53,7 +53,7 @@ interface ConnectionOptions { ```js import { NightlyConnectAptosAdapter } from '@nightlylabs/wallet-selector-aptos' -const adapter = NightlyConnectAptosAdapter.buildLazy( +const adapter = NightlyConnectAptosAdapter.build( { appMetadata: { name: 'NCTestAptos', diff --git a/sdk/apps/docs/docs/aptos/events.md b/sdk/apps/docs/docs/aptos/events.md index 8cf26348..238e8dc4 100644 --- a/sdk/apps/docs/docs/aptos/events.md +++ b/sdk/apps/docs/docs/aptos/events.md @@ -20,7 +20,7 @@ const adapter = NightlyConnectAptosAdapter.buildLazy( } ) -adapter.on('connect', (public_key) => { +adapter.on('connect', (publicKey) => { ... }) diff --git a/sdk/apps/docs/docs/solana/events.md b/sdk/apps/docs/docs/solana/events.md index db13b357..6bbd9e7d 100644 --- a/sdk/apps/docs/docs/solana/events.md +++ b/sdk/apps/docs/docs/solana/events.md @@ -18,7 +18,7 @@ const adapter = NightlyConnectAdapter.buildLazy({ url: 'https://nc2.nightly.app' }) -adapter.on('connect', (public_key) => { +adapter.on('connect', (publicKey) => { ... }) diff --git a/sdk/apps/docs/docs/sui/connect.md b/sdk/apps/docs/docs/sui/connect.md index 04294b8e..849fd077 100644 --- a/sdk/apps/docs/docs/sui/connect.md +++ b/sdk/apps/docs/docs/sui/connect.md @@ -53,7 +53,7 @@ interface ConnectionOptions { ```js import { NightlyConnectSuiAdapter } from '@nightlylabs/wallet-selector-sui' -const adapter = NightlyConnectSuiAdapter.buildLazy( +const adapter = NightlyConnectSuiAdapter.build( { appMetadata: { name: 'NCTestSui', From 51c65fbfa093886160610ca1b6edc2ccfc2bfa71 Mon Sep 17 00:00:00 2001 From: LukassF Date: Wed, 20 Mar 2024 16:12:47 +0100 Subject: [PATCH 3/4] fix: await --- sdk/apps/docs/docs/aptos/connect.md | 2 +- sdk/apps/docs/docs/sui/connect.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/apps/docs/docs/aptos/connect.md b/sdk/apps/docs/docs/aptos/connect.md index 0c08c8b4..8850f4e9 100644 --- a/sdk/apps/docs/docs/aptos/connect.md +++ b/sdk/apps/docs/docs/aptos/connect.md @@ -53,7 +53,7 @@ interface ConnectionOptions { ```js import { NightlyConnectAptosAdapter } from '@nightlylabs/wallet-selector-aptos' -const adapter = NightlyConnectAptosAdapter.build( +const adapter = await NightlyConnectAptosAdapter.build( { appMetadata: { name: 'NCTestAptos', diff --git a/sdk/apps/docs/docs/sui/connect.md b/sdk/apps/docs/docs/sui/connect.md index 849fd077..f4366a77 100644 --- a/sdk/apps/docs/docs/sui/connect.md +++ b/sdk/apps/docs/docs/sui/connect.md @@ -53,7 +53,7 @@ interface ConnectionOptions { ```js import { NightlyConnectSuiAdapter } from '@nightlylabs/wallet-selector-sui' -const adapter = NightlyConnectSuiAdapter.build( +const adapter = await NightlyConnectSuiAdapter.build( { appMetadata: { name: 'NCTestSui', From 44e5e5ceba6174477f07b38d28aba2b068ab78b5 Mon Sep 17 00:00:00 2001 From: LukassF Date: Wed, 20 Mar 2024 16:24:04 +0100 Subject: [PATCH 4/4] fix typos --- sdk/apps/docs/docs/aptos/connect.md | 2 +- sdk/apps/docs/docs/customization/external_modal.md | 4 ++-- sdk/apps/docs/docs/demo.md | 0 sdk/apps/docs/docs/solana/connect.md | 2 +- sdk/apps/docs/docs/substrate/connect.md | 4 ++-- sdk/apps/docs/docs/sui/connect.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 sdk/apps/docs/docs/demo.md diff --git a/sdk/apps/docs/docs/aptos/connect.md b/sdk/apps/docs/docs/aptos/connect.md index 8850f4e9..722d3430 100644 --- a/sdk/apps/docs/docs/aptos/connect.md +++ b/sdk/apps/docs/docs/aptos/connect.md @@ -14,7 +14,7 @@ In order to do so, application generates the sessionId, a unique id that identif --- This process is initialized by one side displaying a sessionId through QR code (see the screenshot). -The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and dont need to upgrade your dapp. +The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and don't need to upgrade your dapp. ![ConnectImage](../../static/img/connect.png#connectImage) diff --git a/sdk/apps/docs/docs/customization/external_modal.md b/sdk/apps/docs/docs/customization/external_modal.md index b3be5bb5..da0922d0 100644 --- a/sdk/apps/docs/docs/customization/external_modal.md +++ b/sdk/apps/docs/docs/customization/external_modal.md @@ -3,7 +3,7 @@ title: External modal slug: customization/external_modal --- -You may want to use your own design and/or change some logic for the modal. In that case passing all of the overrides to the `build()` or `buildLazy()` function can prove ineffective. Another option therfore is to omit the default modal altogether, by specyfing the `disableModal` option as true insid ethe `connectionOptions`. +You may want to use your own design and/or change some logic for the modal. In that case passing all of the overrides to the `build()` or `buildLazy()` function can prove ineffective. Another option therfore is to omit the default modal altogether, by specyfing the `disableModal` option as true inside the `connectionOptions`. You can then use the modal connect function, instead of using the default one from the adapter. @@ -48,7 +48,7 @@ adapter.on('connect', (pk) => { }) ``` -The aforedescribed code sets up the adapter and the modal for later use. +The code described above sets up the adapter and the modal for later use. To connect using custom modal, we can run: diff --git a/sdk/apps/docs/docs/demo.md b/sdk/apps/docs/docs/demo.md deleted file mode 100644 index e69de29b..00000000 diff --git a/sdk/apps/docs/docs/solana/connect.md b/sdk/apps/docs/docs/solana/connect.md index 1b6bf11f..e07d76c6 100644 --- a/sdk/apps/docs/docs/solana/connect.md +++ b/sdk/apps/docs/docs/solana/connect.md @@ -14,7 +14,7 @@ In order to do so, application generates the sessionId, a unique id that identif --- This process is initialized by one side displaying a sessionId through QR code (see the screenshot). -The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and dont need to upgrade your dapp. +The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and don't need to upgrade your dapp. ![ConnectImage](../../static/img/connect.png#connectImage) diff --git a/sdk/apps/docs/docs/substrate/connect.md b/sdk/apps/docs/docs/substrate/connect.md index b4014f42..881a1971 100644 --- a/sdk/apps/docs/docs/substrate/connect.md +++ b/sdk/apps/docs/docs/substrate/connect.md @@ -14,7 +14,7 @@ In order to do so, application generates the sessionId, a unique id that identif --- This process is initialized by one side displaying a sessionId through QR code (see the screenshot). -The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and dont need to upgrade your dapp. +The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and don't need to upgrade your dapp. ![ConnectImage](../../static/img/connect.png#connectImage) @@ -50,7 +50,7 @@ interface ConnectionOptions { } ``` -You can find example usage of this addapter here: https://github.com/nightly-labs/connect/blob/main/sdk/apps/modal-example/src/routes/aleph.tsx +You can find example usage of this adapter here: https://github.com/nightly-labs/connect/blob/main/sdk/apps/modal-example/src/routes/aleph.tsx ```js import { NightlyConnectAdapter } from '@nightlylabs/wallet-selector-polkadot' diff --git a/sdk/apps/docs/docs/sui/connect.md b/sdk/apps/docs/docs/sui/connect.md index f4366a77..4470234a 100644 --- a/sdk/apps/docs/docs/sui/connect.md +++ b/sdk/apps/docs/docs/sui/connect.md @@ -14,7 +14,7 @@ In order to do so, application generates the sessionId, a unique id that identif --- This process is initialized by one side displaying a sessionId through QR code (see the screenshot). -The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and dont need to upgrade your dapp. +The other peer needs just to scan the QR code on its device. Extension wallets are auto detected so you are always up to date and don't need to upgrade your dapp. ![ConnectImage](../../static/img/connect.png#connectImage)