Git Product home page Git Product logo

Comments (6)

andreibancioiu avatar andreibancioiu commented on September 3, 2024 1

Hello @keyur555!

Please use getToken() / getNFTToken() from the old (current) provider for the moment: https://github.com/ElrondNetwork/elrond-sdk-erdjs/blob/main/src/apiProvider.ts.

The new INetworkProvider interface is designed to be a replacement for IApiProvider and IProxyProvider. Though, it's not finalized yet.

from mx-sdk-js-core.

andreibancioiu avatar andreibancioiu commented on September 3, 2024 1

Hello @keyur555!

Do you think you can specify which function of the provider do you use?

In erdjs 10, the network providers have been extracted to a separate repository:

Extra reference:

from mx-sdk-js-core.

keyur555 avatar keyur555 commented on September 3, 2024

Is the import incorrect too? Because I need to import like this
import { FungibleTokenOfAccountOnNetwork } from '@elrondnetwork/erdjs/out/networkProvider/tokens'

But this is the normal I think which is not working
import { FungibleTokenOfAccountOnNetwork } from '@elrondnetwork/erdjs'

from mx-sdk-js-core.

keyur555 avatar keyur555 commented on September 3, 2024

@andreibancioiu Sorry to reopen this again. I use the ApiNetworkProvider from ErdJs 10 and the method getFungibleTokensOfAccount and I would like to access all properties of the Tokens. Including the Assets like the Logo image URL of the tokens.

I don't know it but i think it is just missing properties in the code because the API returns it?

from mx-sdk-js-core.

andreibancioiu avatar andreibancioiu commented on September 3, 2024

Indeed, the API returns it: https://devnet-api.elrond.com/tokens/WEB-5d08be

We will add the missing fields in https://github.com/ElrondNetwork/elrond-sdk-erdjs-network-providers, as well. Thanks for raising the issue 🙏

However, until then, you can switch to performing direct HTTP requests against the API (and using your own, tailored data structures). This is our current recommendation:

The default classes ApiNetworkProvider / ProxyNetworkProvider should only be used as a starting point. As your dApp matures, make sure you switch to using your own network provider, tailored to your requirements (whether deriving from the default ones or writing a new one, from scratch) that directly interacts with the Elrond API (or Gateway).

Further reference:

from mx-sdk-js-core.

schimih avatar schimih commented on September 3, 2024

Close the issue,
thanks to:
multiversx/mx-sdk-js-network-providers#14.

from mx-sdk-js-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.