Closed il3ven closed 1 year ago
Nice, I like it. Another thing I'd do is to make one function that is specifically capable of matching an IPFS CID in all those input strings you're testing with and then making the native ipfs formatting another function where the return is ipfs://${hash}
, as I think people generally find it valuable to extract IPFS CIDs from any sort of strings.
And yeah as I said before, I think this would make a great npm package!
This PR also fixes: https://github.com/neume-network/strategies/issues/293
To test this PR we need to update extraction-worker in core. I did it locally and this branch worked. I will raise a PR for it in core.
OK
So for me this PR looks good to merge but it's still in DRAFT mode so I didn't want to do it myself. But @il3ven you have my go.
@TimDaub Thank you for add IPFS_HTTP_GATEWAY_KEY to ipfs msg factory. I just need to check if anything is missing and then I will merge.
@TimDaub Thank you for add IPFS_HTTP_GATEWAY_KEY to ipfs msg factory. I just need to check if anything is missing and then I will merge.
ok I'll leave this to you
This PR's purpose is to refactor strategies so that they only use
ipfs://
URLs.Changes:
anyIpfstoNative
function which takes any URL such asQmSJ3waSjiqLLgrW3n6dXUJhmRaouUYsBdf1kGs1duC9St.ipfs.dweb.link
oripfs.io/ipfs/QmSJ3waSjiqLLgrW3n6dXUJhmRaouUYsBdf1kGs1duC9St
and converts it into native IPFS URL such asipfs://QmSJ3waSjiqLLgrW3n6dXUJhmRaouUYsBdf1kGs1duC9St
ifIpfsConvertToNativeIpfs
function which will convert given URL to native IPFS if it is a valid IPFS URL. We need this to convert soundxyz's audio_url.TODO
ifIpfsConvertToNativeIpfs
functionNote
To test this PR we need to update extraction-worker in core. I did it locally and this branch worked. I will raise a PR for it in core.