2021-07-01 23:14:59 +03:00
|
|
|
import "@fluencelabs/aqua-lib/builtin.aqua"
|
|
|
|
import "ipfs.aqua"
|
|
|
|
|
|
|
|
alias Multiaddr: string
|
|
|
|
alias PeerId: string
|
|
|
|
|
2021-07-09 15:52:41 +03:00
|
|
|
func put(node: PeerId, path: string) -> IpfsPutResult:
|
2021-07-01 23:14:59 +03:00
|
|
|
on node:
|
|
|
|
result <- Ipfs.put(path)
|
|
|
|
<- result
|
|
|
|
|
2021-07-20 12:40:33 +03:00
|
|
|
func get_from(node: PeerId, hash: string, from: Multiaddr) -> IpfsGetResult:
|
2021-07-01 23:14:59 +03:00
|
|
|
on node:
|
|
|
|
result <- Ipfs.get_from(hash, from)
|
|
|
|
<- result
|
2021-07-14 22:09:19 +03:00
|
|
|
|
|
|
|
func set_timeout(node: PeerId, timeout_sec: u64):
|
|
|
|
on node:
|
|
|
|
Ipfs.set_timeout(timeout_sec)
|