Skip to content

Latest commit

 

History

History

next

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SettleMint logo

SettleMint SDK

https://settlemint.com
Integrate SettleMint into your application with ease.

CI status License npm stars

Documentation   •   NPM   •   Issues

Table of Contents

About

The SettleMint Next.js SDK provides a seamless integration layer between Next.js applications and the SettleMint platform. It offers a collection of utilities, hooks, and components specifically designed for Next.js applications, making it easy to interact with SettleMint's services while following Next.js best practices.

API Reference

Functions

HelloWorld()

HelloWorld(props): ReactElement

Defined in: components/test.tsx:16

A simple Hello World component that greets the user.

Parameters
Parameter Type Description
props HelloWorldProps The props for the HelloWorld component.
Returns

ReactElement

A React element that displays a greeting to the user.


proxyMiddleware()

proxyMiddleware(request): undefined | NextResponse<unknown>

Defined in: middlewares/proxy.ts:27

Middleware function to handle proxy requests by adding appropriate authentication headers.

Parameters
Parameter Type Description
request NextRequest The incoming Next.js request to process
Returns

undefined | NextResponse<unknown>

A modified NextResponse with authentication headers for proxy routes, or undefined for non-proxy routes

Throws

Will throw an error if environment validation fails

Example
import { proxyMiddleware } from '@settlemint/sdk-next/middlewares/proxy';

export default function middleware(request: NextRequest) {
  return proxyMiddleware(request);
}

withSettleMint()

withSettleMint<C>(nextConfig, options): Promise<C>

Defined in: config/with-settlemint.ts:22

Modifies the passed in Next.js configuration with SettleMint-specific settings.

Type Parameters
Type Parameter
C extends NextConfig
Parameters
Parameter Type Description
nextConfig C The original Next.js configuration
options WithSettleMintOptions Options for customizing the SettleMint configuration
Returns

Promise<C>

The modified Next.js configuration

Throws

If the SettleMint configuration cannot be read or processed

Interfaces

HelloWorldProps

Defined in: components/test.tsx:6

The props for the HelloWorld component.


WithSettleMintOptions

Defined in: config/with-settlemint.ts:7

Options for configuring the SettleMint configuration.

Properties
Property Type Description Defined in
disabled? boolean Whether to disable the SettleMint configuration. config/with-settlemint.ts:11

Contributing

We welcome contributions from the community! Please check out our Contributing guide to learn how you can help improve the SettleMint SDK through bug reports, feature requests, documentation updates, or code contributions.

License

The SettleMint SDK is released under the FSL Software License. See the LICENSE file for more details.