🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@dfx.swiss/core

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfx.swiss/core

Framework-agnostic TypeScript SDK for the [DFX.swiss](https://dfx.swiss) API. Provides type definitions, API client, utilities, and validations.

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
2
Created
Source

@dfx.swiss/core

Framework-agnostic TypeScript SDK for the DFX.swiss API. Provides type definitions, API client, utilities, and validations.

Installation

npm install @dfx.swiss/core

Usage

import { DfxApiClient, Blockchain } from '@dfx.swiss/core';

const client = new DfxApiClient({
  apiUrl: 'https://api.dfx.swiss/v1', // optional, this is the default
});

// Authenticate
const message = await client.auth.getSignMessage(walletAddress);
const signIn = await client.auth.authenticate({ address, signature });
client.setToken(signIn.accessToken);

// Use API
const assets = await client.asset.list({ blockchains: [Blockchain.ETHEREUM] });
const user = await client.user.get();

API Client

DfxApiClient provides typed access to all DFX API endpoints:

PropertyDescription
authAuthentication (wallet, email, LNURL)
assetAsset listing and filtering
bankBank operations
bankAccountBank account management
buyBuy transactions
countryCountry data
fiatFiat currencies
kycKYC/compliance workflows
languageLanguage settings
paymentLinksPayment link management
paymentRoutesPayment routing
sellSell transactions
settingsApp settings
supportSupport messaging
swapSwap operations
transactionTransaction history
userUser management

Custom fetch

For server-side usage or testing, inject a custom fetch function:

const client = new DfxApiClient({
  fetchFn: customFetch,
});

Compatibility

Requires a global fetch implementation (Node.js 18+ or browser). The package uses DOM APIs (File, FileReader, Blob) for file handling — ensure your environment supports these or polyfill as needed.

License

MIT

FAQs

Package last updated on 29 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts