Skip to content

@gala-chain/apiAPI


API > GalaChainResponse

Class: abstract GalaChainResponse<T>

Contents

Extended By

Type parameters

T

Constructors

new GalaChainResponse()

new GalaChainResponse\<T>(): GalaChainResponse\<T>

Properties

Data

readonly Data?: T

Source

chain-api/src/types/contract.ts:30


ErrorCode

readonly ErrorCode?: number

Source

chain-api/src/types/contract.ts:27


ErrorKey

readonly ErrorKey?: string

Source

chain-api/src/types/contract.ts:28


ErrorPayload

readonly ErrorPayload?: unknown

Source

chain-api/src/types/contract.ts:29


Message

readonly Message?: string

Source

chain-api/src/types/contract.ts:26


Status

readonly Status: GalaChainResponseType

Source

chain-api/src/types/contract.ts:25

Methods

Error()

Error(e)

static Error\<T>(e): GalaChainResponse\<T>

Type parameters

T

Parameters

e: object

e.message?: string

Source

chain-api/src/types/contract.ts:34

Error(e)

static Error\<T>(e): GalaChainResponse\<T>

Type parameters

T

Parameters

e: ChainError

Source

chain-api/src/types/contract.ts:35

Error(Message, ErrorCode, ErrorKey, ErrorPayload)

static Error\<T>(Message, ErrorCode, ErrorKey, ErrorPayload?): GalaChainResponse\<T>

Type parameters

T

Parameters

Message: string

ErrorCode: number

ErrorKey: string

ErrorPayload?: Record\<string, unknown>

Source

chain-api/src/types/contract.ts:36


Success()

static Success\<T>(Data): GalaChainResponse\<T>

Type parameters

T

Parameters

Data: T

Source

chain-api/src/types/contract.ts:31


Wrap()

static Wrap\<T>(op): Promise\<GalaChainResponse\<T>>

Type parameters

T

Parameters

op: Promise\<T>

Source

chain-api/src/types/contract.ts:56


deserialize()

static deserialize\<T>(constructor, object): GalaChainResponse\<T>

Type parameters

T

Parameters

constructor: undefined | ClassConstructor\<Inferred\<T>>

object: string | Record\<string, unknown>

Source

chain-api/src/types/contract.ts:70


isError()

static isError\<T>(r): r is GalaChainErrorResponse<T>

Type parameters

T

Parameters

r: GalaChainResponse\<T>

Source

chain-api/src/types/contract.ts:66


isSuccess()

static isSuccess\<T>(r): r is GalaChainSuccessResponse<T>

Type parameters

T

Parameters

r: GalaChainResponse\<T>

Source

chain-api/src/types/contract.ts:62