Coder Social home page Coder Social logo

Comments (4)

StarAurryon avatar StarAurryon commented on May 25, 2024

Hello everyone,
I propose something like this to build a method from an account:
store.GetDepositAddresses(account.ID())
for key, value := range accAddr {
addr, _ := address.GenerateAddress(seed, key, value.SecurityLevel, true)
}

However the checksum seem different from the one generated with account.AllocateDepositAddress(conds) that is using acc.setts.AddrGen(acc.lastKeyIndex, acc.setts.SecurityLevel, true).

Which is weird as the parameters seem to be quite the same.

Regards

from iota.go.

luca-moser avatar luca-moser commented on May 25, 2024

Hey Star

Badger store should keep a track of all addresses Hashes and there should be a method in account to retrieve them instead of using store.GetDepositAddresses(account.ID())

The account storage will ever only hold the addresses which are currently active for receiving deposits and not all addresses the account ever generated to save space.

However the checksum seem different from the one generated with account.AllocateDepositAddress(conds) that is using acc.setts.AddrGen(acc.lastKeyIndex, acc.setts.SecurityLevel, true).

Is the checksum of the address different or the entire address? Note that AllocateDepositAddress()'s checksum is the checksum over all the values of the CDA and not just the address, that why it is different.

Can you please explain exactly your use case and what you're trying to achieve?

from iota.go.

StarAurryon avatar StarAurryon commented on May 25, 2024

Hello,

Is the checksum of the address different or the entire address? Note that AllocateDepositAddress()'s checksum is the checksum over all the values of the CDA and not just the address, that why it is different.

Only the checksum part: you have answered my question.

Can you please explain exactly your use case and what you're trying to achieve?

I'm basically trying to send data from external temp sensors to the tangle (0 value transaction with MAM). I would like to get the results individually and per month (I would generate month * devices number addresses).

My understanding is that I need first to retrieve the transactions and then decrypt the SignatureMessageFragment with MAM. And for that I need the destination address as we can't get the source one.

Thanks in advance,

BTW the discord link is not working anymore for me.

from iota.go.

luca-moser avatar luca-moser commented on May 25, 2024

The account module is not MAM agnostic and has no concept on how to listen on addresses which were generated via MAM. Unfortunately this doesn't work. You'll have to write a separate program which simply uses the api.API.

from iota.go.

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.