-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property 'EvmApi' does not exist on type 'typeof Moralis' #1129
Comments
How you import the SDK? |
import Moralis from 'moralis';
import "@moralisweb3/common-evm-utils" // I tried to add this |
|
A typescript project. but I use pnpm
<ref *1> [Function: Moralis] {
ACL: [Function: ParseACL],
Analytics: { track: [Function: track] },
AnonymousUtils: {
isLinked: [Function: isLinked],
logIn: [Function: logIn],
link: [Function: link],
_getAuthProvider: [Function: _getAuthProvider]
},
Cloud: {
getJobStatus: [Function: getJobStatus],
getJobsData: [Function: getJobsData],
run: [Function: run],
startJob: [Function: startJob]
},
CLP: [Function: ParseCLP],
CoreManager: {
get: [Function: get],
set: [Function: set],
setAnalyticsController: [Function: setAnalyticsController],
getAnalyticsController: [Function: getAnalyticsController],
setCloudController: [Function: setCloudController],
getCloudController: [Function: getCloudController],
setConfigController: [Function: setConfigController],
getConfigController: [Function: getConfigController],
setCryptoController: [Function: setCryptoController],
getCryptoController: [Function: getCryptoController],
setFileController: [Function: setFileController],
getFileController: [Function: getFileController],
setInstallationController: [Function: setInstallationController],
getInstallationController: [Function: getInstallationController],
setObjectController: [Function: setObjectController],
getObjectController: [Function: getObjectController],
setObjectStateController: [Function: setObjectStateController],
getObjectStateController: [Function: getObjectStateController],
setPushController: [Function: setPushController],
getPushController: [Function: getPushController],
setQueryController: [Function: setQueryController],
getQueryController: [Function: getQueryController],
setRESTController: [Function: setRESTController],
getRESTController: [Function: getRESTController],
setSchemaController: [Function: setSchemaController],
getSchemaController: [Function: getSchemaController],
setSessionController: [Function: setSessionController],
getSessionController: [Function: getSessionController],
setStorageController: [Function: setStorageController],
setLocalDatastoreController: [Function: setLocalDatastoreController],
getLocalDatastoreController: [Function: getLocalDatastoreController],
setLocalDatastore: [Function: setLocalDatastore],
getLocalDatastore: [Function: getLocalDatastore],
getStorageController: [Function: getStorageController],
setAsyncStorage: [Function: setAsyncStorage],
getAsyncStorage: [Function: getAsyncStorage],
setWebSocketController: [Function: setWebSocketController],
getWebSocketController: [Function: getWebSocketController],
setUserController: [Function: setUserController],
getUserController: [Function: getUserController],
setLiveQueryController: [Function: setLiveQueryController],
getLiveQueryController: [Function: getLiveQueryController],
setHooksController: [Function: setHooksController],
getHooksController: [Function: getHooksController]
},
Config: [Function: ParseConfig],
Error: [Function: ParseError] {
OTHER_CAUSE: -1,
INTERNAL_SERVER_ERROR: 1,
CONNECTION_FAILED: 100,
OBJECT_NOT_FOUND: 101,
INVALID_QUERY: 102,
INVALID_CLASS_NAME: 103,
MISSING_OBJECT_ID: 104,
INVALID_KEY_NAME: 105,
INVALID_POINTER: 106,
INVALID_JSON: 107,
COMMAND_UNAVAILABLE: 108,
NOT_INITIALIZED: 109,
INCORRECT_TYPE: 111,
INVALID_CHANNEL_NAME: 112,
PUSH_MISCONFIGURED: 115,
OBJECT_TOO_LARGE: 116,
OPERATION_FORBIDDEN: 119,
CACHE_MISS: 120,
INVALID_NESTED_KEY: 121,
INVALID_FILE_NAME: 122,
INVALID_ACL: 123,
TIMEOUT: 124,
INVALID_EMAIL_ADDRESS: 125,
MISSING_CONTENT_TYPE: 126,
MISSING_CONTENT_LENGTH: 127,
INVALID_CONTENT_LENGTH: 128,
FILE_TOO_LARGE: 129,
FILE_SAVE_ERROR: 130,
DUPLICATE_VALUE: 137,
INVALID_ROLE_NAME: 139,
EXCEEDED_QUOTA: 140,
SCRIPT_FAILED: 141,
VALIDATION_ERROR: 142,
INVALID_IMAGE_DATA: 143,
UNSAVED_FILE_ERROR: 151,
INVALID_PUSH_TIME_ERROR: 152,
FILE_DELETE_ERROR: 153,
FILE_DELETE_UNNAMED_ERROR: 161,
REQUEST_LIMIT_EXCEEDED: 155,
DUPLICATE_REQUEST: 159,
INVALID_EVENT_NAME: 160,
USERNAME_MISSING: 200,
PASSWORD_MISSING: 201,
USERNAME_TAKEN: 202,
EMAIL_TAKEN: 203,
EMAIL_MISSING: 204,
EMAIL_NOT_FOUND: 205,
SESSION_MISSING: 206,
MUST_CREATE_USER_THROUGH_SIGNUP: 207,
ACCOUNT_ALREADY_LINKED: 208,
INVALID_SESSION_TOKEN: 209,
MFA_ERROR: 210,
MFA_TOKEN_REQUIRED: 211,
LINKED_ID_MISSING: 250,
INVALID_LINKED_SESSION: 251,
UNSUPPORTED_SERVICE: 252,
INVALID_SCHEMA_OPERATION: 255,
AGGREGATE_ERROR: 600,
FILE_READ_ERROR: 601,
X_DOMAIN_REQUEST: 602
},
FacebookUtils: {
init: [Function: init],
isLinked: [Function: isLinked],
logIn: [Function: logIn],
link: [Function: link],
unlink: [Function: unlink],
_getAuthProvider: [Function: _getAuthProvider]
},
File: [Function: ParseFile],
GeoPoint: [Function: ParseGeoPoint],
Polygon: [Function: ParsePolygon],
Installation: [Function: Installation] { className: '_Installation' },
LocalDatastore: {
isEnabled: false,
isSyncing: false,
fromPinWithName: [Function: fromPinWithName],
pinWithName: [Function: pinWithName],
unPinWithName: [Function: unPinWithName],
_getAllContents: [Function: _getAllContents],
_getRawStorage: [Function: _getRawStorage],
_clear: [Function: _clear],
_handlePinAllWithName: [Function: _handlePinAllWithName],
_handleUnPinAllWithName: [Function: _handleUnPinAllWithName],
_getChildren: [Function: _getChildren],
_traverse: [Function: _traverse],
_serializeObjectsFromPinName: [Function: _serializeObjectsFromPinName],
_serializeObject: [Function: _serializeObject],
_updateObjectIfPinned: [Function: _updateObjectIfPinned],
_destroyObjectIfPinned: [Function: _destroyObjectIfPinned],
_updateLocalIdForObject: [Function: _updateLocalIdForObject],
updateFromServer: [Function: updateFromServer],
getKeyForObject: [Function: getKeyForObject],
getPinName: [Function: getPinName],
checkIfEnabled: [Function: checkIfEnabled]
},
Object: [Function: ParseObject],
Op: {
Set: [Function: SetOp],
Unset: [Function: UnsetOp],
Increment: [Function: IncrementOp],
Add: [Function: AddOp],
Remove: [Function: RemoveOp],
AddUnique: [Function: AddUniqueOp],
Relation: [Function: RelationOp]
},
Web3API: [Function: Web3Api] {
baseURL: 'https://deep-index.moralis.io/api/v2',
BodyParamTypes: { setBody: 'set body', property: 'property' },
checkObjEqual: [Function (anonymous)],
native: {
getBlock: [Function (anonymous)],
getDateToBlock: [Function (anonymous)],
getLogsByAddress: [Function (anonymous)],
getNFTTransfersByBlock: [Function (anonymous)],
getTransaction: [Function (anonymous)],
getContractEvents: [Function (anonymous)],
runContractFunction: [Function (anonymous)]
},
account: {
getTransactions: [Function (anonymous)],
getNativeBalance: [Function (anonymous)],
getTokenBalances: [Function (anonymous)],
getTokenTransfers: [Function (anonymous)],
getNFTs: [Function (anonymous)],
getNFTTransfers: [Function (anonymous)],
getNFTsForContract: [Function (anonymous)]
},
token: {
getTokenMetadata: [Function (anonymous)],
getNFTTrades: [Function (anonymous)],
getNFTLowestPrice: [Function (anonymous)],
getTokenMetadataBySymbol: [Function (anonymous)],
getTokenPrice: [Function (anonymous)],
getTokenAddressTransfers: [Function (anonymous)],
getTokenAllowance: [Function (anonymous)],
searchNFTs: [Function (anonymous)],
getNftTransfersFromToBlock: [Function (anonymous)],
getAllTokenIds: [Function (anonymous)],
getContractNFTTransfers: [Function (anonymous)],
getNFTOwners: [Function (anonymous)],
getNFTMetadata: [Function (anonymous)],
reSyncMetadata: [Function (anonymous)],
getTokenIdMetadata: [Function (anonymous)],
getTokenIdOwners: [Function (anonymous)],
getWalletTokenIdTransfers: [Function (anonymous)]
},
contract: { syncNFTContract: [Function (anonymous)] },
resolve: {
resolveDomain: [Function (anonymous)],
resolveAddress: [Function (anonymous)]
},
defi: {
getPairReserves: [Function (anonymous)],
getPairAddress: [Function (anonymous)]
},
storage: { uploadFolder: [Function (anonymous)] },
info: {
web3ApiVersion: [Function (anonymous)],
endpointWeights: [Function (anonymous)]
}
},
SolanaAPI: [Function: SolanaApi] {
baseURL: 'https://solana-gateway.moralis.io',
BodyParamTypes: { setBody: 'set body', property: 'property' },
account: {
balance: [Function (anonymous)],
getSPL: [Function (anonymous)],
getNFTs: [Function (anonymous)],
getPortfolio: [Function (anonymous)]
},
nft: { getNFTMetadata: [Function (anonymous)] },
token: { getTokenPrice: [Function (anonymous)] }
},
Push: { send: [Function: send] },
Query: [Function: ParseQuery],
Relation: [Function: ParseRelation],
Role: [Function: ParseRole] { className: '_Role' },
Schema: [Function: ParseSchema],
Session: [Function: ParseSession] { className: '_Session' },
Storage: {
async: [Function: async],
getItem: [Function: getItem],
getItemAsync: [Function: getItemAsync],
setItem: [Function: setItem],
setItemAsync: [Function: setItemAsync],
removeItem: [Function: removeItem],
removeItemAsync: [Function: removeItemAsync],
getAllKeys: [Function: getAllKeys],
getAllKeysAsync: [Function: getAllKeysAsync],
generatePath: [Function: generatePath],
_clear: [Function: _clear]
},
User: [Function: ParseUser] { className: '_User' },
LiveQuery: EventEmitter {
_events: [Object: null prototype] { error: [Function (anonymous)] },
_eventsCount: 1,
_maxListeners: undefined,
open: [Function (anonymous)],
close: [Function (anonymous)],
[Symbol(kCapture)]: false
},
LiveQueryClient: [Function: LiveQueryClient],
Web3: [Circular *1],
Units: [Function: UnitConverter],
Elrond: [Function: MoralisErd],
Erd: [Function: MoralisErd],
Dot: [Function: MoralisDot],
UI: { openPrompt: [Function: openPrompt] },
Chains: {
ETH_MAINNET: '0x1',
ETH_ROPSTEN: '0x3',
ETH_GOERLI: '0x5',
ETH_KOVAN: '0x2a',
ETH_RINKEBY: '0x4',
ETH_LOCALDEVCHAIN: '0x539',
POLYGON_MAINNET: '0x89',
POLYGON_MUMBAI: '0x13881',
BSC_MAINNET: '0x38',
BSC_TESTNET: '0x61',
AVAX_MAINNET: '0xa86a',
AVAX_TESTNET: '0xa869',
FANTOM_MAINNET: '0xfa',
CRONOS_MAINNET: '0x19',
CRONOS_TESTNET: '0x152'
},
AbstractWeb3Connector: [Function: AbstractWeb3Connector],
_request: [Function (anonymous)],
_ajax: [Function (anonymous)],
_decode: [Function (anonymous)],
_encode: [Function (anonymous)],
_getInstallationId: [Function (anonymous)],
enableLocalDatastore: [Function (anonymous)],
isLocalDatastoreEnabled: [Function (anonymous)],
dumpLocalDatastore: [Function (anonymous)],
enableEncryptedUser: [Function (anonymous)],
isEncryptedUserEnabled: [Function (anonymous)],
Moralis: [Circular *1]
} |
Could you update the package version to |
It worked! thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New Bug Report
Checklist
Issue Description
According to the documentation, the
Moralis.EvmApi
object should be defined. But when I try to access it, I get the following error in vscode:Property 'EvmApi' does not exist on type 'typeof Moralis'
Documentation with EvmApi: https://docs.moralis.io/web3-data-api/reference/get-erc20-transfers
Steps + code to reproduce
Just try to access
Moralis.EvmApi
.Actual Outcome
Expected Outcome
Moralis.EvmApi
to be defined.Environment
I still didn't run it on any environment. But I will try to run it in the browser.
Server
FILL_THIS_OUT
Client
1.11.0
MacOS Ventura 13.3.1
chrome 113
Logs
None
The text was updated successfully, but these errors were encountered: