
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@broxus/js-core
Advanced tools
This library provides MobX-based services, models and helpers to build JavaScript Applications with any popular frameworks or libraries (e.g. React, Angular, Vue, etc.)
Collection of the services to manage states of the wallets connections - TVM-compatible Wallets (e.g. EVER Wallet). Services to manage tokens list, tokens wallets cache and tokens prices etc.
Service to connect to a TVM-compatible Wallet like EVER Wallet or Venom Wallet. It has connect
and disconnect
methods for manually connect
and disconnect to the wallet.
import { TvmWalletService } from '@broxus/js-core'
const tvmWalletService = new TvmWalletService({
defaultNetworkId: 42,
minWalletVersion: '2.31.0', // min version that suppurts delayed messages sending
networks: [
{
chainId: '42',
currency: {
decimals: 9,
icon: '...',
name: 'Native currency',
symbol: 'EVER',
wrappedCurrencyAddress: new AddressLiteral( '0:a49cd4e158a9a15555e624759e2e4e766d22600b7800d891e46f9291f044a93d'), // WEVER
},
explorer: {
accountsSubPath: 'accounts',
baseUrl: 'https://everscan.io',
title: 'EVER Scan',
transactionsSubPath: 'transactions',
},
id: 'tvm-42',
name: 'Everscale',
rpcUrl: 'https://jrpc.everwallet.net/rpc',
shortName: 'Everscale',
type: 'tvm',
},
],
providerId: 'ever'
})
await tvmWalletService.connect()
For add a custom token asset to the wallet extension tokens assets use method addAsset
.
await tvmWalletService.addAsset('0:a49cd4e158a9a15555e624759e2e4e766d22600b7800d891e46f9291f044a93d', 'tip3_token')
When you add network with some
chainId
- this network config should be described in thenetworks
option
Service for load and manage list of the Everscale tokens.
import { TokensListService } from '@broxus/js-core'
import { ProviderRpcClient } from 'everscale-inpage-provider'
const tokensListService = new TokensListService(
'https://raw.githubusercontent.com/broxus/flatqube-assets/master/manifest.json',
connection: ProviderRpcClient
)
await tokensListService.init()
Model for the TVM-based token
import { TvmToken } from '@broxus/js-core'
const token = new TvmToken(tvmWalletService.connection, {
name: 'Wrapped EVER',
symbol: 'WEVER',
decimals: 9,
address: '0:a49cd4e158a9a15555e624759e2e4e766d22600b7800d891e46f9291f044a93d',
logoURI: 'https://raw.githubusercontent.com/broxus/flatqube-assets/master/icons/WEVER/logo.svg',
version: 5,
verified: true,
}, [tvmWalletService.provider])
await token.sync({ force: true, silent: true })
const userWallet = await token.wallet(ownerAddress: Address | string)
Abstract class AbstractStore
is a primary way to create any services or stores that provides API
to manage state and data:
@observable
protected _data: {}
@observable
protected _state: {}
@action.bound
public setData(keyOrData: string | object | (prevData) => nextData): this
@action.bound
public setState(keyOrState: string | object | (prevState) => nextState): this
@computed
public toJSON(): object
Abstract class TvmContractWrapper
is a primary way to create models (wrapper for contract)
FAQs
MobX-based JavaScript Core library
The npm package @broxus/js-core receives a total of 163 weekly downloads. As such, @broxus/js-core popularity was classified as not popular.
We found that @broxus/js-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.