Merge pull request #5 from BnMcGn/master

Add cid-version parameter to 'add' function.
This commit is contained in:
Jaidyn Ann 2021-02-24 13:20:30 -06:00 committed by GitHub
commit 3146c6c854
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,10 +78,10 @@
;; ROOT CALLS ;; ROOT CALLS
;; PATHNAME → (HASH-STRING SIZE-NUMBER) || (NIL STRING) ;; PATHNAME → (HASH-STRING SIZE-NUMBER) || (NIL STRING)
(defun add (pathname &key (pin 't) (only-hash nil)) (defun add (pathname &key (pin 't) (only-hash nil) (cid-version 0))
"Add a file to IPFS, return it's hash. "Add a file to IPFS, return it's hash.
/ipns/docs.ipfs.io/reference/api/http/#api-v0-add" /ipns/docs.ipfs.io/reference/api/http/#api-v0-add"
(ipfs-call "add" `(("pin" ,pin) ("only-hash" ,only-hash)) (ipfs-call "add" `(("pin" ,pin) ("only-hash" ,only-hash) ("cid-version" ,cid-version))
:parameters `(("file" . ,pathname)))) :parameters `(("file" . ,pathname))))
;; STRING :NUMBER :NUMBER → STRING || (NIL STRING) ;; STRING :NUMBER :NUMBER → STRING || (NIL STRING)