Skip to main content

Class: MoneriumOAuthClient

Extends​

  • MoneriumBaseClient

Constructors​

new MoneriumOAuthClient()​

new MoneriumOAuthClient(options: MoneriumApiClientOptions): MoneriumOAuthClient

Parameters​

ParameterType
optionsMoneriumApiClientOptions

Returns​

MoneriumOAuthClient

Inherited from​

MoneriumBaseClient.constructor

Properties​

PropertyModifierTypeInherited from
envprotectedEnvironmentMoneriumBaseClient.env
optionsprotectedMoneriumApiClientOptionsMoneriumBaseClient.options
transportprotectedTransportMoneriumBaseClient.transport

Methods​

authorizationCodeGrant()​

authorizationCodeGrant(options: Omit<AuthorizationCodeGrantOptions, "environment" | "transport">): Promise<BearerProfile>

Exchange an authorization code for tokens. The caller stores the returned BearerProfile — the SDK does not write to any storage.

Parameters​

ParameterType
optionsOmit<AuthorizationCodeGrantOptions, "environment" | "transport">

Returns​

Promise<BearerProfile>


buildAuthorizationUrl()​

buildAuthorizationUrl(options: Omit<BuildAuthorizationUrlOptions, "environment">): string

Build the authorization redirect URL. Returns a URL string — the caller navigates to it. The SDK does not redirect.

Parameters​

ParameterType
optionsOmit<BuildAuthorizationUrlOptions, "environment">

Returns​

string


buildSiweAuthorizationUrl()​

buildSiweAuthorizationUrl(options: Omit<BuildSiweAuthorizationUrlOptions, "environment">): string

Build the SIWE authorization redirect URL. Returns a URL string — the caller navigates to it. The SDK does not redirect.

Parameters​

ParameterType
optionsOmit<BuildSiweAuthorizationUrlOptions, "environment">

Returns​

string


getAddress()​

getAddress(address: string): Promise<Address>

Get details for a single address after it has been linked to Monerium.

Parameters​

ParameterTypeDescription
addressstringThe public key of the blockchain account.

Returns​

Promise<Address>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getAddress


getAddresses()​

getAddresses(params?: AddressesQueryParams): Promise<AddressesResponse>

Get a list of all addresses linked to the profile.

Parameters​

ParameterType
params?AddressesQueryParams

Returns​

Promise<AddressesResponse>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getAddresses


getAuthContext()​

getAuthContext(): Promise<AuthContext>

Get the current auth context.

Returns​

Promise<AuthContext>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getAuthContext


getBalances()​

getBalances(params: GetBalancesParams): Promise<Balances>

Get the balances for a given address on a specific chain.

Parameters​

ParameterType
paramsGetBalancesParams

Returns​

Promise<Balances>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getBalances


getIban()​

getIban(iban: string): Promise<IBAN>

Fetch details about a single IBAN.

Parameters​

ParameterTypeDescription
ibanstringThe IBAN to fetch.

Returns​

Promise<IBAN>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getIban


getIbans()​

getIbans(params?: IbansParams): Promise<IBANsResponse>

Fetch all IBANs for the profile.

Parameters​

ParameterType
params?IbansParams

Returns​

Promise<IBANsResponse>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getIbans


getOrder()​

getOrder(orderId: string): Promise<Order>

Get an order by its ID.

Parameters​

ParameterType
orderIdstring

Returns​

Promise<Order>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getOrder


getOrders()​

getOrders(params?: OrderParams): Promise<OrdersResponse>

Get a list of orders.

Parameters​

ParameterType
params?OrderParams

Returns​

Promise<OrdersResponse>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getOrders


getProfile()​

getProfile(profileId: string): Promise<Profile>

Get a profile by its id.

Parameters​

ParameterTypeDescription
profileIdstringThe id of the profile to fetch.

Returns​

Promise<Profile>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getProfile


getProfiles()​

getProfiles(params?: GetProfilesParams): Promise<ProfilesResponse>

Get all profiles.

Parameters​

ParameterType
params?GetProfilesParams

Returns​

Promise<ProfilesResponse>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getProfiles


getSignatures()​

getSignatures(params?: SignaturesParams): Promise<SignaturesResponse>

Get pending signatures for the authenticated user.

Parameters​

ParameterType
params?SignaturesParams

Returns​

Promise<SignaturesResponse>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getSignatures


getToken()​

protected getToken(): Promise<undefined | string>

Returns​

Promise<undefined | string>

Inherited from​

MoneriumBaseClient.getToken


getTokens()​

getTokens(): Promise<Token[]>

Get Monerium tokens with contract addresses and chain details.

Returns​

Promise<Token[]>

See​

API Documentation

Inherited from​

MoneriumBaseClient.getTokens


linkAddress()​

linkAddress(body: LinkAddressInput): Promise<LinkAddressResponse | AcceptedResponse>

Add a new address to the profile.

Parameters​

ParameterType
bodyLinkAddressInput

Returns​

Promise<LinkAddressResponse | AcceptedResponse>

  • The address was linked successfully or an accepted response if the address is being processed asynchronously.

See​

API Documentation

Inherited from​

MoneriumBaseClient.linkAddress


moveIban()​

moveIban(input: MoveIbanInput): Promise<AcceptedResponse>

Move an IBAN to a different address and chain.

Parameters​

ParameterType
inputMoveIbanInput

Returns​

Promise<AcceptedResponse>

See​

API Documentation

Inherited from​

MoneriumBaseClient.moveIban


parseAuthorizationResponse()​

parseAuthorizationResponse(input: string): ParsedAuthorizationResponse

Parse a callback URL or query string into structured fields.

  • Returns an empty object if none of the expected parameters are present.
  • Check for the presence of code or error to determine if the URL contains an OAuth2 authorization response.

Parameters​

ParameterType
inputstring

Returns​

ParsedAuthorizationResponse

Example​

const { code, error } = client.parseAuthorizationResponse(req.url);
const { code, error } = client.parseAuthorizationResponse('?code=abc&state=xyz');

placeOrder()​

placeOrder(input: PlaceOrderInput): Promise<Order | AcceptedResponse>

Place a new order.

Note: For multi-signature orders, the API returns a 202 Accepted response with { status: 202, statusText: "Accepted" } instead of the full Order object.

Parameters​

ParameterType
inputPlaceOrderInput

Returns​

Promise<Order | AcceptedResponse>

Order for regular orders; AcceptedResponse for multi-sig orders.

See​

API Documentation

Inherited from​

MoneriumBaseClient.placeOrder


refreshTokenGrant()​

refreshTokenGrant(options: Omit<RefreshTokenGrantOptions, "environment" | "transport">): Promise<BearerProfile>

Get a new access token using a refresh token. The caller stores the returned BearerProfile — the SDK does not write to any storage.

Parameters​

ParameterType
optionsOmit<RefreshTokenGrantOptions, "environment" | "transport">

Returns​

Promise<BearerProfile>


request()​

protected request<T>(method: string, path: string, body?: unknown, contentType?: string): Promise<T>

Type Parameters​

Type Parameter
T

Parameters​

ParameterTypeDefault value
methodstringundefined
pathstringundefined
body?unknownundefined
contentType?string'application/json'

Returns​

Promise<T>

Inherited from​

MoneriumBaseClient.request


requestFormData()​

protected requestFormData<T>(method: string, path: string, form: FormData): Promise<T>

Type Parameters​

Type Parameter
T

Parameters​

ParameterType
methodstring
pathstring
formFormData

Returns​

Promise<T>

Inherited from​

MoneriumBaseClient.requestFormData


requestIban()​

requestIban(input: RequestIbanInput): Promise<AcceptedResponse>

Request an IBAN for the profile.

Parameters​

ParameterType
inputRequestIbanInput

Returns​

Promise<AcceptedResponse>

See​

API Documentation

Inherited from​

MoneriumBaseClient.requestIban


uploadSupportingDocument()​

uploadSupportingDocument(file: ArrayBuffer | Uint8Array | Blob, filename?: string): Promise<FilesResponse>

Upload a supporting document for KYC onboarding or order support using multipart/form-data.

Accepts binary data in multiple formats and normalizes it to a Blob internally before sending the request.

Parameters​

ParameterTypeDescription
fileArrayBuffer | Uint8Array | BlobThe document to upload. Can be a Blob, Uint8Array, or ArrayBuffer.
filename?stringOptional filename to associate with the uploaded file. If not provided, a default name will be inferred when possible, otherwise "document" is used.

Returns​

Promise<FilesResponse>

See​

API Documentation

Remarks​

This method constructs a FormData payload internally and sends it to the POST /files endpoint. Consumers do not need to manually create or manage multipart form data.

Inherited from​

MoneriumBaseClient.uploadSupportingDocument