From 11e7a712f469fb24ddb88ecebcefab6ed8880eb8 Mon Sep 17 00:00:00 2001 From: Zahoor Mohamed Date: Thu, 23 Mar 2017 19:26:06 +0530 Subject: swarm/api: support mounting manifests via FUSE (#3690) --- internal/web3ext/web3ext.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'internal/web3ext/web3ext.go') diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 23112c1f1..79f781781 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -27,9 +27,12 @@ var Modules = map[string]string{ "personal": Personal_JS, "rpc": RPC_JS, "shh": Shh_JS, + "swarmfs": SWARMFS_JS, "txpool": TxPool_JS, + } + const Chequebook_JS = ` web3._extend({ property: 'chequebook', @@ -486,6 +489,32 @@ web3._extend({ ] }); ` +const SWARMFS_JS = ` +web3._extend({ + property: 'swarmfs', + methods: + [ + new web3._extend.Method({ + name: 'mount', + call: 'swarmfs_mount', + params: 2, + inputFormatter: [null,null] + }), + new web3._extend.Method({ + name: 'unmount', + call: 'swarmfs_unmount', + params: 1, + inputFormatter: [null] + }), + new web3._extend.Method({ + name: 'listmounts', + call: 'swarmfs_listmounts', + params: 0, + inputFormatter: [] + }) + ] +}); +` const TxPool_JS = ` web3._extend({ -- cgit v1.2.3