Module: browserConnect
Connect to NEAR using the provided configuration.
networkId and nodeUrl are required.
To sign transactions you can also pass: keyStore
Both are passed they are prioritize in that order.
See
Example
async function initNear() {
const near = await connect({
networkId: 'testnet',
nodeUrl: 'https://rpc.testnet.near.org'
})
}
Interfaces
Functions
connect
connect(config
): Promise
<Near
>
Initialize connection to Near network.
Parameters
Name | Type |
---|---|
config | ConnectConfig |
Returns
Promise
<Near
>