@gala-chain/api ∙ API
API > GalaChainSuccessResponse
Class: GalaChainSuccessResponse<T>
Contents
- Extends
- Type parameters
- Constructors
- new GalaChainSuccessResponse(data)
- Properties
- Data
- ErrorCode
- ErrorKey
- ErrorPayload
- Message
- Status
- Methods
- Error()
- Success()
- Wrap()
- deserialize()
- isError()
- isSuccess()
Extends
Type parameters
▪ T
Constructors
new GalaChainSuccessResponse(data)
new GalaChainSuccessResponse\<
T
>(data
):GalaChainSuccessResponse
\<T
>
Parameters
▪ data: T
Overrides
Source
chain-api/src/types/contract.ts:131
Properties
Data
readonly
Data:T
Overrides
Source
chain-api/src/types/contract.ts:130
ErrorCode
readonly
ErrorCode?:number
Inherited from
Source
chain-api/src/types/contract.ts:27
ErrorKey
readonly
ErrorKey?:string
Inherited from
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
Source
chain-api/src/types/contract.ts:26
Status
readonly
Status:Success
Overrides
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
Source
chain-api/src/types/contract.ts:34
Error(e)
static
Error\<T
>(e
):GalaChainResponse
\<T
>
Type parameters
▪ T
Parameters
▪ e: ChainError
Inherited from
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
Source
chain-api/src/types/contract.ts:36
Success()
static
Success\<T
>(Data
):GalaChainResponse
\<T
>
Type parameters
▪ T
Parameters
▪ Data: T
Inherited from
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
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
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
Source
chain-api/src/types/contract.ts:66
isSuccess()
static
isSuccess\<T
>(r
):r is GalaChainSuccessResponse<T>
Type parameters
▪ T
Parameters
▪ r: GalaChainResponse
\<T
>