near-api-js
Advanced tools
Comparing version 5.0.0-next.6 to 5.0.0-next.7
export { stringifyJsonOrBytes, Action, AccessKey, AccessKeyPermission, AddKey, CreateAccount, DeleteAccount, DeleteKey, DeployContract, FullAccessPermission, FunctionCall, FunctionCallPermission, Stake, Transfer, SCHEMA, createTransaction, signTransaction, Signature, SignedTransaction, Transaction, encodeSignedDelegate, encodeDelegateAction, encodeTransaction } from '@near-js/transactions'; | ||
import { PublicKey } from '@near-js/crypto'; | ||
import { AccessKey, stringifyJsonOrBytes } from '@near-js/transactions'; | ||
export declare const addKey: (publicKey: PublicKey, accessKey: AccessKey) => import("@near-js/transactions").Action; | ||
export declare const createAccount: () => import("@near-js/transactions").Action; | ||
export declare const deleteAccount: (beneficiaryId: string) => import("@near-js/transactions").Action; | ||
export declare const deleteKey: (publicKey: PublicKey) => import("@near-js/transactions").Action; | ||
export declare const deployContract: (code: Uint8Array) => import("@near-js/transactions").Action; | ||
export declare const fullAccessKey: () => AccessKey; | ||
export declare const functionCall: (methodName: string, args: object | Uint8Array, gas: bigint, deposit: bigint, stringify?: typeof stringifyJsonOrBytes, jsContract?: boolean) => import("@near-js/transactions").Action; | ||
export declare const functionCallAccessKey: (receiverId: string, methodNames: string[], allowance?: bigint) => AccessKey; | ||
export declare const stake: (stake: bigint, publicKey: PublicKey) => import("@near-js/transactions").Action; | ||
export declare const transfer: (deposit: bigint) => import("@near-js/transactions").Action; | ||
export declare const addKey: (publicKey: PublicKey, accessKey: AccessKey) => any; | ||
export declare const createAccount: () => any; | ||
export declare const deleteAccount: (beneficiaryId: string) => any; | ||
export declare const deleteKey: (publicKey: PublicKey) => any; | ||
export declare const deployContract: (code: Uint8Array) => any; | ||
export declare const fullAccessKey: () => any; | ||
export declare const functionCall: (methodName: string, args: object | Uint8Array, gas: bigint, deposit: bigint, stringify?: any, jsContract?: boolean) => any; | ||
export declare const functionCallAccessKey: (receiverId: string, methodNames: string[], allowance?: bigint) => any; | ||
export declare const stake: (stake: bigint, publicKey: PublicKey) => any; | ||
export declare const transfer: (deposit: bigint) => any; | ||
//# sourceMappingURL=transaction.d.ts.map |
@@ -1,1 +0,1 @@ | ||
export { Account, } from '@near-js/accounts'; | ||
export { Account, AccountBalance, AccountAuthorizedApp, SignAndSendTransactionOptions, FunctionCallOptions, ChangeFunctionCallOptions, ViewFunctionCallOptions, } from '@near-js/accounts'; |
@@ -62,10 +62,14 @@ /** | ||
export async function connect(config) { | ||
// @ts-expect-error subclass fields | ||
if (config.logger === false) { | ||
// disables logging | ||
Logger.overrideLogger(undefined); | ||
// @ts-expect-error subclass fields | ||
} | ||
else if (config.logger !== undefined && config.logger !== null) { | ||
// @ts-expect-error subclass fields | ||
Logger.overrideLogger(config.logger); | ||
} | ||
// Try to find extra key in `KeyPath` if provided. | ||
// @ts-expect-error subclass fields | ||
if (config.keyPath && (config.keyStore || config.deps?.keyStore)) { | ||
@@ -78,8 +82,13 @@ try { | ||
const keyPathStore = new InMemoryKeyStore(); | ||
// @ts-expect-error subclass fields | ||
await keyPathStore.setKey(config.networkId, accountKeyFile[0], keyPair); | ||
// @ts-expect-error subclass fields | ||
if (!config.masterAccount) { | ||
// @ts-expect-error subclass fields | ||
config.masterAccount = accountKeyFile[0]; | ||
} | ||
// @ts-expect-error subclass fields | ||
config.keyStore = new MergeKeyStore([ | ||
keyPathStore, | ||
// @ts-expect-error subclass fields | ||
config.keyStore || config.deps?.keyStore | ||
@@ -86,0 +95,0 @@ ], { writeKeyStoreIndex: 1 }); |
@@ -1,1 +0,1 @@ | ||
export { Contract } from '@near-js/accounts'; | ||
export { Contract, ContractMethods } from '@near-js/accounts'; |
@@ -1,1 +0,1 @@ | ||
export { Near } from '@near-js/wallet-account'; | ||
export { Near, NearConfig } from '@near-js/wallet-account'; |
/** @hidden @module */ | ||
import { Provider, getTransactionLastResult, FinalExecutionStatusBasic } from './provider'; | ||
import { Provider, FinalExecutionOutcome, ExecutionOutcomeWithId, getTransactionLastResult, FinalExecutionStatus, FinalExecutionStatusBasic } from './provider'; | ||
import { JsonRpcProvider, TypedError, ErrorContext } from './json-rpc-provider'; | ||
import { FailoverRpcProvider } from './failover-rpc-provider'; | ||
export { Provider, JsonRpcProvider, FailoverRpcProvider, FinalExecutionStatusBasic, getTransactionLastResult, TypedError, ErrorContext }; | ||
export { Provider, FinalExecutionOutcome, JsonRpcProvider, FailoverRpcProvider, ExecutionOutcomeWithId, FinalExecutionStatus, FinalExecutionStatusBasic, getTransactionLastResult, TypedError, ErrorContext }; |
export { getTransactionLastResult } from '@near-js/utils'; | ||
export { Provider } from '@near-js/providers'; | ||
export { IdType, ExecutionStatusBasic, FinalExecutionStatusBasic, } from '@near-js/types'; | ||
export { IdType, LightClientBlockLiteView, LightClientProof, LightClientProofRequest, NextLightClientBlockRequest, NextLightClientBlockResponse, AccessKeyWithPublicKey, BlockHash, BlockChange, BlockChangeResult, BlockHeader, BlockHeaderInnerLiteView, BlockHeight, BlockId, BlockReference, BlockResult, BlockShardId, ChangeResult, Chunk, ChunkHash, ChunkHeader, ChunkId, ChunkResult, Finality, GasPrice, MerkleNode, MerklePath, NearProtocolConfig, NearProtocolRuntimeConfig, NodeStatusResult, ShardId, SyncInfo, TotalWeight, ProviderTransaction as Transaction, CallFunctionRequest, RpcQueryRequest, ViewAccessKeyListRequest, ViewAccessKeyRequest, ViewAccountRequest, ViewCodeRequest, ViewStateRequest, AccessKeyInfoView, AccessKeyList, AccessKeyView, AccessKeyViewRaw, AccountView, CodeResult, ContractCodeView, ExecutionError, ExecutionOutcome, ExecutionOutcomeWithId, ExecutionOutcomeWithIdView, ExecutionStatus, ExecutionStatusBasic, FinalExecutionOutcome, FinalExecutionStatus, FinalExecutionStatusBasic, FunctionCallPermissionView, QueryResponseKind, ViewStateResult, CurrentEpochValidatorInfo, EpochValidatorInfo, NextEpochValidatorInfo, ValidatorStakeView, } from '@near-js/types'; |
export { stringifyJsonOrBytes, Action, AccessKey, AccessKeyPermission, AddKey, CreateAccount, DeleteAccount, DeleteKey, DeployContract, FullAccessPermission, FunctionCall, FunctionCallPermission, Stake, Transfer, SCHEMA, createTransaction, signTransaction, Signature, SignedTransaction, Transaction, encodeSignedDelegate, encodeDelegateAction, encodeTransaction } from '@near-js/transactions'; | ||
import { PublicKey } from '@near-js/crypto'; | ||
import { AccessKey, stringifyJsonOrBytes } from '@near-js/transactions'; | ||
export declare const addKey: (publicKey: PublicKey, accessKey: AccessKey) => import("@near-js/transactions").Action; | ||
export declare const createAccount: () => import("@near-js/transactions").Action; | ||
export declare const deleteAccount: (beneficiaryId: string) => import("@near-js/transactions").Action; | ||
export declare const deleteKey: (publicKey: PublicKey) => import("@near-js/transactions").Action; | ||
export declare const deployContract: (code: Uint8Array) => import("@near-js/transactions").Action; | ||
export declare const fullAccessKey: () => AccessKey; | ||
export declare const functionCall: (methodName: string, args: object | Uint8Array, gas: bigint, deposit: bigint, stringify?: typeof stringifyJsonOrBytes, jsContract?: boolean) => import("@near-js/transactions").Action; | ||
export declare const functionCallAccessKey: (receiverId: string, methodNames: string[], allowance?: bigint) => AccessKey; | ||
export declare const stake: (stake: bigint, publicKey: PublicKey) => import("@near-js/transactions").Action; | ||
export declare const transfer: (deposit: bigint) => import("@near-js/transactions").Action; | ||
export declare const addKey: (publicKey: PublicKey, accessKey: AccessKey) => any; | ||
export declare const createAccount: () => any; | ||
export declare const deleteAccount: (beneficiaryId: string) => any; | ||
export declare const deleteKey: (publicKey: PublicKey) => any; | ||
export declare const deployContract: (code: Uint8Array) => any; | ||
export declare const fullAccessKey: () => any; | ||
export declare const functionCall: (methodName: string, args: object | Uint8Array, gas: bigint, deposit: bigint, stringify?: any, jsContract?: boolean) => any; | ||
export declare const functionCallAccessKey: (receiverId: string, methodNames: string[], allowance?: bigint) => any; | ||
export declare const stake: (stake: bigint, publicKey: PublicKey) => any; | ||
export declare const transfer: (deposit: bigint) => any; | ||
//# sourceMappingURL=transaction.d.ts.map |
@@ -1,1 +0,1 @@ | ||
export { KeyPair, KeyPairEd25519, KeyType, PublicKey, } from '@near-js/crypto'; | ||
export { KeyPair, KeyPairEd25519, KeyType, PublicKey, Signature, } from '@near-js/crypto'; |
@@ -1,1 +0,1 @@ | ||
export { diffEpochValidators, findSeatPrice, } from '@near-js/utils'; | ||
export { diffEpochValidators, findSeatPrice, ChangedValidatorInfo, EpochValidatorsDiff, } from '@near-js/utils'; |
{ | ||
"name": "near-api-js", | ||
"description": "JavaScript library to interact with NEAR Protocol via RPC API", | ||
"version": "5.0.0-next.6", | ||
"version": "5.0.0-next.7", | ||
"repository": { | ||
@@ -10,3 +10,3 @@ "type": "git", | ||
"homepage": "https://github.com/near/near-api-js", | ||
"main": "lib/esm/index.js", | ||
"main": "./lib/commonjs/index.cjs", | ||
"browser": "lib/commonjs/browser-index.cjs", | ||
@@ -20,13 +20,13 @@ "types": "lib/esm/index.d.ts", | ||
"near-abi": "0.1.1", | ||
"@near-js/accounts": "1.3.0-next.6", | ||
"@near-js/keystores-node": "0.1.0-next.6", | ||
"@near-js/keystores": "0.2.0-next.6", | ||
"@near-js/providers": "1.0.0-next.6", | ||
"@near-js/keystores-browser": "0.2.0-next.6", | ||
"@near-js/crypto": "1.4.0-next.6", | ||
"@near-js/signers": "0.2.0-next.6", | ||
"@near-js/transactions": "1.3.0-next.6", | ||
"@near-js/types": "1.0.0-next.6", | ||
"@near-js/wallet-account": "1.3.0-next.6", | ||
"@near-js/utils": "1.0.0-next.6" | ||
"@near-js/crypto": "1.4.0-next.7", | ||
"@near-js/accounts": "1.3.0-next.7", | ||
"@near-js/keystores-browser": "0.2.0-next.7", | ||
"@near-js/keystores": "0.2.0-next.7", | ||
"@near-js/keystores-node": "0.1.0-next.7", | ||
"@near-js/providers": "1.0.0-next.7", | ||
"@near-js/signers": "0.2.0-next.7", | ||
"@near-js/transactions": "1.3.0-next.7", | ||
"@near-js/wallet-account": "1.3.0-next.7", | ||
"@near-js/types": "1.0.0-next.7", | ||
"@near-js/utils": "1.0.0-next.7" | ||
}, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
101458
1095
0
+ Added@near-js/accounts@1.3.0-next.7(transitive)
+ Added@near-js/crypto@1.4.0-next.7(transitive)
+ Added@near-js/keystores@0.2.0-next.7(transitive)
+ Added@near-js/keystores-browser@0.2.0-next.7(transitive)
+ Added@near-js/keystores-node@0.1.0-next.7(transitive)
+ Added@near-js/providers@1.0.0-next.7(transitive)
+ Added@near-js/signers@0.2.0-next.7(transitive)
+ Added@near-js/transactions@1.3.0-next.7(transitive)
+ Added@near-js/types@1.0.0-next.7(transitive)
+ Added@near-js/utils@1.0.0-next.7(transitive)
+ Added@near-js/wallet-account@1.3.0-next.7(transitive)
- Removed@near-js/accounts@1.3.0-next.6(transitive)
- Removed@near-js/crypto@1.4.0-next.6(transitive)
- Removed@near-js/keystores@0.2.0-next.6(transitive)
- Removed@near-js/keystores-browser@0.2.0-next.6(transitive)
- Removed@near-js/keystores-node@0.1.0-next.6(transitive)
- Removed@near-js/providers@1.0.0-next.6(transitive)
- Removed@near-js/signers@0.2.0-next.6(transitive)
- Removed@near-js/transactions@1.3.0-next.6(transitive)
- Removed@near-js/types@1.0.0-next.6(transitive)
- Removed@near-js/utils@1.0.0-next.6(transitive)
- Removed@near-js/wallet-account@1.3.0-next.6(transitive)
Updated@near-js/crypto@1.4.0-next.7
Updated@near-js/types@1.0.0-next.7
Updated@near-js/utils@1.0.0-next.7