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
>