import { A as Action, a as AccessKey, D as DelegateAction, S as Signature$1, T as Transaction, P as Provider, V as ViewAccessKeyArgs, b as AccessKeyView, c as ViewAccessKeyListArgs, d as ViewAccountArgs, e as AccountView, f as ViewContractCodeArgs, C as ContractCodeView, g as ViewGlobalContractCodeArgs, h as ViewContractStateArgs, i as SerializedReturnValue, j as CallFunctionArgs, k as ViewTransactionStatusArgs, l as SignedTransaction, L as LightClientProofRequest, N as NextLightClientBlockRequest, m as ViewValidatorsArgs, n as Signer, M as MessagePayload, o as SignedMessage, p as SignTransactionReturn, q as SignDelegateActionReturn, r as Account, F as FinalExecutionOutcome, s as CurrentEpochValidatorInfo, t as NextEpochValidatorInfo } from './account-V-f7tl72.js'; export { u as AccessKeyInfoView, v as AccessKeyList, w as AccessKeyPermission, x as AccessKeyViewRaw, y as AccountBalanceInfo, z as AccountViewRaw, B as AddKey, E as CallContractViewFunctionResultRaw, G as CodeResult, H as ContractCodeViewRaw, I as ContractStateView, J as CreateAccount, K as DeleteAccount, O as DeleteKey, Q as DeployContract, R as DeployGlobalContract, U as Enum, W as EpochValidatorInfo, X as ExecutionError, Y as ExecutionOutcome, Z as ExecutionOutcomeReceiptDetail, _ as ExecutionOutcomeWithId, $ as ExecutionOutcomeWithIdView, a0 as ExecutionStatus, a1 as ExecutionStatusBasic, a2 as FinalExecutionStatus, a3 as FinalExecutionStatusBasic, a4 as FullAccessPermission, a5 as FunctionCall, a6 as FunctionCallPermission, a7 as FunctionCallPermissionView, a8 as GlobalContractDeployMode, a9 as GlobalContractIdentifier, aa as IdType, ab as LightClientBlockLiteView, ac as LightClientProof, ad as NextLightClientBlockResponse, ae as QueryResponseKind, af as SCHEMA, ag as SignedDelegate, ah as Stake, ai as StakedAccount, aj as Transfer, ak as UseGlobalContract, al as ValidatorStakeView, am as ViewStateResult, an as buildDelegateAction, ao as decodeSignedTransaction, ap as decodeTransaction, aq as encodeDelegateAction, ar as encodeSignedDelegate, as as encodeTransaction } from './account-V-f7tl72.js'; import { ValidationError } from 'is-my-json-valid'; import { B as BlockReference, A as AccessKeyList, C as CryptoHash, V as ViewStateResult, a as CallResult, R as RpcBlockResponse, b as ChunkId, c as RpcChunkResponse, d as BlockId, e as RpcGasPriceResponse, f as RpcStatusResponse, g as RpcValidatorResponse, h as RpcTransactionResponse, i as RpcReceiptResponse, T as TxExecutionStatus, j as RpcQueryResponse, k as RpcQueryRequest$1, l as RpcStateChangesInBlockByTypeResponse, m as RpcProtocolConfigResponse, n as RpcLightClientExecutionProofResponse, o as RpcLightClientNextBlockResponse, p as RpcStateChangesInBlockResponse, q as AccessKeyWithPublicKey, J as JsonRpcRequestForBlock, r as JsonRpcResponseForRpcBlockResponseAndRpcBlockError, s as JsonRpcRequestForBlockEffects, t as JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError, u as JsonRpcRequestForChunk, v as JsonRpcResponseForRpcChunkResponseAndRpcChunkError, w as JsonRpcRequestForTx, x as JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError, y as JsonRpcRequestForValidators, z as JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError, D as JsonRpcRequestForSendTx, E as JsonRpcResponseForCryptoHashAndRpcTransactionError, F as JsonRpcRequestForBroadcastTxAsync, G as JsonRpcRequestForBroadcastTxCommit, H as JsonRpcRequestForQuery, I as JsonRpcResponseForRpcQueryResponseAndRpcQueryError, K as JsonRpcRequestForChanges, L as JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError, M as JsonRpcRequestForGasPrice, N as JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError, O as JsonRpcRequestForStatus, P as JsonRpcResponseForRpcStatusResponseAndRpcStatusError, Q as JsonRpcRequestForHealth, S as JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError, U as JsonRpcRequestForNetworkInfo, W as JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError, X as JsonRpcRequestForClientConfig, Y as JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError, Z as JsonRpcRequestForGenesisConfig, _ as JsonRpcResponseForGenesisConfigAndGenesisConfigError, $ as JsonRpcRequestForMaintenanceWindows, a0 as JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError, a1 as JsonRpcRequestForNextLightClientBlock, a2 as JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError, a3 as JsonRpcRequestForLightClientProof, a4 as JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError, a5 as JsonRpcRequestForExperimentalCallFunction, a6 as JsonRpcResponseForRpcCallFunctionResponseAndRpcCallFunctionError, a7 as JsonRpcRequestForExperimentalChanges, a8 as JsonRpcRequestForExperimentalChangesInBlock, a9 as JsonRpcRequestForExperimentalCongestionLevel, aa as JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError, ab as JsonRpcRequestForExperimentalGenesisConfig, ac as JsonRpcRequestForExperimentalLightClientBlockProof, ad as JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError, ae as JsonRpcRequestForExperimentalLightClientProof, af as JsonRpcRequestForExperimentalMaintenanceWindows, ag as JsonRpcRequestForExperimentalProtocolConfig, ah as JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError, ai as JsonRpcRequestForExperimentalReceipt, aj as JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError, ak as JsonRpcRequestForExperimentalSplitStorageInfo, al as JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError, am as JsonRpcRequestForExperimentalTxStatus, an as JsonRpcRequestForExperimentalValidatorsOrdered, ao as JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError, ap as JsonRpcRequestForExperimentalViewAccessKey, aq as JsonRpcResponseForRpcViewAccessKeyResponseAndRpcViewAccessKeyError, ar as JsonRpcRequestForExperimentalViewAccessKeyList, as as JsonRpcResponseForRpcViewAccessKeyListResponseAndRpcViewAccessKeyListError, at as JsonRpcRequestForExperimentalViewAccount, au as JsonRpcResponseForRpcViewAccountResponseAndRpcViewAccountError, av as JsonRpcRequestForExperimentalViewCode, aw as JsonRpcResponseForRpcViewCodeResponseAndRpcViewCodeError, ax as JsonRpcRequestForExperimentalViewGasKey, ay as JsonRpcResponseForRpcViewGasKeyResponseAndRpcViewGasKeyError, az as JsonRpcRequestForExperimentalViewGasKeyList, aA as JsonRpcResponseForRpcViewGasKeyListResponseAndRpcViewGasKeyListError, aB as JsonRpcRequestForExperimentalViewState, aC as JsonRpcResponseForRpcViewStateResponseAndRpcViewStateError, aD as AccessKeyPermissionView, aE as AccountId } from './types.gen-LgOaxt6w.js'; export { aF as BlockChange, aG as BlockChangeResult, aH as BlockHash, aI as BlockHeader, aJ as BlockHeaderInnerLiteView, aK as BlockHeight, aL as BlockResult, aM as BlockShardId, aN as ChangeResult, aO as Chunk, aP as ChunkHash, aQ as ChunkHeader, aR as ChunkResult, aS as Finality, aT as FinalityReference, aU as GasPrice, aV as MerkleNode, aW as MerklePath, aX as NearProtocolConfig, aY as NearProtocolRuntimeConfig, aZ as NodeStatusResult, a_ as ProviderTransaction, a$ as ShardId, b0 as SyncInfo, b1 as TotalWeight } from './types.gen-LgOaxt6w.js'; import { P as PublicKey, K as KeyPairString } from './public_key-2MzNRk5k.js'; export { C as CurveType, a as KeyType, k as keyToImplicitAddress } from './public_key-2MzNRk5k.js'; import { K as KeyPairBase, S as Signature, a as KeyPair } from './key_pair-CYs2oFZe.js'; import 'borsh'; /** * Information about a single type (e.g. return type). */ type AbiType = { serialization_type: 'json'; type_schema: Schema; } | { serialization_type: 'borsh'; type_schema: unknown; }; /** * A JSON Schema. */ type Schema = boolean | SchemaObject; /** * A type which can be serialized as a single item, or multiple items. * * In some contexts, a `Single` may be semantically distinct from a `Vec` containing only item. */ type SingleOrVecFor_Schema = Schema | Schema[]; /** * A type which can be serialized as a single item, or multiple items. * * In some contexts, a `Single` may be semantically distinct from a `Vec` containing only item. */ type SingleOrVecFor_InstanceType = InstanceType | InstanceType[]; /** * The possible types of values in JSON Schema documents. * * See [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1). */ type InstanceType = 'null' | 'boolean' | 'object' | 'array' | 'number' | 'string' | 'integer'; /** * Function kind regulates whether this function's invocation requires a transaction (so-called call functions) or not (view functions). */ type AbiFunctionKind = 'view' | 'call'; /** * Function can have multiple modifiers that can change its semantics. */ type AbiFunctionModifier = 'init' | 'private' | 'payable'; /** * A list of function parameters sharing the same serialization type. */ type AbiParameters = { args: AbiJsonParameter[]; serialization_type: 'json'; } | { args: AbiBorshParameter[]; serialization_type: 'borsh'; }; /** * Contract ABI. */ interface AbiRoot { /** * Core ABI information (functions and types). */ body: AbiBody; /** * Metadata information about the contract. */ metadata: AbiMetadata; /** * Semver of the ABI schema format. */ schema_version: string; } /** * Core ABI information. */ interface AbiBody { /** * ABIs of all contract's functions. */ functions: AbiFunction[]; /** * Root JSON Schema containing all types referenced in the functions. */ root_schema: RootSchema; } /** * ABI of a single function. */ interface AbiFunction { /** * Type identifiers of the callbacks of the function. */ callbacks?: AbiType[]; /** * Type identifier of the vararg callbacks of the function. */ callbacks_vec?: AbiType | null; /** * Human-readable documentation parsed from the source file. */ doc?: string | null; /** * Function kind that regulates whether the function has to be invoked from a transaction. */ kind: AbiFunctionKind; /** * List of modifiers affecting the function. */ modifiers?: AbiFunctionModifier[]; name: string; /** * Type identifiers of the function parameters. */ params?: AbiParameters; /** * Return type identifier. */ result?: AbiType | null; } /** * A JSON Schema object. */ interface SchemaObject { /** * The `$id` keyword. * * See [JSON Schema 8.2.2. The "$id" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2). */ $id?: string | null; /** * The `$ref` keyword. * * See [JSON Schema 8.2.4.1. Direct References with "$ref"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1). */ $ref?: string | null; /** * The `additionalItems` keyword. * * See [JSON Schema 9.3.1.2. "additionalItems"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2). */ additionalItems?: Schema | null; /** * The `additionalProperties` keyword. * * See [JSON Schema 9.3.2.3. "additionalProperties"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3). */ additionalProperties?: Schema | null; /** * The `allOf` keyword. * * See [JSON Schema 9.2.1.1. "allOf"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1). */ allOf?: Schema[] | null; /** * The `anyOf` keyword. * * See [JSON Schema 9.2.1.2. "anyOf"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2). */ anyOf?: Schema[] | null; /** * The `const` keyword. * * See [JSON Schema Validation 6.1.3. "const"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3) */ const?: { [k: string]: unknown; }; /** * The `contains` keyword. * * See [JSON Schema 9.3.1.4. "contains"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4). */ contains?: Schema | null; /** * The `default` keyword. * * See [JSON Schema Validation 9.2. "default"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2). */ default?: string | number | boolean | { [key: string]: string | number | boolean; } | undefined; /** * The `deprecated` keyword. * * See [JSON Schema Validation 9.3. "deprecated"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3). */ deprecated?: boolean; /** * The `description` keyword. * * See [JSON Schema Validation 9.1. "title" and "description"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1). */ description?: string | null; /** * The `else` keyword. * * See [JSON Schema 9.2.2.3. "else"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3). */ else?: Schema | null; /** * The `enum` keyword. * * See [JSON Schema Validation 6.1.2. "enum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2) */ enum?: (string | number | boolean)[] | null; /** * The `examples` keyword. * * See [JSON Schema Validation 9.5. "examples"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5). */ examples?: true[]; /** * The `exclusiveMaximum` keyword. * * See [JSON Schema Validation 6.2.3. "exclusiveMaximum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3). */ exclusiveMaximum?: number | null; /** * The `exclusiveMinimum` keyword. * * See [JSON Schema Validation 6.2.5. "exclusiveMinimum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5). */ exclusiveMinimum?: number | null; /** * The `format` keyword. * * See [JSON Schema Validation 7. A Vocabulary for Semantic Content With "format"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7). */ format?: string | null; /** * The `if` keyword. * * See [JSON Schema 9.2.2.1. "if"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1). */ if?: Schema | null; /** * The `items` keyword. * * See [JSON Schema 9.3.1.1. "items"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1). */ items?: SingleOrVecFor_Schema | null; /** * The `maxItems` keyword. * * See [JSON Schema Validation 6.4.1. "maxItems"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1). */ maxItems?: number | null; /** * The `maxLength` keyword. * * See [JSON Schema Validation 6.3.1. "maxLength"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1). */ maxLength?: number | null; /** * The `maxProperties` keyword. * * See [JSON Schema Validation 6.5.1. "maxProperties"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1). */ maxProperties?: number | null; /** * The `maximum` keyword. * * See [JSON Schema Validation 6.2.2. "maximum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2). */ maximum?: number | null; /** * The `minItems` keyword. * * See [JSON Schema Validation 6.4.2. "minItems"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2). */ minItems?: number | null; /** * The `minLength` keyword. * * See [JSON Schema Validation 6.3.2. "minLength"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2). */ minLength?: number | null; /** * The `minProperties` keyword. * * See [JSON Schema Validation 6.5.2. "minProperties"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2). */ minProperties?: number | null; /** * The `minimum` keyword. * * See [JSON Schema Validation 6.2.4. "minimum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4). */ minimum?: number | null; /** * The `multipleOf` keyword. * * See [JSON Schema Validation 6.2.1. "multipleOf"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1). */ multipleOf?: number | null; /** * The `not` keyword. * * See [JSON Schema 9.2.1.4. "not"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4). */ not?: Schema | null; /** * The `oneOf` keyword. * * See [JSON Schema 9.2.1.3. "oneOf"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3). */ oneOf?: Schema[] | null; /** * The `pattern` keyword. * * See [JSON Schema Validation 6.3.3. "pattern"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3). */ pattern?: string | null; /** * The `patternProperties` keyword. * * See [JSON Schema 9.3.2.2. "patternProperties"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2). */ patternProperties?: { [k: string]: Schema; }; /** * The `properties` keyword. * * See [JSON Schema 9.3.2.1. "properties"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1). */ properties?: { [k: string]: Schema; }; /** * The `propertyNames` keyword. * * See [JSON Schema 9.3.2.5. "propertyNames"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5). */ propertyNames?: Schema | null; /** * The `readOnly` keyword. * * See [JSON Schema Validation 9.4. "readOnly" and "writeOnly"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4). */ readOnly?: boolean; /** * The `required` keyword. * * See [JSON Schema Validation 6.5.3. "required"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3). */ required?: string[]; /** * The `then` keyword. * * See [JSON Schema 9.2.2.2. "then"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2). */ then?: Schema | null; /** * The `title` keyword. * * See [JSON Schema Validation 9.1. "title" and "description"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1). */ title?: string | null; /** * The `type` keyword. * * See [JSON Schema Validation 6.1.1. "type"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1). */ type?: SingleOrVecFor_InstanceType | null; /** * The `uniqueItems` keyword. * * See [JSON Schema Validation 6.4.3. "uniqueItems"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3). */ uniqueItems?: boolean | null; /** * The `writeOnly` keyword. * * See [JSON Schema Validation 9.4. "readOnly" and "writeOnly"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4). */ writeOnly?: boolean; [k: string]: unknown; } /** * Information about a single named JSON function parameter. */ interface AbiJsonParameter { /** * Parameter name (e.g. `p1` in `fn foo(p1: u32) {}`). */ name: string; /** * JSON Subschema that represents this type (can be an inline primitive, a reference to the root schema and a few other corner-case things). */ type_schema: Schema; } /** * Information about a single named Borsh function parameter. */ interface AbiBorshParameter { /** * Parameter name (e.g. `p1` in `fn foo(p1: u32) {}`). */ name: string; /** * Inline Borsh schema that represents this type. */ type_schema: { [k: string]: unknown; }; } /** * The root object of a JSON Schema document. */ interface RootSchema { /** * The `$id` keyword. * * See [JSON Schema 8.2.2. The "$id" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2). */ $id?: string | null; /** * The `$ref` keyword. * * See [JSON Schema 8.2.4.1. Direct References with "$ref"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1). */ $ref?: string | null; /** * The `$schema` keyword. * * See [JSON Schema 8.1.1. The "$schema" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.1.1). */ $schema?: string | null; /** * The `additionalItems` keyword. * * See [JSON Schema 9.3.1.2. "additionalItems"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2). */ additionalItems?: Schema | null; /** * The `additionalProperties` keyword. * * See [JSON Schema 9.3.2.3. "additionalProperties"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3). */ additionalProperties?: Schema | null; /** * The `allOf` keyword. * * See [JSON Schema 9.2.1.1. "allOf"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1). */ allOf?: Schema[] | null; /** * The `anyOf` keyword. * * See [JSON Schema 9.2.1.2. "anyOf"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2). */ anyOf?: Schema[] | null; /** * The `const` keyword. * * See [JSON Schema Validation 6.1.3. "const"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3) */ const?: { [k: string]: unknown; }; /** * The `contains` keyword. * * See [JSON Schema 9.3.1.4. "contains"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4). */ contains?: Schema | null; /** * The `default` keyword. * * See [JSON Schema Validation 9.2. "default"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2). */ default?: { [k: string]: unknown; }; /** * The `definitions` keyword. * * In JSON Schema draft 2019-09 this was replaced by $defs, but in Schemars this is still serialized as `definitions` for backward-compatibility. * * See [JSON Schema 8.2.5. Schema Re-Use With "$defs"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.5), and [JSON Schema (draft 07) 9. Schema Re-Use With "definitions"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9). */ definitions?: { [k: string]: Schema; }; /** * The `deprecated` keyword. * * See [JSON Schema Validation 9.3. "deprecated"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3). */ deprecated?: boolean; /** * The `description` keyword. * * See [JSON Schema Validation 9.1. "title" and "description"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1). */ description?: string | null; /** * The `else` keyword. * * See [JSON Schema 9.2.2.3. "else"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3). */ else?: Schema | null; /** * The `enum` keyword. * * See [JSON Schema Validation 6.1.2. "enum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2) */ enum?: true[] | null; /** * The `examples` keyword. * * See [JSON Schema Validation 9.5. "examples"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5). */ examples?: true[]; /** * The `exclusiveMaximum` keyword. * * See [JSON Schema Validation 6.2.3. "exclusiveMaximum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3). */ exclusiveMaximum?: number | null; /** * The `exclusiveMinimum` keyword. * * See [JSON Schema Validation 6.2.5. "exclusiveMinimum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5). */ exclusiveMinimum?: number | null; /** * The `format` keyword. * * See [JSON Schema Validation 7. A Vocabulary for Semantic Content With "format"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7). */ format?: string | null; /** * The `if` keyword. * * See [JSON Schema 9.2.2.1. "if"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1). */ if?: Schema | null; /** * The `items` keyword. * * See [JSON Schema 9.3.1.1. "items"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1). */ items?: SingleOrVecFor_Schema | null; /** * The `maxItems` keyword. * * See [JSON Schema Validation 6.4.1. "maxItems"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1). */ maxItems?: number | null; /** * The `maxLength` keyword. * * See [JSON Schema Validation 6.3.1. "maxLength"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1). */ maxLength?: number | null; /** * The `maxProperties` keyword. * * See [JSON Schema Validation 6.5.1. "maxProperties"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1). */ maxProperties?: number | null; /** * The `maximum` keyword. * * See [JSON Schema Validation 6.2.2. "maximum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2). */ maximum?: number | null; /** * The `minItems` keyword. * * See [JSON Schema Validation 6.4.2. "minItems"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2). */ minItems?: number | null; /** * The `minLength` keyword. * * See [JSON Schema Validation 6.3.2. "minLength"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2). */ minLength?: number | null; /** * The `minProperties` keyword. * * See [JSON Schema Validation 6.5.2. "minProperties"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2). */ minProperties?: number | null; /** * The `minimum` keyword. * * See [JSON Schema Validation 6.2.4. "minimum"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4). */ minimum?: number | null; /** * The `multipleOf` keyword. * * See [JSON Schema Validation 6.2.1. "multipleOf"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1). */ multipleOf?: number | null; /** * The `not` keyword. * * See [JSON Schema 9.2.1.4. "not"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4). */ not?: Schema | null; /** * The `oneOf` keyword. * * See [JSON Schema 9.2.1.3. "oneOf"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3). */ oneOf?: Schema[] | null; /** * The `pattern` keyword. * * See [JSON Schema Validation 6.3.3. "pattern"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3). */ pattern?: string | null; /** * The `patternProperties` keyword. * * See [JSON Schema 9.3.2.2. "patternProperties"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2). */ patternProperties?: { [k: string]: Schema; }; /** * The `properties` keyword. * * See [JSON Schema 9.3.2.1. "properties"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1). */ properties?: { [k: string]: Schema; }; /** * The `propertyNames` keyword. * * See [JSON Schema 9.3.2.5. "propertyNames"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5). */ propertyNames?: Schema | null; /** * The `readOnly` keyword. * * See [JSON Schema Validation 9.4. "readOnly" and "writeOnly"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4). */ readOnly?: boolean; /** * The `required` keyword. * * See [JSON Schema Validation 6.5.3. "required"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3). */ required?: string[]; /** * The `then` keyword. * * See [JSON Schema 9.2.2.2. "then"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2). */ then?: Schema | null; /** * The `title` keyword. * * See [JSON Schema Validation 9.1. "title" and "description"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1). */ title?: string | null; /** * The `type` keyword. * * See [JSON Schema Validation 6.1.1. "type"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1). */ type?: SingleOrVecFor_InstanceType | null; /** * The `uniqueItems` keyword. * * See [JSON Schema Validation 6.4.3. "uniqueItems"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3). */ uniqueItems?: boolean | null; /** * The `writeOnly` keyword. * * See [JSON Schema Validation 9.4. "readOnly" and "writeOnly"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4). */ writeOnly?: boolean; [k: string]: unknown; } interface AbiMetadata { /** * The authors of the smart contract. */ authors?: string[]; /** * The information about how this contract was built. */ build?: BuildInfo | null; /** * The name of the smart contract. */ name?: string | null; /** * The version of the smart contract. */ version?: string | null; /** * The SHA-256 hash of the contract WASM code in Base58 format. */ wasm_hash?: string | null; [k: string]: unknown; } interface BuildInfo { /** * The build tool (versioned) that was used to build the contract. */ builder: string; /** * The compiler (versioned) that was used to build the contract. */ compiler: string; /** * The docker image (versioned) where the contract was built. */ image?: string | null; [k: string]: unknown; } /** * This class provides key pair functionality for Ed25519 curve: * generating key pairs, encoding key pairs, signing and verifying. */ declare class KeyPairEd25519 extends KeyPairBase { readonly publicKey: PublicKey; readonly secretKey: string; readonly extendedSecretKey: string; /** * Construct an instance of key pair given a secret key. * It's generally assumed that these are encoded in base58. * @param extendedSecretKey */ constructor(extendedSecretKey: string); /** * Generate a new random keypair. * @example * const keyRandom = KeyPair.fromRandom(); * keyRandom.publicKey * // returns [PUBLIC_KEY] * * keyRandom.secretKey * // returns [SECRET_KEY] */ static fromRandom(): KeyPairEd25519; /** * Signs a message using the key pair's secret key. * @param message The message to be signed. * @returns {Signature} The signature object containing the signature and the public key. */ sign(message: Uint8Array): Signature; /** * Verifies the signature of a message using the key pair's public key. * @param message The message to be verified. * @param signature The signature to be verified. * @returns {boolean} `true` if the signature is valid, otherwise `false`. */ verify(message: Uint8Array, signature: Uint8Array): boolean; /** * Returns a string representation of the key pair in the format 'ed25519:[extendedSecretKey]'. * @returns {string} The string representation of the key pair. */ toString(): KeyPairString; /** * Retrieves the public key associated with the key pair. * @returns {PublicKey} The public key. */ getPublicKey(): PublicKey; } /** ML-DSA-65 key pair for post-quantum transaction signing. */ declare class KeyPairMLDSA65 extends KeyPairBase { readonly publicKey: PublicKey; readonly secretKey: string; constructor(secretKey: string); static fromRandom(): KeyPairMLDSA65; sign(message: Uint8Array): Signature; verify(message: Uint8Array, signature: Uint8Array): boolean; toString(): KeyPairString; getPublicKey(): PublicKey; } /** * This class provides key pair functionality for secp256k1 curve: * generating key pairs, encoding key pairs, signing and verifying. * nearcore expects secp256k1 public keys to be 64 bytes at all times, * even when string encoded the secp256k1 library returns 65 byte keys * (including a 1 byte header that indicates how the pubkey was encoded). * We'll force the secp256k1 library to always encode uncompressed * keys with the corresponding 0x04 header byte, then manually * insert/remove that byte as needed. */ declare class KeyPairSecp256k1 extends KeyPairBase { readonly publicKey: PublicKey; readonly secretKey: string; readonly extendedSecretKey: string; /** * Construct an instance of key pair given a secret key. * It's generally assumed that these are encoded in base58. * @param {string} extendedSecretKey */ constructor(extendedSecretKey: string); /** * Generate a new random keypair. * @example * const keyRandom = KeyPair.fromRandom(); * keyRandom.publicKey * // returns [PUBLIC_KEY] * * keyRandom.secretKey * // returns [SECRET_KEY] */ static fromRandom(): KeyPairSecp256k1; sign(message: Uint8Array): Signature; verify(message: Uint8Array, signature: Uint8Array): boolean; toString(): KeyPairString; getPublicKey(): PublicKey; } declare abstract class Assignable { constructor(properties: any); } declare class PositionalArgsError extends Error { constructor(); } declare class ArgumentTypeError extends Error { constructor(argName: string, argType: string, argValue: any); } declare class TypedError extends Error { type: string; context?: ErrorContext; constructor(message?: string, type?: string, context?: ErrorContext); } declare class ErrorContext { transactionHash?: string; constructor(transactionHash?: string); } /** * NEAR RPC API request types and responses * @module */ interface ViewAccountRequest { request_type: 'view_account'; account_id: string; } interface ViewCodeRequest { request_type: 'view_code'; account_id: string; } interface ViewStateRequest { request_type: 'view_state'; account_id: string; prefix_base64: string; } interface ViewAccessKeyRequest { request_type: 'view_access_key'; account_id: string; public_key: string; } interface ViewAccessKeyListRequest { request_type: 'view_access_key_list'; account_id: string; } interface CallFunctionRequest { request_type: 'call_function'; account_id: string; method_name: string; args_base64: string; } type RpcQueryRequest = (ViewAccountRequest | ViewCodeRequest | ViewStateRequest | ViewAccountRequest | ViewAccessKeyRequest | ViewAccessKeyListRequest | CallFunctionRequest) & BlockReference; declare function exponentialBackoff(startWaitTime: any, retryNumber: any, waitBackoff: any, getResult: any): Promise; /** * Creates a full access key with full access permissions. * @returns A new full access key. */ declare function fullAccessKey(): AccessKey; /** * Creates an access key with function call permission for a specific receiver and method names. * @param receiverId The NEAR account ID of the function call receiver. * @param methodNames An array of method names allowed for function calls. * @param allowance An optional allowance (maximum amount) for the function call. Default: Unlimited. * @returns A new access key with function call permission. */ declare function functionCallAccessKey(receiverId: string, methodNames: string[], allowance?: bigint): AccessKey; /** * Creates a new action for creating a new NEAR account. * @returns A new action for creating a new account. */ declare function createAccount(): Action; /** * Creates a new action for deploying a contract with the provided code. * @param code The Uint8Array representing the code of the contract. * @returns A new action for deploying a contract. */ declare function deployContract(code: Uint8Array): Action; /** * Converts an input argument to a Uint8Array, handling cases for both JSON and Uint8Array. * @param args The input argument, either JSON object or Uint8Array. * @returns A Uint8Array representation of the input argument. */ declare function stringifyJsonOrBytes(args: any): Uint8Array; /** * Constructs {@link Action} instance representing contract method call. * * @param methodName the name of the method to call * @param args arguments to pass to method. Can be either plain JS object which gets serialized as JSON automatically * or `Uint8Array` instance which represents bytes passed as is. * @param gas max amount of gas that method call can use * @param deposit amount of NEAR (in yoctoNEAR) to send together with the call * @param stringify Convert input arguments into bytes array. */ declare function functionCall(methodName: string, args: Uint8Array | object, gas?: bigint, deposit?: bigint, stringify?: typeof stringifyJsonOrBytes): Action; /** * Creates a new action for transferring funds, optionally specifying a deposit amount. * @param deposit The amount to be deposited along with the transfer. Default: 0. * @returns A new action for transferring funds. */ declare function transfer(deposit?: bigint): Action; /** * Creates a new action for staking tokens, specifying the stake amount and public key. * @param stake The amount to be staked. Default: 0. * @param publicKey The public key associated with the staking action. * @returns A new action for staking tokens. */ declare function stake(stake: bigint | undefined, publicKey: PublicKey): Action; /** * Creates a new action for adding a full access key. * @param publicKey The public key to be added. * @returns A new action for adding a full access key. */ declare function addFullAccessKey(publicKey: PublicKey): Action; /** * Creates a new action for adding a function call access key. * @param publicKey The public key to be added. * @param receiverId The NEAR account ID of the function call receiver. * @param methodNames An array of method names allowed for function calls. * @param allowance An optional allowance (maximum amount) for the function call. * @returns A new action for adding a function call access key. */ declare function addFunctionCallAccessKey(publicKey: PublicKey, receiverId: string, methodNames: string[], allowance?: bigint): Action; /** * Creates a new action for deleting a public key. * @param publicKey The public key to be deleted. * @returns A new action for deleting a public key. */ declare function deleteKey(publicKey: PublicKey): Action; /** * Creates a new action for deleting an account with the specified beneficiary ID. * @param beneficiaryId The NEAR account ID of the beneficiary. * @returns A new action for deleting an account. */ declare function deleteAccount(beneficiaryId: string): Action; /** * Creates a new action for a signed delegation, specifying the delegate action and signature. * @param options Signed delegate options * @param options.delegateAction The delegate action to be performed. * @param options.signature The signature associated with the delegate action. * @returns A new action for a signed delegation. */ declare function signedDelegate({ delegateAction, signature, }: { delegateAction: DelegateAction; signature: Signature$1; }): Action; /** * Creates a new action for deploying a global contract with provided code and mode. * @param code The Uint8Array representing the contract code. * @param deployMode The mode to deploy global contract (CodeHash or AccountId). * @returns A new action for deploying a global contract. */ declare function deployGlobalContract(code: Uint8Array, deployMode: 'codeHash' | 'accountId'): Action; /** * Creates a new action for using a previously deployed global contract. * @param contractIdentifier The global contract identifier (hash or account id). * @returns A new action for using a global contract. */ declare function useGlobalContract(contractIdentifier: { accountId: string; } | { codeHash: string | Uint8Array; }): Action; declare const actions: { addFullAccessKey: typeof addFullAccessKey; addFunctionCallAccessKey: typeof addFunctionCallAccessKey; createAccount: typeof createAccount; deleteAccount: typeof deleteAccount; deleteKey: typeof deleteKey; deployContract: typeof deployContract; fullAccessKey: typeof fullAccessKey; functionCall: typeof functionCall; functionCallAccessKey: typeof functionCallAccessKey; signedDelegate: typeof signedDelegate; stake: typeof stake; transfer: typeof transfer; deployGlobalContract: typeof deployGlobalContract; useGlobalContract: typeof useGlobalContract; }; /** * Creates a new transaction object with the provided parameters. * @param signerId The NEAR account ID of the transaction signer. * @param publicKey The public key associated with the signer. * @param receiverId The NEAR account ID of the transaction receiver. * @param nonce The nonce value for the transaction, represented as a BN, string, or number. * @param actions An array of transaction actions to be performed. * @param blockHash The hash of the block where the transaction will be included. * @returns A new transaction object initialized with the provided parameters. */ declare function createTransaction(signerId: string, publicKey: PublicKey, receiverId: string, nonce: bigint | string | number, actions: Action[], blockHash: Uint8Array): Transaction; /** * Client class to interact with the [NEAR RPC API](https://docs.near.org/api/rpc/introduction). * @see [https://github.com/near/nearcore/tree/master/chain/jsonrpc](https://github.com/near/nearcore/tree/master/chain/jsonrpc) */ declare class FailoverRpcProvider implements Provider { /** @hidden */ readonly providers: Provider[]; private currentProviderIndex; /** * @param providers list of providers */ constructor(providers: Provider[]); private switchToNextProvider; private get currentProvider(); private withBackoff; getNetworkId(): Promise; getCurrentEpochSeatPrice(): Promise; getNextEpochSeatPrice(): Promise; viewAccessKey(params: ViewAccessKeyArgs): Promise; viewAccessKeyList(params: ViewAccessKeyListArgs): Promise; viewAccount(params: ViewAccountArgs): Promise; viewContractCode(params: ViewContractCodeArgs): Promise; viewGlobalContractCode(params: ViewGlobalContractCodeArgs): Promise; viewContractState(params: ViewContractStateArgs): Promise; callFunction(params: CallFunctionArgs): Promise; callFunctionRaw(params: CallFunctionArgs): Promise; viewBlock(blockQuery: BlockReference): Promise; viewChunk(chunkId: ChunkId): Promise; viewGasPrice(blockId?: BlockId): Promise; viewNodeStatus(): Promise; viewValidators(params?: { blockId: string | number; } | { epochId: string; }): Promise; viewTransactionStatus(params: ViewTransactionStatusArgs): Promise; viewTransactionStatusWithReceipts(params: ViewTransactionStatusArgs): Promise; viewTransactionReceipt(receiptId: string): Promise; sendTransactionUntil(signedTransaction: SignedTransaction, waitUntil: TxExecutionStatus): Promise; /** * Sends a signed transaction to the RPC and waits until transaction is fully complete * @see [https://docs.near.org/docs/develop/front-end/rpc#send-transaction-await](https://docs.near.org/docs/develop/front-end/rpc#general-validator-status) * * @param signedTransaction The signed transaction being sent */ sendTransaction(signedTransaction: SignedTransaction): Promise; /** * Sends a signed transaction to the RPC and immediately returns transaction hash * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#send-transaction-async) * @param signedTransaction The signed transaction being sent */ sendTransactionAsync(signedTransaction: SignedTransaction): Promise; /** * Query the RPC by passing an {@link RpcQueryRequest } * @see [https://docs.near.org/api/rpc/contracts](https://docs.near.org/api/rpc/contracts) * */ query>(params: RpcQueryRequest$1): Promise; /** * Query changes in block from the RPC * pass block_id OR finality as blockQuery, not both * @see [https://docs.near.org/api/rpc/block-chunk](https://docs.near.org/api/rpc/block-chunk) */ blockChanges(blockQuery: BlockReference): Promise; /** * Gets the protocol config at a block from RPC * * @param blockReference specifies the block to get the protocol config for */ experimental_protocolConfig(blockReference: BlockReference | { sync_checkpoint: 'genesis'; }): Promise; /** * Gets a light client execution proof for verifying execution outcomes * @see [https://github.com/nearprotocol/NEPs/blob/master/specs/ChainSpec/LightClient.md#light-client-proof](https://github.com/nearprotocol/NEPs/blob/master/specs/ChainSpec/LightClient.md#light-client-proof) */ lightClientProof(request: LightClientProofRequest): Promise; /** * Returns the next light client block as far in the future as possible from the last known hash * to still be able to validate from that hash. This will either return the last block of the * next epoch, or the last final known block. * * @see [https://github.com/near/NEPs/blob/master/specs/ChainSpec/LightClient.md#light-client-block](https://github.com/near/NEPs/blob/master/specs/ChainSpec/LightClient.md#light-client-block) */ nextLightClientBlock(request: NextLightClientBlockRequest): Promise; /** * Gets access key changes for a given array of accountIds * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-access-key-changes-all) */ accessKeyChanges(accountIdArray: string[], blockQuery: BlockReference): Promise; /** * Gets single access key changes for a given array of access keys * pass block_id OR finality as blockQuery, not both * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-access-key-changes-single) */ singleAccessKeyChanges(accessKeyArray: AccessKeyWithPublicKey[], blockQuery: BlockReference): Promise; /** * Gets account changes for a given array of accountIds * pass block_id OR finality as blockQuery, not both * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-account-changes) */ accountChanges(accountIdArray: string[], blockQuery: BlockReference): Promise; /** * Gets contract state changes for a given array of accountIds * pass block_id OR finality as blockQuery, not both * Note: If you pass a keyPrefix it must be base64 encoded * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-contract-state-changes) */ contractStateChanges(accountIdArray: string[], blockQuery: BlockReference, keyPrefix?: string): Promise; /** * Gets contract code changes for a given array of accountIds * pass block_id OR finality as blockQuery, not both * Note: Change is returned in a base64 encoded WASM file * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-contract-code-changes) */ contractCodeChanges(accountIdArray: string[], blockQuery: BlockReference): Promise; } interface Methods { block: { request: JsonRpcRequestForBlock; response: JsonRpcResponseForRpcBlockResponseAndRpcBlockError; }; block_effects: { request: JsonRpcRequestForBlockEffects; response: JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError; }; chunk: { request: JsonRpcRequestForChunk; response: JsonRpcResponseForRpcChunkResponseAndRpcChunkError; }; tx: { request: JsonRpcRequestForTx; response: JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError; }; validators: { request: JsonRpcRequestForValidators; response: JsonRpcResponseForRpcValidatorResponseAndRpcValidatorError; }; send_tx: { request: JsonRpcRequestForSendTx; response: JsonRpcResponseForCryptoHashAndRpcTransactionError; }; broadcast_tx_async: { request: JsonRpcRequestForBroadcastTxAsync; response: JsonRpcResponseForCryptoHashAndRpcTransactionError; }; broadcast_tx_commit: { request: JsonRpcRequestForBroadcastTxCommit; response: JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError; }; query: { request: JsonRpcRequestForQuery; response: JsonRpcResponseForRpcQueryResponseAndRpcQueryError; }; changes: { request: JsonRpcRequestForChanges; response: JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError; }; gas_price: { request: JsonRpcRequestForGasPrice; response: JsonRpcResponseForRpcGasPriceResponseAndRpcGasPriceError; }; status: { request: JsonRpcRequestForStatus; response: JsonRpcResponseForRpcStatusResponseAndRpcStatusError; }; health: { request: JsonRpcRequestForHealth; response: JsonRpcResponseForNullableRpcHealthResponseAndRpcStatusError; }; network_info: { request: JsonRpcRequestForNetworkInfo; response: JsonRpcResponseForRpcNetworkInfoResponseAndRpcNetworkInfoError; }; client_config: { request: JsonRpcRequestForClientConfig; response: JsonRpcResponseForRpcClientConfigResponseAndRpcClientConfigError; }; genesis_config: { request: JsonRpcRequestForGenesisConfig; response: JsonRpcResponseForGenesisConfigAndGenesisConfigError; }; maintenance_windows: { request: JsonRpcRequestForMaintenanceWindows; response: JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError; }; next_light_client_block: { request: JsonRpcRequestForNextLightClientBlock; response: JsonRpcResponseForRpcLightClientNextBlockResponseAndRpcLightClientNextBlockError; }; light_client_proof: { request: JsonRpcRequestForLightClientProof; response: JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError; }; EXPERIMENTAL_call_function: { request: JsonRpcRequestForExperimentalCallFunction; response: JsonRpcResponseForRpcCallFunctionResponseAndRpcCallFunctionError; }; EXPERIMENTAL_changes: { request: JsonRpcRequestForExperimentalChanges; response: JsonRpcResponseForRpcStateChangesInBlockByTypeResponseAndRpcStateChangesError; }; EXPERIMENTAL_changes_in_block: { request: JsonRpcRequestForExperimentalChangesInBlock; response: JsonRpcResponseForRpcStateChangesInBlockResponseAndRpcStateChangesError; }; EXPERIMENTAL_congestion_level: { request: JsonRpcRequestForExperimentalCongestionLevel; response: JsonRpcResponseForRpcCongestionLevelResponseAndRpcChunkError; }; EXPERIMENTAL_genesis_config: { request: JsonRpcRequestForExperimentalGenesisConfig; response: JsonRpcResponseForGenesisConfigAndGenesisConfigError; }; EXPERIMENTAL_light_client_block_proof: { request: JsonRpcRequestForExperimentalLightClientBlockProof; response: JsonRpcResponseForRpcLightClientBlockProofResponseAndRpcLightClientProofError; }; EXPERIMENTAL_light_client_proof: { request: JsonRpcRequestForExperimentalLightClientProof; response: JsonRpcResponseForRpcLightClientExecutionProofResponseAndRpcLightClientProofError; }; EXPERIMENTAL_maintenance_windows: { request: JsonRpcRequestForExperimentalMaintenanceWindows; response: JsonRpcResponseForArrayOfRangeOfUint64AndRpcMaintenanceWindowsError; }; EXPERIMENTAL_protocol_config: { request: JsonRpcRequestForExperimentalProtocolConfig; response: JsonRpcResponseForRpcProtocolConfigResponseAndRpcProtocolConfigError; }; EXPERIMENTAL_receipt: { request: JsonRpcRequestForExperimentalReceipt; response: JsonRpcResponseForRpcReceiptResponseAndRpcReceiptError; }; EXPERIMENTAL_split_storage_info: { request: JsonRpcRequestForExperimentalSplitStorageInfo; response: JsonRpcResponseForRpcSplitStorageInfoResponseAndRpcSplitStorageInfoError; }; EXPERIMENTAL_tx_status: { request: JsonRpcRequestForExperimentalTxStatus; response: JsonRpcResponseForRpcTransactionResponseAndRpcTransactionError; }; EXPERIMENTAL_validators_ordered: { request: JsonRpcRequestForExperimentalValidatorsOrdered; response: JsonRpcResponseForArrayOfValidatorStakeViewAndRpcValidatorError; }; EXPERIMENTAL_view_access_key: { request: JsonRpcRequestForExperimentalViewAccessKey; response: JsonRpcResponseForRpcViewAccessKeyResponseAndRpcViewAccessKeyError; }; EXPERIMENTAL_view_access_key_list: { request: JsonRpcRequestForExperimentalViewAccessKeyList; response: JsonRpcResponseForRpcViewAccessKeyListResponseAndRpcViewAccessKeyListError; }; EXPERIMENTAL_view_account: { request: JsonRpcRequestForExperimentalViewAccount; response: JsonRpcResponseForRpcViewAccountResponseAndRpcViewAccountError; }; EXPERIMENTAL_view_code: { request: JsonRpcRequestForExperimentalViewCode; response: JsonRpcResponseForRpcViewCodeResponseAndRpcViewCodeError; }; EXPERIMENTAL_view_gas_key: { request: JsonRpcRequestForExperimentalViewGasKey; response: JsonRpcResponseForRpcViewGasKeyResponseAndRpcViewGasKeyError; }; EXPERIMENTAL_view_gas_key_list: { request: JsonRpcRequestForExperimentalViewGasKeyList; response: JsonRpcResponseForRpcViewGasKeyListResponseAndRpcViewGasKeyListError; }; EXPERIMENTAL_view_state: { request: JsonRpcRequestForExperimentalViewState; response: JsonRpcResponseForRpcViewStateResponseAndRpcViewStateError; }; } interface ConnectionInfo { url: string; headers?: { [key: string]: string | number; }; } type RequestOptions = { /** * Number of retries before giving up on a request */ retries: number; /** * Wait until next retry in milliseconds */ wait: number; /** * Exponential back off for waiting to retry again */ backoff: number; }; /** * Client class to interact with the [NEAR RPC API](https://docs.near.org/api/rpc/introduction). * @see [https://github.com/near/nearcore/tree/master/chain/jsonrpc](https://github.com/near/nearcore/tree/master/chain/jsonrpc) */ declare class JsonRpcProvider implements Provider { /** @hidden */ readonly connection: ConnectionInfo; /** @hidden */ readonly options: RequestOptions; /** @hidden */ private networkId; /** * @param connectionInfo Connection info */ constructor(connectionInfo: ConnectionInfo, options?: Partial); getNetworkId(): Promise; getCurrentEpochSeatPrice(): Promise; getNextEpochSeatPrice(): Promise; viewAccessKey({ accountId, publicKey, finalityQuery, }: ViewAccessKeyArgs): Promise<{ nonce: bigint; permission: AccessKeyPermissionView; block_hash: CryptoHash; block_height: number; }>; viewAccessKeyList({ accountId, finalityQuery, }: ViewAccessKeyListArgs): Promise; viewAccount({ accountId, blockQuery }: ViewAccountArgs): Promise<{ amount: bigint; locked: bigint; code_hash: CryptoHash; global_contract_account_id?: AccountId | null; global_contract_hash?: CryptoHash | null; storage_paid_at?: number; storage_usage: number; block_hash: CryptoHash; block_height: number; }>; viewContractCode({ contractId, blockQuery }: ViewContractCodeArgs): Promise<{ code: Uint8Array; code_base64: string; hash: CryptoHash; block_hash: CryptoHash; block_height: number; }>; viewGlobalContractCode({ identifier, blockQuery, }: ViewGlobalContractCodeArgs): Promise<{ code: Uint8Array; code_base64: string; hash: CryptoHash; block_hash: CryptoHash; block_height: number; }>; viewContractState({ contractId, prefix, blockQuery, }: ViewContractStateArgs): Promise; callFunction({ contractId, method, args, blockQuery, }: CallFunctionArgs): Promise; callFunctionRaw({ contractId, method, args, blockQuery, }: CallFunctionArgs): Promise; viewBlock(blockQuery: BlockReference): Promise; viewChunk(chunkId: ChunkId): Promise; viewGasPrice(blockId?: BlockId): Promise; viewNodeStatus(): Promise; /** * Query validators of an epoch. * @see [https://docs.near.org/api/rpc/network#validation-status](https://docs.near.org/api/rpc/network#validation-status) * * @param params Object specifying either a block or epoch to query. * - `{ blockId }`: Block hash or height. * - `{ epochId }`: Epoch hash. * - `null`: Current epoch. */ viewValidators(params?: ViewValidatorsArgs): Promise; viewTransactionStatus({ txHash, accountId, waitUntil, }: ViewTransactionStatusArgs): Promise; viewTransactionStatusWithReceipts({ txHash, accountId, waitUntil, }: ViewTransactionStatusArgs): Promise; viewTransactionReceipt(receiptId: string): Promise; /** * Sends a signed transaction to the RPC * * @param signedTransaction The signed transaction being sent * @param waitUntil */ sendTransactionUntil(signedTransaction: SignedTransaction, waitUntil: TxExecutionStatus): Promise; /** * Sends a signed transaction to the RPC and waits until transaction is fully complete * @see [https://docs.near.org/docs/develop/front-end/rpc#send-transaction-await](https://docs.near.org/docs/develop/front-end/rpc#general-validator-status) * * @param signedTransaction The signed transaction being sent */ sendTransaction(signedTransaction: SignedTransaction): Promise; /** * Sends a signed transaction to the RPC and immediately returns transaction hash * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#send-transaction-async) * @param signedTransaction The signed transaction being sent * @returns {Promise} */ sendTransactionAsync(signedTransaction: SignedTransaction): Promise; /** * Query the RPC by passing an {@link RpcQueryRequest } * @see [https://docs.near.org/api/rpc/contracts](https://docs.near.org/api/rpc/contracts) * */ query>(params: RpcQueryRequest$1): Promise; /** * Query changes in block from the RPC * pass block_id OR finality as blockQuery, not both * @see [https://docs.near.org/api/rpc/block-chunk](https://docs.near.org/api/rpc/block-chunk) */ blockChanges(blockQuery: BlockReference): Promise; /** * Gets the protocol config at a block from RPC * * @param blockReference specifies the block to get the protocol config for */ experimental_protocolConfig(blockReference: BlockReference | { sync_checkpoint: 'genesis'; }): Promise; /** * Gets a light client execution proof for verifying execution outcomes * @see [https://github.com/nearprotocol/NEPs/blob/master/specs/ChainSpec/LightClient.md#light-client-proof](https://github.com/nearprotocol/NEPs/blob/master/specs/ChainSpec/LightClient.md#light-client-proof) */ lightClientProof(request: LightClientProofRequest): Promise; /** * Returns the next light client block as far in the future as possible from the last known hash * to still be able to validate from that hash. This will either return the last block of the * next epoch, or the last final known block. * * @see [https://github.com/near/NEPs/blob/master/specs/ChainSpec/LightClient.md#light-client-block](https://github.com/near/NEPs/blob/master/specs/ChainSpec/LightClient.md#light-client-block) */ nextLightClientBlock(request: NextLightClientBlockRequest): Promise; /** * Gets access key changes for a given array of accountIds * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-access-key-changes-all) */ accessKeyChanges(accountIdArray: string[], blockQuery: BlockReference): Promise; /** * Gets single access key changes for a given array of access keys * pass block_id OR finality as blockQuery, not both * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-access-key-changes-single) */ singleAccessKeyChanges(accessKeyArray: AccessKeyWithPublicKey[], blockQuery: BlockReference): Promise; /** * Gets account changes for a given array of accountIds * pass block_id OR finality as blockQuery, not both * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-account-changes) */ accountChanges(accountIdArray: string[], blockQuery: BlockReference): Promise; /** * Gets contract state changes for a given array of accountIds * pass block_id OR finality as blockQuery, not both * Note: If you pass a keyPrefix it must be base64 encoded * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-contract-state-changes) */ contractStateChanges(accountIdArray: string[], blockQuery: BlockReference, keyPrefix?: string): Promise; /** * Gets contract code changes for a given array of accountIds * pass block_id OR finality as blockQuery, not both * Note: Change is returned in a base64 encoded WASM file * See [docs for more info](https://docs.near.org/docs/develop/front-end/rpc#view-contract-code-changes) */ contractCodeChanges(accountIdArray: string[], blockQuery: BlockReference): Promise; /** * Directly call the RPC specifying the method and params * * @param method RPC method * @param params Parameters to the method */ sendJsonRpc['result']>(method: Method, params: Params): Promise; } /** * Signs using in KeyPair. */ declare class KeyPairSigner extends Signer { private readonly key; constructor(key: KeyPair); static fromSecretKey(encodedKey: KeyPairString): KeyPairSigner; getPublicKey(): Promise; protected signBytes(bytes: Uint8Array): Promise; } /** * Signs using Multiple Keys, rotating through them for parallel transaction signing. * * This signer is designed for high-throughput scenarios where you want to sign * multiple transactions in parallel using different keys (to avoid nonce conflicts). * * @example * ```ts * const signer = new MultiKeySigner([key1, key2, key3]); * const account = new Account('account.near', provider, signer); * * // These will use different keys in rotation * await Promise.all([ * account.transfer({ receiverId: 'bob.near', amount: 1n }), * account.transfer({ receiverId: 'alice.near', amount: 2n }), * account.transfer({ receiverId: 'carol.near', amount: 3n }), * ]); * ``` */ declare class MultiKeySigner extends Signer { private readonly keys; private keyIndex; constructor(keys: KeyPair[]); static fromSecretKeys(encodedKeys: KeyPairString[]): MultiKeySigner; /** * Returns the next public key in rotation. * Each call rotates to the next key, enabling parallel transaction creation * where each transaction gets a different key. */ getPublicKey(): Promise; /** * Find the key pair that matches a given public key. */ private findKeyByPublicKey; protected signBytes(_bytes: Uint8Array): Promise; /** * Signs a NEP-413 message using the first key in the set. * This is because NEP-413 messages are not typically parallelized, * so we use a consistent key for signing. */ signNep413Message(accountId: string, params: MessagePayload): Promise; /** * Signs a transaction using the key that matches the transaction's public key. * This ensures parallel transactions each get signed with the correct key. */ signTransaction(transaction: Transaction): Promise; /** * Signs a delegate action using the key that matches the action's public key. * This ensures parallel meta-transactions each get signed with the correct key. */ signDelegateAction(delegateAction: DelegateAction): Promise; } declare class UnsupportedSerializationError extends Error { constructor(methodName: string, serializationType: string); } declare class UnknownArgumentError extends Error { constructor(actualArgName: string, expectedArgNames: string[]); } declare class ArgumentSchemaError extends Error { constructor(argName: string, errors: ValidationError[]); } declare class ConflictingOptions extends Error { constructor(); } type IsNullable = [null] extends [T] ? true : false; type IsNever = [T] extends [never] ? true : false; type IsNarrowable = IsNever<(T extends U ? true : false) & (U extends T ? false : true)> extends true ? false : true; type IsFullyOptional = IsNever extends true ? true : { [K in keyof T]-?: {} extends Pick ? true : false; }[keyof T] extends true ? true : false; type Prettify = { [K in keyof T]: T[K]; } & {}; type ExtractAbiFunctions = Extract<_functions[number], { kind: abiFunctionKind; }>; type ExtractAbiFunction, abiFunctionKind extends AbiFunctionKind = AbiFunctionKind> = Extract, { name: functionName; }>; type ExtractAbiFunctionNames = ExtractAbiFunctions['name']; type GetViewFunction, abiFunction extends AbiFunction = ExtractAbiFunction, _args extends Record = ContractFunctionArgs, _return = ContractFunctionReturnType> = IsNarrowable extends true ? IsNever<_args> extends true ? (params?: { blockQuery?: BlockReference; }) => Promise> : IsFullyOptional<_args> extends true ? (params?: { blockQuery?: BlockReference; args?: _args; }) => Promise> : (params: { blockQuery?: BlockReference; args: _args; }) => Promise> : (params?: { blockQuery?: BlockReference; args?: Record; }) => Promise; type GetCallFunction, abiFunction extends AbiFunction = ExtractAbiFunction, _args extends Record = ContractFunctionArgs, _return = ContractFunctionReturnType> = IsNarrowable extends true ? IsNever<_args> extends true ? (params: { deposit?: bigint; gas?: bigint; waitUntil?: TxExecutionStatus; account: Account; }) => Promise> : (params: { deposit?: bigint; gas?: bigint; args: _args; waitUntil?: TxExecutionStatus; account: Account; }) => Promise> : (params: { deposit?: bigint; gas?: bigint; args?: Record; waitUntil?: TxExecutionStatus; account: Account; }) => Promise; type ContractFunctionReturnType = abiFunction extends { result: infer Result; } ? Result extends AbiType ? Result['type_schema'] extends Schema ? ResolveSchemaType : unknown : unknown : void; type ContractFunctionArgs = abiFunction extends { params: infer Params; } ? Params extends AbiParameters ? Params['args'] extends { name: any; type_schema: any; }[] ? Prettify<{ [Arg in Params['args'][number] as IsNullable> extends false ? Arg['name'] & string : never]: ResolveSchemaType; } & { [Arg in Params['args'][number] as IsNullable> extends true ? Arg['name'] & string : never]?: ResolveSchemaType; }> : never : never : never; type ToArray = T extends any[] ? T : [T]; type JSONSchemaTypeMap = { string: string; integer: number; number: number; boolean: boolean; null: null; }; type EnumValue = NonNullable; type ResolveEnum = schema['enum'] extends (infer S)[] ? S : never; type ResolveType = ToArray extends (infer T)[] ? T extends 'array' ? ResolveArrayType : T extends 'object' ? ResolveObjectType : T extends keyof JSONSchemaTypeMap ? JSONSchemaTypeMap[T] : never : never; type ResolveArrayType = schema extends { items: infer Items; } ? Items extends Schema ? schema extends { uniqueItems: true; } ? Set> : ResolveSchemaType[] : unknown[] : unknown[]; type ResolveObjectType = schema extends { properties: Record; } ? schema extends { required: string[]; } ? Prettify<{ -readonly [Key in keyof schema['properties'] as Key extends schema['required'][number] ? Key : never]: ResolveSchemaType; } & { -readonly [Key in keyof schema['properties'] as Key extends schema['required'][number] ? never : Key]?: ResolveSchemaType; }> : { -readonly [Key in keyof schema['properties']]?: ResolveSchemaType; } : schema extends { additionalProperties: Schema; } ? Record> : Record; type ResolveRef = ref extends keyof _definitions ? _definitions[ref] extends Schema ? ResolveSchemaType : never : never; /** @todo: it has to use advanced OneOf type that ensures only exact type is allowed */ type ResolveOneOf = schema['oneOf'] extends (infer S)[] ? S extends Schema ? ResolveSchemaType : never : never; type ResolveAnyOf = schema['anyOf'] extends (infer S)[] ? S extends Schema ? ResolveSchemaType : never : never; type ResolveSchemaType = schema extends boolean ? schema : schema extends { enum: EnumValue; } ? ResolveEnum : schema extends { type: infer Type; } ? ResolveType : schema extends { $ref: `#/definitions/${infer Ref}`; } ? ResolveRef : schema extends { oneOf: Schema[]; } ? ResolveOneOf : schema extends { anyOf: Schema[]; } ? ResolveAnyOf : never; type ContractParameters = { contractId: contractId; provider: Provider; abi: abi; }; type ContractReturnType : string, _callFunctionNames extends string = abi extends AbiRoot ? AbiRoot extends abi ? string : ExtractAbiFunctionNames : string> = Prettify<(IsNever<_viewFunctionNames> extends false ? { view: { [functionName in _viewFunctionNames]: GetViewFunction; }; } : {}) & (IsNever<_callFunctionNames> extends false ? { call: { [functionName in _callFunctionNames]: GetCallFunction; }; } : {}) & { abi: abi; contractId: contractId; }>; type ContractConstructor = { new (params: ContractParameters): ContractReturnType; new (params: Prettify, 'abi'>>): Prettify, 'abi'>>; }; declare const Contract: ContractConstructor; type NumericString$1 = `${number}`; type BigintString = `${bigint}`; declare function gigaToGas(giga: NumericString$1 | number): bigint; declare function teraToGas(tera: NumericString$1 | number): bigint; declare function nearToYocto(near: number | NumericString$1): bigint; declare function yoctoToNear(yocto: bigint | BigintString, decimals?: number): NumericString$1; type NumericString = `${number}`; /** * Exponent for calculating how many indivisible units are there in one NEAR. See {@link NEAR_NOMINATION}. */ declare const NEAR_NOMINATION_EXP = 24; /** * Number of indivisible units in one NEAR. Derived from {@link NEAR_NOMINATION_EXP}. */ declare const NEAR_NOMINATION: bigint; /** * @deprecated use {@link units!yoctoToNear} from 'near-api-js' instead. * * Convert account balance value from internal indivisible units to NEAR. 1 NEAR is defined by {@link NEAR_NOMINATION}. * Effectively this divides given amount by {@link NEAR_NOMINATION}. * * @param balance decimal string representing balance in smallest non-divisible NEAR units (as specified by {@link NEAR_NOMINATION}) * @param fracDigits number of fractional digits to preserve in formatted string. Balance is rounded to match given number of digits. * @returns Value in Ⓝ */ declare function formatNearAmount(balance: string | number | bigint, fracDigits?: number): string; /** * @deprecated use {@link units!nearToYocto} from 'near-api-js' instead. * * Convert human readable NEAR amount to internal indivisible units. * Effectively this multiplies given amount by {@link NEAR_NOMINATION}. * * @param amount decimal string (potentially fractional) denominated in NEAR. * @returns The parsed yoctoⓃ amount * @throws {Error} if the amount is empty or invalid */ declare function parseNearAmount(amount: NumericString | number): string; /** * Encodes a Uint8Array or string into base58 * @param value Uint8Array or string representing a borsh encoded object * @returns string base58 encoding of the value */ declare function baseEncode(value: Uint8Array | string): string; /** * Decodes a base58 string into a Uint8Array * @param value base58 encoded string * @returns Uint8Array representing the decoded value */ declare function baseDecode(value: string): Uint8Array; /** * Encodes a Uint8Array into a base64 string * @param bytes Uint8Array to encode * @returns base64 encoded string */ declare function base64Encode(bytes: Uint8Array): string; /** * Decodes a base64 string into a Uint8Array * @param str base64 encoded string * @returns Uint8Array representing the decoded value */ declare function base64Decode(str: string): Uint8Array; /** * Encodes a string into a Uint8Array using UTF-8 * @param str string to encode * @returns Uint8Array representing the UTF-8 bytes */ declare function stringToBytes(str: string): Uint8Array; /** * Decodes a Uint8Array into a string using UTF-8 * @param bytes Uint8Array to decode * @returns decoded string */ declare function bytesToString(bytes: Uint8Array): string; /** @hidden */ declare function getTransactionLastResult(txResult: FinalExecutionOutcome | RpcTransactionResponse): Exclude; declare function sortBigIntAsc(a: bigint, b: bigint): 0 | 1 | -1; /** Finds seat price given validators stakes and number of seats. * Calculation follow the spec: https://nomicon.io/Economics/README.html#validator-selection * @param validators current or next epoch validators. * @param maxNumberOfSeats maximum number of seats in the network. * @param minimumStakeRatio minimum stake ratio * @param protocolVersion version of the protocol from genesis config */ declare function findSeatPrice(validators: (CurrentEpochValidatorInfo | NextEpochValidatorInfo)[], maxNumberOfSeats: number, minimumStakeRatio: number[], protocolVersion?: number): bigint; interface ChangedValidatorInfo { current: CurrentEpochValidatorInfo; next: NextEpochValidatorInfo; } interface EpochValidatorsDiff { newValidators: NextEpochValidatorInfo[]; removedValidators: CurrentEpochValidatorInfo[]; changedValidators: ChangedValidatorInfo[]; } /** Diff validators between current and next epoch. * Returns additions, subtractions and changes to validator set. * @param currentValidators list of current validators. * @param nextValidators list of next validators. */ declare function diffEpochValidators(currentValidators: CurrentEpochValidatorInfo[], nextValidators: NextEpochValidatorInfo[]): EpochValidatorsDiff; export { type AbiRoot, AccessKey, AccessKeyView, AccessKeyWithPublicKey, Account, AccountView, Action, ArgumentSchemaError, ArgumentTypeError, Assignable, BlockId, BlockReference, type CallFunctionRequest, type ChangedValidatorInfo, ChunkId, ConflictingOptions, Contract, ContractCodeView, Signature as CryptoSignature, CurrentEpochValidatorInfo, DelegateAction, type EpochValidatorsDiff, ErrorContext, FailoverRpcProvider, FinalExecutionOutcome, JsonRpcProvider, KeyPair, KeyPairEd25519, KeyPairMLDSA65, KeyPairSecp256k1, KeyPairSigner, KeyPairString, LightClientProofRequest, MultiKeySigner, NEAR_NOMINATION, NEAR_NOMINATION_EXP, NextEpochValidatorInfo, NextLightClientBlockRequest, PositionalArgsError, Provider, PublicKey, type RpcQueryRequest, SerializedReturnValue, Signature$1 as Signature, SignedMessage, SignedTransaction, Signer, Transaction, TxExecutionStatus, TypedError, UnknownArgumentError, UnsupportedSerializationError, type ViewAccessKeyListRequest, type ViewAccessKeyRequest, type ViewAccountRequest, type ViewCodeRequest, type ViewStateRequest, actions, base64Decode, base64Encode, baseDecode, baseEncode, bytesToString, createTransaction, diffEpochValidators, exponentialBackoff, findSeatPrice, formatNearAmount, getTransactionLastResult, gigaToGas, nearToYocto, parseNearAmount, sortBigIntAsc, stringToBytes, stringifyJsonOrBytes, teraToGas, yoctoToNear };