MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
6.15k stars 11.18k forks source link

how can i subscribe transactions? #19907

Open zilongliang opened 1 week ago

zilongliang commented 1 week ago

async function test() { const client = new SuiClient({ transport: new SuiHTTPTransport({ url: 'https://fullnode.mainnet.sui.io:443', websocket: { reconnectTimeout: 1000, url: 'wss://rpc.mainnet.sui.io:443', }, }), });

const unsubscribe = await client.subscribeEvent({ filter: { All: [], }, onMessage(event) { // handle subscription notification message here. This function is called once per subscription message. console.log(event); }, }); }

It currently looks like this subscription method has been abandoned.

Alina-chan commented 1 week ago

Check relevant issue #19493