
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
@hyperionxyz/bridge
Advanced tools
A TypeScript SDK for bridging tokens between Aptos and BSC (Binance Smart Chain) networks using the Hyperion bridge infrastructure.
A TypeScript SDK for bridging tokens between Aptos and BSC (Binance Smart Chain) networks using the Hyperion bridge infrastructure.
pnpm install @hyperionxyz/bridge
import { HyperionBridge, TOKENS } from "@hyperionxyz/bridge";
const bridge = new HyperionBridge();
// Bridge from Aptos to BSC
const quoteBridge = bridge.createQuoteSendPayloadFromAptosToBSC({
token: TOKENS[0], // RION token
amount: 100,
sender: "0x...", // Aptos sender address
recipient: "0x...", // BSC recipient address
});
// Get quote from Aptos client
const quoteResult = await aptosClient.view({ payload: quoteBridge });
// Create bridge transaction
const bridgePayload = bridge.createBridgePayloadFromAptosToBSC(
{
token: TOKENS[0],
amount: 100,
sender: "0x...",
recipient: "0x...",
},
quoteResult
);
// Submit transaction
const tx = await wallet.signAndSubmitTransaction({
data: bridgePayload,
});
The main class for interacting with the Hyperion bridge.
const bridge = new HyperionBridge();
addToken(token: BridgeToken)Add a custom token to the bridge.
bridge.addToken({
name: "Custom Token",
symbol: "CTK",
chain: {
aptos: {
address: "0x...",
oftContractAddress: "0x...",
logo: "https://...",
decimals: 8,
},
bsc: {
address: "0x...",
decimals: 18,
},
},
});
createQuoteSendPayloadFromAptosToBSC(args: BridgeArgs): InputViewFunctionDataCreates a quote payload for bridging from Aptos to BSC.
Parameters:
args.token - The token to bridgeargs.amount - Amount to bridgeargs.sender - Aptos sender addressargs.recipient - BSC recipient addressReturns: View function payload for getting bridge quotes
createBridgePayloadFromAptosToBSC(args: BridgeArgs, quoteResult: any[]): InputGenerateTransactionPayloadDataCreates the actual bridge transaction payload from Aptos to BSC.
Parameters:
args - Bridge arguments (same as quote)quoteResult - Result from the quote view functionReturns: Transaction payload for bridge execution
createQuoteSendPayloadFromBSCToAptos(args: BridgeArgs)Creates a quote payload for bridging from BSC to Aptos.
Returns: Contract call configuration for BSC quote
createBridgePayloadFromBSCToAptos(args: BridgeArgs, quoteResult: any)Creates the actual bridge transaction payload from BSC to Aptos.
Parameters:
args - Bridge argumentsquoteResult - Result from the BSC quote callReturns: Contract call configuration for BSC bridge execution
interface BridgeToken {
name: string;
symbol: string;
chain: {
aptos: {
address: string;
oftContractAddress: string;
logo: string;
decimals: number;
};
bsc: {
address: string;
decimals: number;
};
};
}
type BridgeArgs = {
token: BridgeToken;
amount: number;
sender: string;
recipient: string;
};
The bridge comes with pre-configured support for:
Access supported tokens via:
import { TOKENS } from "@hyperionxyz/bridge";
console.log(TOKENS); // Array of supported tokens
import { HyperionBridge, TOKENS } from "@hyperionxyz/bridge";
import { AptosConfig, Aptos, Network } from "@aptos-labs/ts-sdk";
const aptosConfig = new AptosConfig({ network: Network.MAINNET });
const aptosClient = new Aptos(aptosConfig);
const bridge = new HyperionBridge();
async function bridgeAptosToBSC() {
// 1. Create quote payload
const quotePayload = bridge.createQuoteSendPayloadFromAptosToBSC({
token: TOKENS[0],
amount: 100,
sender: "0x123...", // Your Aptos address
recipient: "0x456...", // BSC recipient address
});
// 2. Get quote
const quoteResult = await aptosClient.view({ payload: quotePayload });
console.log("Bridge fee:", quoteResult[0]);
// 3. Create bridge transaction
const bridgePayload = bridge.createBridgePayloadFromAptosToBSC(
{
token: TOKENS[0],
amount: 100,
sender: "0x123...",
recipient: "0x456...",
},
quoteResult
);
// 4. Submit transaction (requires wallet integration)
// const tx = await wallet.signAndSubmitTransaction({
// data: bridgePayload,
// });
return bridgePayload;
}
import { HyperionBridge, TOKENS } from "@hyperionxyz/bridge";
import { useReadContract, useWriteContract } from "wagmi";
const bridge = new HyperionBridge();
async function bridgeBSCToAptos() {
// 1. Create quote payload
const quoteConfig = bridge.createQuoteSendPayloadFromBSCToAptos({
token: TOKENS[0],
amount: 100,
sender: "0x123...", // BSC sender address
recipient: "0x456...", // Aptos recipient address
});
// 2. Get quote (using wagmi or web3 library)
const { data: quoteResult } = useReadContract(quoteConfig);
// 3. Create bridge transaction
const bridgeConfig = bridge.createBridgePayloadFromBSCToAptos(
{
token: TOKENS[0],
amount: 100,
sender: "0x123...",
recipient: "0x456...",
},
quoteResult
);
// 4. Execute bridge transaction
const { writeContractAsync } = useWriteContract();
const tx = await writeContractAsync(bridgeConfig);
console.log("tx", tx);
}
@aptos-labs/ts-sdk: Aptos TypeScript SDKaptos-tool: Aptos utilitiesbignumber.js: Precision arithmeticbuffer: Node.js Buffer polyfillApache-2.0
For issues and questions, please visit the GitHub repository.
FAQs
A TypeScript SDK for bridging tokens between Aptos and BSC (Binance Smart Chain) networks using the Hyperion bridge infrastructure.
The npm package @hyperionxyz/bridge receives a total of 3 weekly downloads. As such, @hyperionxyz/bridge popularity was classified as not popular.
We found that @hyperionxyz/bridge demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.