Coder Social home page Coder Social logo

Comments (2)

vlmold avatar vlmold commented on August 19, 2024 1

as you can see from these screens, ERROR:did_service:ErrorCode.CommonInvalidStructure didn't give enough information before. but the real reason was in parameter format.

When I call this function with these params :
DID format :
image
Seed format:
image

For example, for these params everything works good.
Did : Y87wM6ceVarBmzcPTqPGdw
Seed: b2fff055f8d649d0e91ac71e889ba849372612d3ff2968109245cad79770b3d1

client code example :

seed,err := base58.Decode("D3jvacNU1TCUFXkM8mJAr5zcPpXdvMgzFqUVeTP4BJqE")
	hexSeed := hex.EncodeToString(seed)


	pub, _, err := ed25519.GenerateKey(bytes.NewReader(seed))

	encodedDID := base58.Encode(pub[:16])

	fmt.Println(encodedDID) //len(encodedDID) = 22, encoded 16 byte value

	fmt.Println(hexSeed)

	csResponse, err := didServiceClient.CreateAndStoreMyDid(context.Background(),
		&identitylayer.CreateAndStoreMyDidRequest{WalletHandle: walletResponse.WalletHandle,
			DidJson: &identitylayer.CreateAndStoreMyDidJsonMessage{
				Did: encodedDID,
				Seed: hexSeed,
				CryptoType: "ed25519",
				Cid: false,
	}})

from miu.

bootstrapsp avatar bootstrapsp commented on August 19, 2024

thanks for highlighting the short-comings - whole error handling layer needs major overhaul! I am gonna start looking into that as time permits. Much appreciated!

from miu.

Related Issues (18)

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.