Skip to content

@gala-chain/apiAPI


API > GalaChainSuccessResponse

Class: GalaChainSuccessResponse<T>

Contents

Extends

Type parameters

T

Constructors

new GalaChainSuccessResponse(data)

new GalaChainSuccessResponse\<T>(data): GalaChainSuccessResponse\<T>

Parameters

data: T

Overrides

GalaChainResponse.constructor

Source

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

Properties

Data

readonly Data: T

Overrides

GalaChainResponse.Data

Source

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


ErrorCode

readonly ErrorCode?: number

Inherited from

GalaChainResponse.ErrorCode

Source

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


ErrorKey

readonly ErrorKey?: string

Inherited from

GalaChainResponse.ErrorKey

Source

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


ErrorPayload

readonly ErrorPayload?: unknown

Inherited from

GalaChainResponse.ErrorPayload

Source

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


Message

readonly Message?: string

Inherited from

GalaChainResponse.Message

Source

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


Status

readonly Status: Success

Overrides

GalaChainResponse.Status

Source

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

Methods

Error()

Error(e)

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

Type parameters

T

Parameters

e: object

e.message?: string

Inherited from

GalaChainResponse.Error

Source

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

Error(e)

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

Type parameters

T

Parameters

e: ChainError

Inherited from

GalaChainResponse.Error

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>

Inherited from

GalaChainResponse.Error

Source

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


Success()

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

Type parameters

T

Parameters

Data: T

Inherited from

GalaChainResponse.Success

Source

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


Wrap()

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

Type parameters

T

Parameters

op: Promise\<T>

Inherited from

GalaChainResponse.Wrap

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>

Inherited from

GalaChainResponse.deserialize

Source

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


isError()

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

Type parameters

T

Parameters

r: GalaChainResponse\<T>

Inherited from

GalaChainResponse.isError

Source

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


isSuccess()

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

Type parameters

T

Parameters

r: GalaChainResponse\<T>

Inherited from

GalaChainResponse.isSuccess

Source

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