🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@cawabunga_aurora/bridge-sdk

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cawabunga_aurora/bridge-sdk

The Bridge SDK for Defuse Protocol provides a comprehensive set of tools for interacting with various bridge implementations. It simplifies the process of transferring assets between different blockchains.

latest
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

@cawabunga_aurora/bridge-sdk

The Bridge SDK for Defuse Protocol provides a comprehensive set of tools for interacting with various bridge implementations. It simplifies the process of transferring assets between different blockchains.

Features

  • Support for multiple bridge implementations (Direct, Hot, POA)
  • Withdrawal functionality (single and batch)
  • Intent-based operations with customizable signers and relayers
  • Fee estimation and validation
  • TypeScript support with comprehensive type definitions

Installation

# Using npm
npm install @cawabunga_aurora/bridge-sdk

# Using yarn
yarn add @cawabunga_aurora/bridge-sdk

# Using pnpm
pnpm add @cawabunga_aurora/bridge-sdk

# Using bun
bun add @cawabunga_aurora/bridge-sdk

Quick Start

import { BridgeSDK } from '@cawabunga_aurora/bridge-sdk';

// Initialize the SDK with appropriate bridges and intent handlers
const sdk = new BridgeSDK({
  bridges: [...],
  intentRelayer: {...},
  intentSigner: {...}
});

// Create a withdrawal
const withdrawal = sdk.createWithdrawal({
  withdrawalParams: {
    // withdrawal parameters
  }
});

// Execute the withdrawal
const result = await withdrawal.execute();

Development

Prerequisites

  • Bun (v1.2.13 or later)

Setup

# Install dependencies
bun install

Build

bun run build

Development Mode

bun run dev

Lint

bun run lint

Format

bun run format

Advanced Usage

Working with Different Bridge Types

The SDK supports multiple bridge implementations:

import { 
  DirectBridge, 
  HotBridge, 
  PoaBridge 
} from '@cawabunga_aurora/bridge-sdk';

// Initialize a direct bridge
const directBridge = new DirectBridge({...});

// Initialize a hot bridge
const hotBridge = new HotBridge({...});

// Initialize a POA bridge
const poaBridge = new PoaBridge({...});

// Use in the SDK
const sdk = new BridgeSDK({
  bridges: [directBridge, hotBridge, poaBridge],
  // ...other config
});

Batch Withdrawals

const batchWithdrawal = sdk.createBatchWithdrawals({
  withdrawalParams: [
    // multiple withdrawal parameter objects
  ]
});

const results = await batchWithdrawal.execute();

Custom Intent Handling

The SDK allows for custom intent payload and relay parameter factories:

const withdrawal = sdk.createWithdrawal({
  withdrawalParams: {...},
  intent: {
    payload: (params) => { /* custom payload logic */ },
    relayParams: (params) => { /* custom relay params logic */ }
  }
});

License

MIT

FAQs

Package last updated on 17 Jun 2025

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