New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vegaprotocol/emblem

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vegaprotocol/emblem

Uses https://icon.vega.xyz to source an image for assets or markets.

  • 0.0.7
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Emblem

Uses https://icon.vega.xyz to source an image for assets or markets.

Components

All of the components ultimately render an img tag, and all properties can be overridden.

Emblem

Wrapper component for EmblemByAsset, EmblemByContract and EmblemByMarket components. Depending on the props, it returns an icon for an asset by one of the below subcomponents

Property NameRequired or OptionalDescription
assetOptionalThe ID of the Vega Asset.
chainIdOptionalThe ID of the Vega Chain.
vegaChainIdOptionalThe ID of the Vega Chain (e.g. vega-fairground-2020305051805).
contractAddressOptionalThe address of the smart contract on its origin chain.

EmblemByAsset

Renders an icon for a given Vega Asset ID.

Property NameRequired or OptionalDescription
assetRequiredThe ID of the Vega Asset.
vegaChainIdRequiredThe ID of the Vega Chain (e.g. vega-fairground-2020305051805).

EmblemByContract

Renders an icon for a given smart contract address on its origin chain.

Property NameRequired or OptionalDescription
contractRequiredThe address of the contract representing the asset.
chainIdRequiredThe ID of the origin chain (e.g. 1 for Ethereum Mainnet).

EmblemByMarket

Renders two, or optionally one icons for a given market ID on a vega chain

Property NameRequired or OptionalDescription
vegaChainIdRequiredThe ID of the Vega Chain (e.g. vega-fairground-2020305051805).
marketIdRequiredThe ID of the market
showLogosOptional'BASE' or 'QUOTE' show only that asset. Defaults to 'BOTH'

Vega Chain ID

Vega chain ID is required by most of the components. See Explorer's EmblemWithChain for an example of a wrapper component that gets the chain ID from configuration, meaning you don't need to manually fetch the chain ID in lots of components. As this is not standard across applications currently, it has not been added to this library.

Building

Run nx build emblem to build the library.

FAQs

Package last updated on 05 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc