123456789101112131415161718192021222324252627282930313233 |
- 'use strict'
- const debug = require('debug')('joystream:runtime:system')
- class SystemApi {
- static async create(base) {
- const ret = new SystemApi()
- ret.base = base
- await SystemApi.init()
- return ret
- }
- static async init() {
- debug('Init')
- }
-
- async isDevelopmentChain() {
- const developmentChainName = 'Development'
- const runningChainName = await this.base.api.rpc.system.chain()
- return runningChainName.toString() === developmentChainName
- }
- }
- module.exports = {
- SystemApi,
- }
|