Last active
May 11, 2019 03:25
-
-
Save alexytiger/2be5375649d6a8522c616ab0eec463f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class IpfsDaemonService { | |
constructor(@Inject(ipfsToken) private ipfs) {} | |
public getVersion(): Observable<string> { | |
return from(this.ipfs.version()).pipe( | |
tap((res: any) => console.log(`IPFS node version object: ${JSON.stringify(res)}`)), | |
map(res => res.version), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment