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

Uses light prism and manually selects syntax highlighte rs #202

Closed

Conversation

elliotBraem
Copy link
Contributor

In order to reduce bundle size of near-bos-webcomponent , we manually select the syntax highlighters to use.

It uses:

javascript
typescript
jsx
bash
css
json
rust

from the full list here: https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_LANGUAGES_PRISM.MD

This has no outcome on the near-social-vm bundle, although converting to an ESM module may make this effort unnecessary (tree shaking will be handled correctly)

gagdiez and others added 30 commits April 8, 2024 13:23
Before this commit, each time updateAccount was triggered the VM checked if the selector was connected - i.e. had an access key - to a contract different from SocialDB, and proceed to logout the user if that was the case.

This commit removes this constraint, allowing users to connect to both SocialDB and other contracts.
chore: specify which contract is allowed to be logged-in
feat: clear location hash method added
The current packages being used for sass are no longer supported, and
create an error when using node v20 & v22

This commit updates the dependencies, to use packages are maintained
and are thus compatible with current node versions
…-to-loading

Adds 2s animation delay to the loading spinner.
# Conflicts:
#	CHANGELOG.md
#	dist/index.js
feat: Sign message

This PR enables the use of the signMessage method from the wallet-selector. The user can sign a message with any of the connected wallets for further [signature verification](https://docs.near.org/build/web3-apps/backend/) on a third-party authentication server.

- Add `Near.signMessage` function to sign arbitrary message with NEAR account. The message that the user needs to sign contains 4 fields:
  - `message`: The message that the user is signing.
  - `recipient`: The recipient of the message.
  - `nonce`: The challenge that the user is signing.
  - `callbackUrl`: The URL that the wallet will call with the signature.
How to verify the signature: https://docs.near.org/build/web3-apps/backend/#3-verify-the-signature

- Add get/set methods for `window.location.hash`. `Set` method only accepts an empty string as a value.
@elliotBraem elliotBraem closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants