1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 05:52:20 +08:00

writing files inside ipns works now! also implemented resolve cli command

This commit is contained in:
Jeromy
2014-09-26 12:08:00 -07:00
committed by Juan Batiz-Benet
parent 006b68b558
commit 6080944af9
14 changed files with 144 additions and 28 deletions

View File

@ -25,8 +25,8 @@ func NewPublisher(dag *mdag.DAGService, route routing.IpfsRouting) *IpnsPublishe
}
// Publish accepts a keypair and a value,
func (p *IpnsPublisher) Publish(k ci.PrivKey, value u.Key) error {
log.Debug("namesys: Publish %s", value.Pretty())
func (p *IpnsPublisher) Publish(k ci.PrivKey, value string) error {
log.Debug("namesys: Publish %s", value)
ctx := context.TODO()
data, err := CreateEntryData(k, value)
if err != nil {
@ -66,7 +66,7 @@ func (p *IpnsPublisher) Publish(k ci.PrivKey, value u.Key) error {
return nil
}
func CreateEntryData(pk ci.PrivKey, val u.Key) ([]byte, error) {
func CreateEntryData(pk ci.PrivKey, val string) ([]byte, error) {
entry := new(IpnsEntry)
sig, err := pk.Sign([]byte(val))
if err != nil {