-
Notifications
You must be signed in to change notification settings - Fork 2
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
IPFS api #37
Conversation
@@ -3,6 +3,7 @@ export {}; | |||
declare global { | |||
interface Window { | |||
env: { | |||
IPFS_URL: string; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
Good job.. will merge this into develop. Check #38 for next steps: |
Initial integration with IPFS.
Sets connection to IPFS node running on our server.