Skip to content
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

[DMP 2024]: Create a core modules of cord.js sdk in Golang #165

Open
3 tasks
NiranjanAP opened this issue Feb 1, 2024 · 17 comments
Open
3 tasks

[DMP 2024]: Create a core modules of cord.js sdk in Golang #165

NiranjanAP opened this issue Feb 1, 2024 · 17 comments
Labels
DMP 2024 Issues for Dedicated Mentoring Program 2024

Comments

@NiranjanAP
Copy link
Contributor

NiranjanAP commented Feb 1, 2024

Description

cord.js is an SDK to connect to CORD. We have a requirement to write the same SDK in Golang.
As part of this we have to first create the core SDK modules that include the DID and Chainspace. Scope of this issue it to create an SDK in Golang along with any dependencies.

Goals

  • Basic framework of the SDK established, able to connect to CORD
  • Replication of all packages present currently in CORD.js ex: statement, asset, network-score etc.
  • Demo scripts for all implemented packages currently present in CORD.js, similar to statement demo-script -> https://github.com/dhiway/cord.js/blob/develop/demo/src/func-test.ts

Expected Outcome

We should have a functioning sdk written in Golang that connects to CORD and is able to make calls to CORD

Acceptance Criteria

Fully functioning SDK written in Golang with all the available methods/functions implemented
A working demo script similar to https://github.com/dhiway/cord.js/blob/develop/demo/src/func-test.ts
All the unit test cases implemented

Implementation Details

Refer cord.js repo for reference SDK written in typescript, this needs to be replicated in Golang
Refer to the documentation https://docs.cord.network/cordjs/integratecord/ for the detailed explanation on the working of demo script https://github.com/dhiway/cord.js/blob/develop/demo/src/func-test.ts
Note: There will be some dependency modules before these two modules can work

Mockups/Wireframes

NA

Product Name

cord sdk in Golang

Organisation Name

Dhiway

Domain

Open Source Library

Tech Skills Needed

Go, TypeScript

Mentors

@vatsa287 @adi-a11y @amarts @NiranjanAP

Category

Other

@NiranjanAP NiranjanAP added the DMP 2024 Issues for Dedicated Mentoring Program 2024 label Feb 1, 2024
@NiranjanAP NiranjanAP changed the title [DMP 2024]: Create a core cord.js sdk on Golang [DMP 2024]: Create a core modules of cord.js sdk in Golang Feb 1, 2024
@Shruti3004
Copy link

Want to know more about CORD? Check the whitepaper here.

@Dushyantbha012
Copy link

Dushyantbha012 commented Apr 8, 2024

I have forked the cord.js repository and read the CORD white papers but still I am not able to figure out the whole flow of code. Could you please tell me what should I do to proceed further to understand the CORD.js and its connection with CORD, I know both GoLang and TypeScript but have not worked with blockchains much so I am able to understand code in chunks but I am not able to understand how are we setting up connection with the blockchain and transferring data. @adi-a11y @NiranjanAP @amarts

@rohitkori
Copy link

Hi @NiranjanAP, I am interested in this project. I have experience working on various projects and have worked with various tech stacks like Node.js, Django, and ReactJs, as well as DevOps tools such as Docker and Kubernetes. Additionally, I am one of the coordinators of the open-source community at my college and have worked on open-source projects. Could you please provide me with more details about the project description and approach? I would appreciate your help in gaining further insights.

@yuvrajrathva
Copy link

Hi @adi-a11y , @amarts , and @NiranjanAP , I'm Yuvraj Rathva, a Computer Science and Engineering student from IIT Jodhpur. The cord sdk in Golang project by Dhiway has captured my interest, and I'm eager to contribute. With expertise in Go and JavaScript(can work with TypeScript), I believe I can effectively contribute to achieving the project goals.

This project interests me because I have an interest in Go development and have experience in using Go routines, interfaces, WaitGroup, etc. in my networking projects, along with 2 year long experience in JavaScript will definitely help me in working with TypeScript.
To know more about my experiences and projects, you can check my Github or Portfolio.

Here's how I can contribute:

  • Using Go, I will develop the necessary SDK modules to connect to CORD, which will include the DID and Chainspace modules. Utilizing Go's concurrency, to ensure that the SDK handles asynchronous operations efficiently, improving performance and scalability.
  • By use of Go's interfaces and structs, I will create the DID and Chainspace modules to facilitate tasks like managing identities and interacting with blockchain technology.
  • To guarantee the stability and strength of the SDK, I will write thorough test cases for both the DID and Chainspace modules, probably will use Go's testing package.
  • With use of Go's standard library, I'll create a lightweight CLI tool as a demo script, Just like the TypeScript demo script, to show how the SDK can connect to CORD and make calls efficiently.
  • I will examine the way cord.js is implemented and follow Go's standard practices to maintain uniformity and clarity in the code. I will also help improve the documentation to offer detailed instructions for developers using the SDK in their projects.

I'm excited to contribute to this project and help create a functioning SDK in Golang for connecting to CORD. Looking forward to collaborating with you all!

@AbhimanyuSamagra
Copy link

Do not ask process related questions about how to apply and who to contact in the above ticket. The only questions allowed are about technical aspects of the project itself. If you want help with the process, you can refer instructions listed on Unstop and any further queries can be taken up on our Discord channel titled DMP queries.

@nikhil822
Copy link

The local development environment guide does not seem to work for me when I am trying to set up cord.js. I have followed the guide, but when building/installing the modules, I get the following errors:
I get this error when running “yarn build” : The command failed for workspaces that are depended upon by other workspaces; can’t satisfy the dependency graph
Failed with errors in 29s, 500ms

Can somebody help me out?

Thanks in advance

@NiranjanAP
Copy link
Contributor Author

@vatsa287 can you please help the contributors here?

@vatsa287
Copy link
Member

vatsa287 commented Apr 15, 2024

The local development environment guide does not seem to work for me when I am trying to set up cord.js. I have followed the guide, but when building/installing the modules, I get the following errors: I get this error when running “yarn build” : The command failed for workspaces that are depended upon by other workspaces; can’t satisfy the dependency graph Failed with errors in 29s, 500ms

Can somebody help me out?

Thanks in advance

@nikhil822 Can you please share the screenshot.
Please do yarn then yarn build.

@vatsa287
Copy link
Member

I have forked the cord.js repository and read the CORD white papers but still I am not able to figure out the whole flow of code. Could you please tell me what should I do to proceed further to understand the CORD.js and its connection with CORD, I know both GoLang and TypeScript but have not worked with blockchains much so I am able to understand code in chunks but I am not able to understand how are we setting up connection with the blockchain and transferring data. @adi-a11y @NiranjanAP @amarts

@Dushyantbha012
So with substrate we have something called a type bundle, which is similar to an interface which defines all the extrinsics supported by the chain.
We connect to the chain at running port using Cord.connect(networkAddress), you can see this and execute demo scripts(made for understanding the interaction with the chain: repo-link-for-cord-demo-scripts . We load all the type bundles and set the api as init to all sdk methods.

Then use that api variable as conn variable which includes version, typebundles etc to call required methods to interact with the chain.

@nikhil822
Copy link

image

@vatsa287 Here is the screenshot. I had done both yarn and yarn build

@vatsa287
Copy link
Member

@nikhil822 are you running it on windows?

@nikhil822
Copy link

@nikhil822 are you running it on windows?

Yes

@vatsa287
Copy link
Member

@nikhil822 are you running it on windows?

Yes

Please build on a virtual machine with Linux OS which is preferred for your case.

@Savio629
Copy link

@nikhil822 You can test it on codespace or gitpod if you don't have Linux locally
Works well
image

@nikhil822
Copy link

@nikhil822 You can test it on codespace or gitpod if you don't have Linux locally
Works well
image

Will try and let you know

@EuclidStellar
Copy link

HI @NiranjanAP @vatsa287 @Shruti3004 @nikhil822 @Dushyantbha012 ,

I'm Gaurav Singh, a sophomore at AKGEC Ghaziabad, with a passion for coding and technology. I've had hands-on experience with both Go and JavaScript, making me well-equipped for the task ahead. As a Full Stack Developer, I've delved into various projects, including working with @Blockchain-Research-Lab honing my skills in both backend and frontend development.

For the "cord sdk in Golang" project with Dhiway, my role will be crucial in spearheading the development of the Go SDK to connect to CORD. Leveraging my experience with Go, I'll meticulously craft the core SDK modules, focusing on the DID and Chainspace components. Drawing from my background in JavaScript, particularly with TypeScript, I'll closely reference the existing cord.js repository to ensure a seamless transition of functionality into Golang.

In terms of documentation and engineering, I'll adopt a systematic approach. I'll diligently document each step of the development process, ensuring clarity and transparency for future contributors. This documentation will include detailed explanations of implementation choices, code structures, and usage guidelines for the SDK. Additionally, I'll prioritize writing comprehensive unit tests for both the DID and Chainspace modules, ensuring robustness and reliability of the SDK.

Overall, my proficiency in both Go and JavaScript, coupled with my experience in software development and open-source contributions, positions me well to take on this project. I'm excited to collaborate with mentors and fellow contributors at Dhiway to deliver a high-quality Go SDK for CORD.

Here's my GitHub: @EuclidStellar

@AbhimanyuSamagra
Copy link

Do not ask process related questions about how to apply and who to contact in the above ticket. The only questions allowed are about technical aspects of the project itself. If you want help with the process, you can refer instructions listed on Unstop and any further queries can be taken up on our Discord channel titled DMP queries. Here's a Video Tutorial on how to submit a proposal for a project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DMP 2024 Issues for Dedicated Mentoring Program 2024
Projects
None yet
Development

No branches or pull requests

10 participants