You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2023. It is now read-only.
In the projet go-threads they have a new protocol "thread" with this properties.
const (
// Name is the protocol slug.
Name = "thread"
// Code is the protocol code.
Code = 406
// Version is the current protocol version.
Version = "0.0.1"
// Protocol is the threads protocol tag.
Protocol protocol.ID = "/" + Name + "/" + Version
)
I've created a new class "Thread" derived from MultiaddressProtocol but I can't add it to Multibase. Methods are private.
namespace Textile.Threads.Core.Protocols
{
public class Thread : MultiaddressProtocol
{
static Thread()
{
}
public Thread() : base("thread", 406, -1)
{
}
public override void Decode(string value) => Value = Multibase.Decode(value, out MultibaseEncoding _);
public override void Decode(byte[] bytes) => Value = bytes;
public override byte[] ToBytes() => (byte[])Value;
public override string ToString() => Multibase.Encode(MultibaseEncoding.Base32Lower, (byte[])Value);
}
}
The text was updated successfully, but these errors were encountered:
I need to add new protocol in multi address.
In the projet go-threads they have a new protocol "thread" with this properties.
I've created a new class "Thread" derived from MultiaddressProtocol but I can't add it to Multibase. Methods are private.
The text was updated successfully, but these errors were encountered: