import { APIClient } from '../api_client' ; import { apiMethod } from '../api_method' ; import { APIResource } from '../api_resource' ; import { APIHandler } from '../api_types' ; import { GET , PUT } from '../constants' ; export class NodeResource extends APIResource { public getConstants : APIHandler ; public getForgingStatus : APIHandler ; public getStatus : APIHandler ; public getTransactions : APIHandler ; public path : string ; public updateForgingStatus : APIHandler ; public constructor ( apiClient ) { super ( apiClient ) ; this . path = '/node' ; this . getConstants = apiMethod ( { method : GET , path : '/constants' , } ) . bind ( this ) ; this . getStatus = apiMethod ( { method : GET , path : '/status' , } ) . bind ( this ) ; this . getForgingStatus = apiMethod ( { method : GET , path : '/status/forging' , } ) . bind ( this ) ; this . updateForgingStatus = apiMethod ( { method : PUT , path : '/status/forging' , } ) . bind ( this ) ; this . getTransactions = apiMethod ( { method : GET , path : '/transactions/{state}' , urlParams : [ 'state' ] , } ) . bind ( this ) ; } }