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

IPFS api #37

Merged
merged 1 commit into from
Sep 25, 2022
Merged

IPFS api #37

merged 1 commit into from
Sep 25, 2022

Conversation

smitev
Copy link
Contributor

@smitev smitev commented Sep 24, 2022

Initial integration with IPFS.

Sets connection to IPFS node running on our server.

@@ -3,6 +3,7 @@ export {};
declare global {
interface Window {
env: {
IPFS_URL: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you are putting these configurations in the global Window object?

useEffect(() => {
const fetchIpfsID = async () => {
const result = await ipfsAPI.id();
console.log('IPFS id: ', result);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns and object with:

addresses:  (4) [Multiaddr, Multiaddr, Multiaddr, Multiaddr]
agentVersion: "go-ipfs/0.5.1/8431e2e"
id: RSAPeerIdImpl {type: 'RSA', multihash: Digest, privateKey: undefined, publicKey: undefined, string: undefined}
protocolVersion: "ipfs/0.1.0"
publicKey:"CAASpAIwggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAwggEIAoIBAQCoRibE0zQnIU4GA/m9G1D4ZNjeXg1zsQysnvnkm0uTpj8SAT4bMx1RazaJ4Soo5dYF6scjCdLOr0b1RsxtZzeLWhtartmGbaLmR/OqFv7sb4YfMDapBigLSHG9zm2ezdSu29eYSDBjT+AXGC2E43EeBIMvUvJN/VQfmtO55Lm774YipZbp5XMFKm3pcT44t1jVr7Z634/3cOD8mc37bYqtzuNBVxvEcLOPPhsc4nDgGVg2Qr51BDziOaAD6YQGLKnCn7MdTQG5EnL850IBm8sEaoquxnydPl7BGh3Os4PFLk39xEQQFgUEHrPhdZiZV/73goXZctJq+8iKLNYHylmPAgED"
[[Prototype]]: Object

@@ -1 +1,2 @@
REACT_APP_IPFS_URL="http://109.235.70.27:5001"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are currently connecting to the IPFS node on our own server.

I have created a follow-up to this issue that should connect to IPFS running locally first: #38

@stojanov-igor
Copy link
Member

Good job.. will merge this into develop.

Check #38 for next steps:

@stojanov-igor stojanov-igor merged commit 5c24b46 into develop Sep 25, 2022
@smitev smitev deleted the feature/ipfs-api branch September 27, 2022 18:30
@stojanov-igor stojanov-igor mentioned this pull request Dec 27, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants