Skip to content

@gala-chain/connectAPI


API > PresignedClient

Class: PresignedClient

Use this provider when you simply want to forward presigned requests, or requests that do not require a signature

Contents

Extends

Constructors

new PresignedClient(options)

new PresignedClient(options?): PresignedClient

Parameters

options?: GalaChainProviderOptions

Overrides

GalaChainProvider.constructor

Source

chain-connect/src/customClients/PresignedClient.ts:24

Properties

options

protected options?: GalaChainProviderOptions

Configuration options for the provider

Inherited from

GalaChainProvider.options

Source

chain-connect/src/GalaChainClient.ts:58

Methods

sign()

sign\<U>(_method, payload): Promise\<U & object>

Signs a payload using the provider's signing mechanism.

Type parameters

U extends object

Parameters

_method: string

The method name being called

payload: U & object

The data transfer object to sign

Returns

The signed payload with signature and optional prefix

Overrides

GalaChainProvider.sign

Source

chain-connect/src/customClients/PresignedClient.ts:28


submit()

submit\<T, U>(params): Promise\<GalaChainResponseSuccess\<T>>

Submits a request to the GalaChain network.

Type parameters

T

U extends object

Parameters

params: object

The submission parameters

params.headers?: Record\<string, string>

Additional HTTP headers

params.method: string

The method name to call

params.payload: ConstructorArgs\<U>

The request payload

params.requestConstructor?: ClassConstructor\<ChainCallDTO>

Constructor for request validation

params.responseConstructor?: NonArrayClassConstructor\<T>

Constructor for response transformation

params.sign?: boolean

Whether to sign the request

params.signingType?: SigningType

Type of signing to use

params.url: string

The base URL for the request

Returns

Promise resolving to a successful response

Inherited from

GalaChainProvider.submit

Throws

When the request fails

Source

chain-connect/src/GalaChainClient.ts:93