Skip to content

New architecture #449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 57 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7abbc0d
wip
eshaben Apr 23, 2025
a690f89
reorganize content to new structure
eshaben Apr 24, 2025
5dc1e37
Merge remote-tracking branch 'origin' into staging-new-ia
eshaben Apr 24, 2025
a149aa9
update llms
eshaben Apr 24, 2025
990adbf
add support for tool selector
eshaben Apr 30, 2025
99c55cc
add logic so the dropdown closes when a user clicks anywhere else on …
eshaben May 1, 2025
66cbbdc
update messaging tutorial .pages file
eshaben May 5, 2025
209f970
move ai resources to a directory
eshaben May 6, 2025
ac88301
Queries - Get Started page (#377)
martin0995 May 6, 2025
02370ff
NTT - Get Started page (#376)
martin0995 May 6, 2025
8c212e0
move tools
eshaben May 9, 2025
7fe8e30
Connect - Get Started page (#375)
dawnkelly09 May 13, 2025
ba6c0da
Messaging - Get Started (#381)
dawnkelly09 May 16, 2025
2d9d111
Queries - Overview (#388)
ilariae May 19, 2025
46a0fe9
Messaging - Overview (#387)
ilariae May 19, 2025
1411849
Multigov - Overview (#397)
ilariae May 19, 2025
cc3b7b9
Pull the latest changes into staging (#404)
eshaben May 19, 2025
2609cea
Multigov - Get Started page (#379)
martin0995 May 19, 2025
086ed52
remove dropdown js used for tools
eshaben May 20, 2025
6c018e6
link fixes (#407)
ilariae May 21, 2025
129ddc0
Typescript SDK - Get Started page (#380)
martin0995 May 21, 2025
50001c0
Token Bridge - Get Started page (#382)
martin0995 May 21, 2025
b363ada
Update Diagrams (#414)
ilariae May 28, 2025
bff4217
Token Bridge Payload Structure (#422)
ilariae May 29, 2025
27797a0
Overview - Token Bridge (#410)
ilariae May 29, 2025
9d01cda
CCTP - Get Started page (#408)
martin0995 May 29, 2025
ef9cba5
Overview - Connect (#412)
Telucero May 29, 2025
bede78c
add supported networks page (#431)
eshaben May 29, 2025
cc7c1df
Taylor/supported methods (#428)
Telucero May 29, 2025
37d1d79
Token Bridge Transfer Flow (#419)
eshaben May 29, 2025
b096f7a
Overview - Native Token Tranfers (#413)
Telucero May 29, 2025
b3fd70a
Overview - Settlement (#420)
ilariae May 29, 2025
0f0325b
Overview - CCTP bridge (#411)
Telucero May 29, 2025
8bd17b3
Updated Get Started with Messaging + Solidity SDK Get Started (#401)
dawnkelly09 May 29, 2025
3f9625b
Solidity SDK temporary clean up (#434)
eshaben May 30, 2025
9007110
Pull in latest changes from main to the staging branch (#436)
eshaben May 30, 2025
356987c
Clean up old pages on the staging branch (#437)
eshaben May 30, 2025
543a4d7
Update the TypeScript SDK section (#433)
eshaben May 30, 2025
f7b307d
Settlement - Get Started page (#378)
martin0995 May 30, 2025
8870c49
use queries page (#432)
ilariae May 30, 2025
4951ec4
Ilariae/todos (#441)
ilariae May 30, 2025
141366c
clean up ntt (#438)
ilariae May 30, 2025
06d7f34
update llms
eshaben May 30, 2025
e715eba
Ilariae/clean up lists (#442)
ilariae May 30, 2025
dde141b
update links (#443)
eshaben May 30, 2025
b92ec39
update llms
eshaben May 30, 2025
0647677
fix a few remaining 404s (#444)
eshaben May 30, 2025
bab713f
update table
eshaben May 30, 2025
3caf3d1
various fixes (#447)
ilariae Jun 6, 2025
1550982
Pull the latest changes in (#451)
eshaben Jun 9, 2025
20c12c8
ecosystem page (#452)
ilariae Jun 9, 2025
da7fb9e
add tables to evm and post deployment (#453)
ilariae Jun 9, 2025
8a1e762
Martinh/connect tutorial update (#454)
martin0995 Jun 9, 2025
08364e8
llms
eshaben Jun 9, 2025
a840f06
Merge branch 'main' into staging-new-ia
eshaben Jun 9, 2025
245b49d
Update broken links (#457)
eshaben Jun 10, 2025
69349aa
llms
eshaben Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
scripts/__pycache__/*
scripts/__pycache__/*
**/.DS_Store
9 changes: 4 additions & 5 deletions .pages
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
nav:
- index.md
- build
- tutorials
- learn
- 'AI Resources': ai-resources.md
- products
- protocol
- tools
- ai-resources

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions .snippets/code/build/transfers/connect/overview/cdn.html

This file was deleted.

This file was deleted.

This file was deleted.

54 changes: 54 additions & 0 deletions .snippets/code/products/cctp-bridge/get-started/snippet-1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import {
ChainAddress,
ChainContext,
Network,
Signer,
Wormhole,
Chain,
} from '@wormhole-foundation/sdk';
import solana from '@wormhole-foundation/sdk/solana';
import sui from '@wormhole-foundation/sdk/sui';
import evm from '@wormhole-foundation/sdk/evm';

/**
* Returns a signer for the given chain using locally scoped credentials.
* The required values (EVM_PRIVATE_KEY, SOL_PRIVATE_KEY, SUI_MNEMONIC) must
* be loaded securely beforehand, for example via a keystore, secrets
* manager, or environment variables (not recommended).
*/
export async function getSigner<N extends Network, C extends Chain>(
chain: ChainContext<N, C>
): Promise<{
chain: ChainContext<N, C>;
signer: Signer<N, C>;
address: ChainAddress<C>;
}> {
let signer: Signer;
const platform = chain.platform.utils()._platform;

switch (platform) {
case 'Evm':
signer = await (
await evm()
).getSigner(await chain.getRpc(), EVM_PRIVATE_KEY!);
break;
case 'Solana':
signer = await (
await solana()
).getSigner(await chain.getRpc(), SOL_PRIVATE_KEY!);
break;
case 'Sui':
signer = await (
await sui()
).getSigner(await chain.getRpc(), SUI_MNEMONIC!);
break;
default:
throw new Error(`Unsupported platform: ${platform}`);
}

return {
chain,
signer: signer as Signer<N, C>,
address: Wormhole.chainAddress(chain.chain, signer.address()),
};
}
56 changes: 56 additions & 0 deletions .snippets/code/products/cctp-bridge/get-started/snippet-2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { CircleTransfer, wormhole } from '@wormhole-foundation/sdk';
import evm from '@wormhole-foundation/sdk/evm';
import solana from '@wormhole-foundation/sdk/solana';
import sui from '@wormhole-foundation/sdk/sui';
import { getSigner } from './helper';

(async function () {
// Initialize the Wormhole object for the Testnet environment and add supported chains (evm, solana and sui)
const wh = await wormhole('Testnet', [evm, solana, sui]);

// Grab chain Contexts -- these hold a reference to a cached rpc client
const sendChain = wh.getChain('Avalanche');
const rcvChain = wh.getChain('Sepolia');

// Get signer from local key
const source = await getSigner(sendChain);
const destination = await getSigner(rcvChain);

// Define the amount of USDC to transfer (in the smallest unit, so 0.1 USDC = 100,000 units assuming 6 decimals)
const amt = 100_000n;

const automatic = false;

// Create the circleTransfer transaction (USDC-only)
const xfer = await wh.circleTransfer(
amt,
source.address,
destination.address,
automatic
);

const quote = await CircleTransfer.quoteTransfer(
sendChain,
rcvChain,
xfer.transfer
);
console.log('Quote: ', quote);

// Step 1: Initiate the transfer on the source chain (Avalanche)
console.log('Starting Transfer');
const srcTxids = await xfer.initiateTransfer(source.signer);
console.log(`Started Transfer: `, srcTxids);

// Step 2: Wait for Circle Attestation (VAA)
const timeout = 120 * 1000; // Timeout in milliseconds (120 seconds)
console.log('Waiting for Attestation');
const attestIds = await xfer.fetchAttestation(timeout);
console.log(`Got Attestation: `, attestIds);

// Step 3: Complete the transfer on the destination chain (Sepolia)
console.log('Completing Transfer');
const dstTxids = await xfer.completeTransfer(destination.signer);
console.log(`Completed Transfer: `, dstTxids);

process.exit(0);
})();
22 changes: 22 additions & 0 deletions .snippets/code/products/cctp-bridge/get-started/snippet-3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div id="termynal" data-termynal>
<span data-ty="input"><span class="file-path"></span>npx tsx transfer.ts</span>
<span data-ty>Starting Transfer</span>
<span data-ty
>Started Transfer:
[ '0xdedbf496a1e658efb15bc57f120122b38a3714a560892be7a8c0a7f23c44aca2',
'0x9a8e41837e225edfa62d1913f850c01bd0552e55bf082fd9225df789455a465a' ]</span
>
<span data-ty> </span>
<span data-ty>Waiting for Attestation</span>
<span data-ty>Retrying Circle:GetAttestation, attempt 0/60</span>
<span data-ty>Retrying Circle:GetAttestation, attempt 1/60</span>
<span data-ty> </span>
<span data-ty>Got Attestation: [{hash: '0x89f8651bf94cfd932ba5bcd2f7795a3fabc6a7c602075fa712c9c55022f5cca8'}]</span>
<span data-ty> </span>
<span data-ty>Completing Transfer</span>
<span data-ty
>Completed Transfer:
[ '0x9b81bb30d2a68aa2ecc707a8a1b5af63448223a69b2ead6cf6d172ab880ad0c9']</span
>
<span data-ty="input"><span class="file-path"></span></span>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ contract CircleIntegration is

// Call the circle bridge and `depositForBurnWithCaller`. The `mintRecipient`
// should be the target contract (or wallet) composing on this contract.
(uint64 nonce, uint256 amountReceived) = _transferTokens(
(uint64 nonce, uint256 amountReceived) = _transferTokens{value: wormholeFee}(
transferParams.token,
transferParams.amount,
transferParams.targetChain,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import './App.css';
import WormholeConnect, {
WormholeConnectConfig,
WormholeConnectTheme,
} from '@wormhole-foundation/wormhole-connect';

function App() {
const config: WormholeConnectConfig = {
// Define the network
network: 'Testnet',

// Define the chains
chains: ['Sui', 'Avalanche'],

// UI configuration
ui: {
title: 'SUI Connect TS Demo',
},
};

const theme: WormholeConnectTheme = {
// Define the theme
mode: 'dark',
primary: '#78c4b6',
};

return <WormholeConnect config={config} theme={theme} />;
}

export default App;
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ import { wormholeConnectHosted } from '@wormhole-foundation/wormhole-connect';

// Existing DOM element where you want to mount Connect
const container = document.getElementById('bridge-container');
if (!container) {
throw new Error("Element with id 'bridge-container' not found");
}

wormholeConnectHosted(container);
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {
wormholeConnectHosted,
} from '@wormhole-foundation/wormhole-connect';

// Existing DOM element where you want to mount Connect
const container = document.getElementById('bridge-container');
if (!container) {
throw new Error("Element with id 'connect' not found");
}

wormholeConnectHosted(container, {
config: {
rpcs: {
// ...
}
},
theme: {
background: {
default: '#004547',
}
}
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use client';

import WormholeConnect from '@wormhole-foundation/wormhole-connect';

const config = {
network: 'Testnet',
chains: ['Sui', 'Avalanche'],
};

const theme = {
mode: 'light',
primary: '#78c4b6',
};

export default function Home() {
return <WormholeConnect config={config} theme={theme} />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use client';

import WormholeConnect, {
WormholeConnectConfig,
WormholeConnectTheme,
} from '@wormhole-foundation/wormhole-connect';

export default function Home() {
const config: WormholeConnectConfig = {
network: 'Testnet',
chains: ['Sui', 'Avalanche'],

ui: {
title: 'SUI Connect TS Demo',
},
};

const theme: WormholeConnectTheme = {
mode: 'light',
primary: '#78c4b6',
};
return <WormholeConnect config={config} theme={theme} />;
}
Loading