near-api-js
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -10,3 +10,23 @@ import { Near, NearConfig } from './near'; | ||
* Initialize connection to Near network. | ||
* @param config The configuration object for connecting to NEAR Protocol. | ||
* @returns A Promise that resolves to a `Near` object representing the connection. | ||
* | ||
* @example | ||
* ```js | ||
* const connectionConfig = { | ||
* networkId: 'testnet', | ||
* nodeUrl: 'https://rpc.testnet.near.org', | ||
* walletUrl: 'https://wallet.testnet.near.org', | ||
* helperUrl: 'https://helper.testnet.near.org', | ||
* keyStore: new InMemoryKeyStore(), | ||
* deps: { keyStore: new BrowserLocalStorageKeyStore() }, | ||
* logger: true, | ||
* keyPath: '/path/to/account-key.json', | ||
* masterAccount: 'master-account.near', | ||
* }; | ||
* | ||
* const nearConnection = await connect(connectionConfig); | ||
* console.log(nearConnection); // Near object representing the connection | ||
* ``` | ||
*/ | ||
export declare function connect(config: ConnectConfig): Promise<Near>; |
@@ -52,2 +52,22 @@ "use strict"; | ||
* Initialize connection to Near network. | ||
* @param config The configuration object for connecting to NEAR Protocol. | ||
* @returns A Promise that resolves to a `Near` object representing the connection. | ||
* | ||
* @example | ||
* ```js | ||
* const connectionConfig = { | ||
* networkId: 'testnet', | ||
* nodeUrl: 'https://rpc.testnet.near.org', | ||
* walletUrl: 'https://wallet.testnet.near.org', | ||
* helperUrl: 'https://helper.testnet.near.org', | ||
* keyStore: new InMemoryKeyStore(), | ||
* deps: { keyStore: new BrowserLocalStorageKeyStore() }, | ||
* logger: true, | ||
* keyPath: '/path/to/account-key.json', | ||
* masterAccount: 'master-account.near', | ||
* }; | ||
* | ||
* const nearConnection = await connect(connectionConfig); | ||
* console.log(nearConnection); // Near object representing the connection | ||
* ``` | ||
*/ | ||
@@ -54,0 +74,0 @@ function connect(config) { |
{ | ||
"name": "near-api-js", | ||
"description": "JavaScript library to interact with NEAR Protocol via RPC API", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"repository": { | ||
@@ -23,13 +23,13 @@ "type": "git", | ||
"@noble/curves": "1.2.0", | ||
"@near-js/accounts": "1.0.2", | ||
"@near-js/crypto": "1.2.0", | ||
"@near-js/keystores": "0.0.8", | ||
"@near-js/keystores-browser": "0.0.8", | ||
"@near-js/keystores-node": "0.0.8", | ||
"@near-js/providers": "0.0.10", | ||
"@near-js/signers": "0.1.0", | ||
"@near-js/transactions": "1.1.0", | ||
"@near-js/accounts": "1.0.3", | ||
"@near-js/crypto": "1.2.1", | ||
"@near-js/keystores": "0.0.9", | ||
"@near-js/keystores-browser": "0.0.9", | ||
"@near-js/keystores-node": "0.0.9", | ||
"@near-js/providers": "0.1.0", | ||
"@near-js/signers": "0.1.1", | ||
"@near-js/transactions": "1.1.1", | ||
"@near-js/types": "0.0.4", | ||
"@near-js/utils": "0.0.5", | ||
"@near-js/wallet-account": "1.0.2" | ||
"@near-js/utils": "0.1.0", | ||
"@near-js/wallet-account": "1.1.0" | ||
}, | ||
@@ -53,3 +53,4 @@ "devDependencies": { | ||
"ts-jest": "26.5.6", | ||
"uglifyify": "5.0.1" | ||
"uglifyify": "5.0.1", | ||
"near-workspaces": "3.4.0" | ||
}, | ||
@@ -56,0 +57,0 @@ "keywords": [], |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2624615
50317
18
+ Added@near-js/accounts@1.0.3(transitive)
+ Added@near-js/crypto@1.2.1(transitive)
+ Added@near-js/keystores@0.0.9(transitive)
+ Added@near-js/keystores-browser@0.0.9(transitive)
+ Added@near-js/keystores-node@0.0.9(transitive)
+ Added@near-js/providers@0.1.0(transitive)
+ Added@near-js/signers@0.1.1(transitive)
+ Added@near-js/transactions@1.1.1(transitive)
+ Added@near-js/utils@0.1.0(transitive)
+ Added@near-js/wallet-account@1.1.0(transitive)
- Removed@near-js/accounts@1.0.2(transitive)
- Removed@near-js/crypto@1.2.0(transitive)
- Removed@near-js/keystores@0.0.8(transitive)
- Removed@near-js/keystores-browser@0.0.8(transitive)
- Removed@near-js/keystores-node@0.0.8(transitive)
- Removed@near-js/providers@0.0.10(transitive)
- Removed@near-js/signers@0.1.0(transitive)
- Removed@near-js/transactions@1.1.0(transitive)
- Removed@near-js/utils@0.0.5(transitive)
- Removed@near-js/wallet-account@1.0.2(transitive)
Updated@near-js/accounts@1.0.3
Updated@near-js/crypto@1.2.1
Updated@near-js/keystores@0.0.9
Updated@near-js/providers@0.1.0
Updated@near-js/signers@0.1.1
Updated@near-js/transactions@1.1.1
Updated@near-js/utils@0.1.0