Class: MoneriumOAuthClient
Extends
MoneriumBaseClient
Constructors
new MoneriumOAuthClient()
new MoneriumOAuthClient(
options:MoneriumApiClientOptions):MoneriumOAuthClient
Parameters
| Parameter | Type |
|---|---|
options | MoneriumApiClientOptions |
Returns
Inherited from
MoneriumBaseClient.constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
env | protected | Environment | MoneriumBaseClient.env |
options | protected | MoneriumApiClientOptions | MoneriumBaseClient.options |
transport | protected | Transport | MoneriumBaseClient.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
| Parameter | Type |
|---|---|
options | Omit<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
| Parameter | Type |
|---|---|
options | Omit<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
| Parameter | Type |
|---|---|
options | Omit<BuildSiweAuthorizationUrlOptions, "environment"> |
Returns
string
getAddress()
getAddress(
address:string):Promise<Address>
Get details for a single address after it has been linked to Monerium.
Parameters
| Parameter | Type | Description |
|---|---|---|
address | string | The public key of the blockchain account. |
Returns
Promise<Address>
See
Inherited from
MoneriumBaseClient.getAddress
getAddresses()
getAddresses(
params?:AddressesQueryParams):Promise<AddressesResponse>
Get a list of all addresses linked to the profile.
Parameters
| Parameter | Type |
|---|---|
params? | AddressesQueryParams |
Returns
Promise<AddressesResponse>
See
Inherited from
MoneriumBaseClient.getAddresses
getAuthContext()
getAuthContext():
Promise<AuthContext>
Get the current auth context.
Returns
Promise<AuthContext>
See
Inherited from
MoneriumBaseClient.getAuthContext
getBalances()
getBalances(
params:GetBalancesParams):Promise<Balances>
Get the balances for a given address on a specific chain.
Parameters
| Parameter | Type |
|---|---|
params | GetBalancesParams |
Returns
Promise<Balances>
See
Inherited from
MoneriumBaseClient.getBalances
getIban()
getIban(
iban:string):Promise<IBAN>
Fetch details about a single IBAN.
Parameters
| Parameter | Type | Description |
|---|---|---|
iban | string | The IBAN to fetch. |
Returns
Promise<IBAN>
See
Inherited from
MoneriumBaseClient.getIban
getIbans()
getIbans(
params?:IbansParams):Promise<IBANsResponse>
Fetch all IBANs for the profile.
Parameters
| Parameter | Type |
|---|---|
params? | IbansParams |
Returns
Promise<IBANsResponse>
See
Inherited from
MoneriumBaseClient.getIbans
getOrder()
getOrder(
orderId:string):Promise<Order>
Get an order by its ID.
Parameters
| Parameter | Type |
|---|---|
orderId | string |
Returns
Promise<Order>
See
Inherited from
MoneriumBaseClient.getOrder
getOrders()
getOrders(
params?:OrderParams):Promise<OrdersResponse>
Get a list of orders.
Parameters
| Parameter | Type |
|---|---|
params? | OrderParams |
Returns
Promise<OrdersResponse>
See
Inherited from
MoneriumBaseClient.getOrders
getProfile()
getProfile(
profileId:string):Promise<Profile>
Get a profile by its id.
Parameters
| Parameter | Type | Description |
|---|---|---|
profileId | string | The id of the profile to fetch. |
Returns
Promise<Profile>
See
Inherited from
MoneriumBaseClient.getProfile
getProfiles()
getProfiles(
params?:GetProfilesParams):Promise<ProfilesResponse>
Get all profiles.
Parameters
| Parameter | Type |
|---|---|
params? | GetProfilesParams |
Returns
Promise<ProfilesResponse>
See
Inherited from
MoneriumBaseClient.getProfiles
getSignatures()
getSignatures(
params?:SignaturesParams):Promise<SignaturesResponse>
Get pending signatures for the authenticated user.
Parameters
| Parameter | Type |
|---|---|
params? | SignaturesParams |
Returns
Promise<SignaturesResponse>
See
Inherited from
MoneriumBaseClient.getSignatures
getToken()
protectedgetToken():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
Inherited from
MoneriumBaseClient.getTokens
linkAddress()
linkAddress(
body:LinkAddressInput):Promise<LinkAddressResponse|AcceptedResponse>
Add a new address to the profile.
Parameters
| Parameter | Type |
|---|---|
body | LinkAddressInput |
Returns
Promise<LinkAddressResponse | AcceptedResponse>
- The address was linked successfully or an accepted response if the address is being processed asynchronously.
See
Inherited from
MoneriumBaseClient.linkAddress
moveIban()
moveIban(
input:MoveIbanInput):Promise<AcceptedResponse>
Move an IBAN to a different address and chain.
Parameters
| Parameter | Type |
|---|---|
input | MoveIbanInput |
Returns
Promise<AcceptedResponse>
See
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
codeorerrorto determine if the URL contains an OAuth2 authorization response.
Parameters
| Parameter | Type |
|---|---|
input | string |
Returns
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
| Parameter | Type |
|---|---|
input | PlaceOrderInput |
Returns
Promise<Order | AcceptedResponse>
Order for regular orders; AcceptedResponse for multi-sig orders.
See
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
| Parameter | Type |
|---|---|
options | Omit<RefreshTokenGrantOptions, "environment" | "transport"> |
Returns
Promise<BearerProfile>
request()
protectedrequest<T>(method:string,path:string,body?:unknown,contentType?:string):Promise<T>
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Default value |
|---|---|---|
method | string | undefined |
path | string | undefined |
body? | unknown | undefined |
contentType? | string | 'application/json' |
Returns
Promise<T>
Inherited from
MoneriumBaseClient.request
requestFormData()
protectedrequestFormData<T>(method:string,path:string,form:FormData):Promise<T>
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
method | string |
path | string |
form | FormData |
Returns
Promise<T>
Inherited from
MoneriumBaseClient.requestFormData
requestIban()
requestIban(
input:RequestIbanInput):Promise<AcceptedResponse>
Request an IBAN for the profile.
Parameters
| Parameter | Type |
|---|---|
input | RequestIbanInput |
Returns
Promise<AcceptedResponse>
See
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
| Parameter | Type | Description |
|---|---|---|
file | ArrayBuffer | Uint8Array | Blob | The document to upload. Can be a Blob, Uint8Array, or ArrayBuffer. |
filename? | string | Optional 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
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