Published
Edited
Dec 21, 2020
2 stars
Insert cell
md`# Testing @textile imports`
Insert cell
md`## @textile/threads-id`
Insert cell
id = import("https://unpkg.com/@textile/threads-id?module")
Insert cell
id.ThreadID.fromRandom().toString()
Insert cell
md`## @textile/context`
Insert cell
context = import("https://unpkg.com/@textile/context?module")
Insert cell
ctx = new context.Context()
Insert cell
ctx.toJSON()
Insert cell
md`## @textile/security`
Insert cell
security = import("https://unpkg.com/@textile/security?module")
Insert cell
key = security.ThreadKey.fromRandom().toString()
Insert cell
md`## @textile/grpc-transport`
Insert cell
transport = import("https://unpkg.com/@textile/grpc-transport?module")
Insert cell
transport.WebsocketTransport()
Insert cell
md`## @textile/multiaddr`
Insert cell
// TODO: Make sure we update to latest once we're not on alphas anymore
multiaddr = import("https://unpkg.com/@textile/multiaddr?module")
Insert cell
addr = "/ip4/127.0.0.1/tcp/4140/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N/thread/bafk7wyub5byqrryei4wbb7smmwqhiiuyhikyxu36o5rq4vixnwkwhia"
Insert cell
bytes = multiaddr.bytesFromAddr(addr)
Insert cell
md`## @textile/threads-client`
Insert cell
client = import("https://unpkg.com/@textile/threads-client?module")
Insert cell
clt = new client.Client()
Insert cell
clt.serviceHost
Insert cell
md`## @textile/threads`
Insert cell
threads = import("https://unpkg.com/@textile/threads?module")
Insert cell
threads.randomBytes(16)
Insert cell
md`## @textile/grpc-connection`
Insert cell
connection = import("https://unpkg.com/@textile/grpc-connection@2.2.0?module")
Insert cell
conn = new connection.GrpcConnection()
Insert cell
conn.serviceHost
Insert cell
md`## @textile/crypto`
Insert cell
cryptography = import("https://unpkg.com/@textile/crypto?module")
Insert cell
cryptography.PrivateKey.fromRandom()
Insert cell
md`## @textile/hub-threads-client`
Insert cell
modified = import("https://unpkg.com/@textile/hub-threads-client?module")
Insert cell
modClient = new modified.Client()
Insert cell
modClient.listThreads // This method is not available on vanilla Client...
Insert cell
md`## @textile/buckets`
Insert cell
buckets = import("https://unpkg.com/@textile/buckets?module")
Insert cell
buck = new buckets.Buckets()
Insert cell
buck.serviceHost
Insert cell
md`## @textile/grpc-authentication`
Insert cell
authenticate = import("https://unpkg.com/@textile/grpc-authentication?module")
Insert cell
auth = new authenticate.GrpcAuthentication()
Insert cell
auth.serviceHost
Insert cell
md`## @textile/hub-filecoin`
Insert cell
filecoin = import("https://unpkg.com/@textile/hub-filecoin?module")
Insert cell
fc = new filecoin.Filecoin()
Insert cell
fc.serviceHost
Insert cell
md`## @textile/hub-users`
Insert cell
users = import("https://unpkg.com/@textile/users?module")
Insert cell
user = new users.Users()
Insert cell
user.serviceHost
Insert cell
md`## @textile/hub`
Insert cell
hub = import("https://unpkg.com/@textile/hub?module")
Insert cell
hub.JobStatus
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more