You can use Bond JS SDK to connect with a profile.
// bondHub is an authenticatedconstprofileId='1';constreferralResult=awaitbondHub.referredBy(profileId) console.log(`referralResult transaction is relayed by proxy id: {referralResult.txHash}`)
// bondHub is an authenticatedconsthandle='yourHandleName';constfollowResult=awaitbondHub.follow(profileId) console.log(`followResult transaction is relayed by proxy id: {followResult.txHash}`)
You can aslo connect with a profile in seperate steps:
import { ConnectType } from'@bondlab/client'// bondHub is an authenticatedconstprofileId='1';constconnectionType=ConnectType.REFERRAL;constconnectTypedData=awaitbondHub.createConnectTypedData({ profileId, type: connectionType }) // sign with the walletconstsignedTypedData=awaitwallet._signTypedData(connectTypedData.typedData.domain,connectTypedData.typedData.types,connectTypedData.typedData.value);constconnectResult=awaitbondHub.connect({ id:connectTypedData.id, type: connectionType, signature: signedTypedData,});