0.19.2 • Published 5 months ago

@broxus/js-core v0.19.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Broxus JavaScript Core

Introduction

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.)

Core

AbstractStore

Abstract class AbstractStore is a primary way to create any services or stores that provides API to manage state and data:

abstract class AbstractStore {
    setData(keyOrData: string | object | ((prevData) => nextData)): this
    setState(keyOrState: string | object | ((prevState) => nextState)): this
    toJSON(): object
}

TvmContractWrapper

Abstract class TvmContractWrapper is a primary way to create models (wrapper for contract)

abstract class TvmContractWrapper {
    address: Address
    contractState?: FullContractState
    isDeployed?: boolean
    isSyncing?: boolean
    syncedAt?: number
    async syncContractState(): Promise<FullContractState | undefined>
    abstract watch?(): Promise<Subscriber>
    abstract unwatch?(): Promise<void>
}

Models

TvmToken

Model of 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)
0.19.2

5 months ago

0.19.0

5 months ago

0.19.1

5 months ago

0.18.1

5 months ago

0.18.0

5 months ago

0.17.6

6 months ago

0.17.7

6 months ago

0.17.8

6 months ago

0.17.9

6 months ago

0.17.10

6 months ago

0.17.2

7 months ago

0.13.6

10 months ago

0.17.3

7 months ago

0.13.7

10 months ago

0.17.4

7 months ago

0.17.5

7 months ago

0.15.0

8 months ago

0.17.0

7 months ago

0.17.1

7 months ago

0.16.3

8 months ago

0.14.0

10 months ago

0.14.1

9 months ago

0.16.0

8 months ago

0.14.2

9 months ago

0.16.1

8 months ago

0.16.2

8 months ago

0.13.4

10 months ago

0.13.5

10 months ago

0.13.3

10 months ago

0.13.2

10 months ago

0.13.1

11 months ago

0.13.0

11 months ago

0.12.1

1 year ago

0.12.0

1 year ago

0.11.2

1 year ago

0.11.1

1 year ago

0.11.0

1 year ago

0.10.1

2 years ago

0.10.2

2 years ago

0.10.3

2 years ago

0.10.4

2 years ago

0.10.5

1 year ago

0.10.6

1 year ago

0.10.7

1 year ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.9.1

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.6

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago