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

async function initNear() {
const near = await connect({
networkId: 'testnet',
nodeUrl: 'https://rpc.testnet.near.org'
})
}

Index

Interfaces

Functions