Skip to main content
Version: near-api-js@1.1.0

Class: Connection

connection.Connection

Connects an account to a given network via a given provider

Constructors

constructor

new Connection(networkId, provider, signer, jsvmAccountId)

Parameters

NameType
networkIdstring
providerProvider
signerSigner
jsvmAccountIdstring

Defined in

connection.ts:41

Properties

jsvmAccountId

Readonly jsvmAccountId: string

Defined in

connection.ts:39


networkId

Readonly networkId: string

Defined in

connection.ts:36


provider

Readonly provider: Provider

Defined in

connection.ts:37


signer

Readonly signer: Signer

Defined in

connection.ts:38

Methods

fromConfig

Static fromConfig(config): Connection

Parameters

NameTypeDescription
configanyContains connection info details

Returns

Connection

Defined in

connection.ts:51