Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 835 Bytes

File metadata and controls

38 lines (25 loc) · 835 Bytes

Unigox JavaScript SDK

Minimal JavaScript / Node.js helper for:

  • POST /api/v1/partner/orders/{order_id}/authorize-crypto-transfer

This SDK is intentionally simple:

  • one file
  • one main helper: authorizeCryptoTransfer(...)

Dependency

npm install ethers

File

  • partner_authorize_crypto_transfer_sdk.js

Usage

const { authorizeCryptoTransfer } = require('./partner_authorize_crypto_transfer_sdk');

const result = await authorizeCryptoTransfer({
  apiUrl: 'https://api-staging.unigox.com',
  apiKey: 'your_api_key',
  orderId: 'your_order_id',
  privateKey: 'your_private_key',
});

Notes

  • The private key never leaves your machine or server.
  • The SDK fetches transfer authorization parameters from the API, signs the EIP-712 payload locally, and submits the signed request.