implement a api for permlink. (#101)