Giter VIP home page Giter VIP logo

Comments (17)

bowenwang1996 avatar bowenwang1996 commented on June 17, 2024 1

@frol @k06a account balance can be queried through query rpc. Merkle root of tx results is included in the chunk header.

from near-api-js.

MaksymZavershynskyi avatar MaksymZavershynskyi commented on June 17, 2024

Assigning to @frol to provide info on which of this stuff is currently available through RPC, as requested by @vgrichina in https://docs.google.com/document/d/1smsGXpZEWkoSbLb0dOMwCWfKYmClERq7bqEFLC-X0NE/edit

from near-api-js.

frol avatar frol commented on June 17, 2024

Hmm, either I don't understand something, or most of the "blockchain structure" items are, in fact, implemented.

I need some clarification on the following items:

  • Main coin balance -- what is that?
  • Merkle proofs of different structures -- which structures? chunk RPC exposes encoded_merkle_root. Is this what is needed?

from near-api-js.

k06a avatar k06a commented on June 17, 2024

@frol very nice!

(Though, I don't understand what transaction.index is. You can only query by transaction hash)

I mean if anyone wish to enumerate:

  • All Txs in chunk
  • All chunks in block

Main coin balance -- what is that?

"Main coin balance" is NEAR balance, since NEAR is the main coin on the platform.

Merkle proofs of different structures -- which structures? chunk RPC exposes encoded_merkle_root. Is this what is needed?

It would be really useful to have Merkle proofs for:

  • Tx in chunk
  • Chunk in Block

I also forgot about TxResults with Merkle roots.

from near-api-js.

frol avatar frol commented on June 17, 2024

I mean if anyone wish to enumerate

Well, it makes perfect sense in the future once we have lots of transactions in a single chunk. I am keeping this in mind when I design the new API (WAMP-proto based) in a background. The current RPC does not have this.

"Main coin balance"

Is it fine to be exposed via the status RPC? /cc @nearmax I need to learn where this information is available inside nearcore.

It would be really useful to have Merkle proofs for: Chunk in block

The block RPC and chunk RPC provide encoded_merkle_root of a chunk. Is this what is needed?

It would be really useful to have Merkle proofs for: Tx in chunk
It would be really useful to have Merkle proofs for: TxResults

I don't see this information exposed via RPC. Please, create a tracking issue (please, include the motivation and whether it is blocking you).

from near-api-js.

frol avatar frol commented on June 17, 2024

@bowenwang1996 Which account should one query to get the "main coin balance"?

from near-api-js.

bowenwang1996 avatar bowenwang1996 commented on June 17, 2024

Actually I am slightly confused here. Does "main coin balance" mean total supply or something account specific?

from near-api-js.

k06a avatar k06a commented on June 17, 2024

@bowenwang1996 "coin" is native blockchain asset, "token" is smart contract based asset.

from near-api-js.

bowenwang1996 avatar bowenwang1996 commented on June 17, 2024

@k06a I understand. I am asking whether you are talking about account balance or total supply.

from near-api-js.

k06a avatar k06a commented on June 17, 2024

@bowenwang1996 account balance

from near-api-js.

bowenwang1996 avatar bowenwang1996 commented on June 17, 2024

I see. For that you can use query rpc and pass account/<account_id> to get the account view, which contains balance.

from near-api-js.

MaksymZavershynskyi avatar MaksymZavershynskyi commented on June 17, 2024

@frol It seems like we have figured out that @k06a was asking for the thing we already have, no need to add it.

from near-api-js.

vgrichina avatar vgrichina commented on June 17, 2024

@k06a is there anything still missing apart from interface for external wallet signing?

from near-api-js.

MaksymZavershynskyi avatar MaksymZavershynskyi commented on June 17, 2024

@k06a ping.

from near-api-js.

k06a avatar k06a commented on June 17, 2024

@vgrichina will check when will work on EthRelay

from near-api-js.

janedegtiareva avatar janedegtiareva commented on June 17, 2024

Ping from a bugscrub: is this issue still relevant? @k06a

from near-api-js.

k06a avatar k06a commented on June 17, 2024

@janedegtiareva not really, most of the features are already implemented

from near-api-js.

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.