Connect to NEAR using the provided configuration.
ConnectConfig#networkId and ConnectConfig#nodeUrl are required.
To sign transactions you can also pass: ConnectConfig#keyStore
Both are passed they are prioritize in that order.
ConnectConfig
async function initNear() { const near = await connect({ networkId: 'testnet', nodeUrl: 'https://rpc.testnet.near.org' })} Copy
async function initNear() { const near = await connect({ networkId: 'testnet', nodeUrl: 'https://rpc.testnet.near.org' })}
Connect to NEAR using the provided configuration.
ConnectConfig#networkId and ConnectConfig#nodeUrl are required.
To sign transactions you can also pass: ConnectConfig#keyStore
Both are passed they are prioritize in that order.
See
ConnectConfig
Example