►
From YouTube: NEARVERSE - Day 1 - Carson Farmer W/ Textile.io
Description
"Filecoin Bridge: Permissionless storage for you dApp, DAO, or NFT".
Follow the latest from NEAR Protocol on:
Website: https://near.org/
Discord: https://near.chat/
Blog: https://near.org/blog/
Twitter: https://twitter.com/NEARProtocol
GitHub: https://github.com/near https://github.com/nearprotocol
#Blockchain #FutureIsNEAR #NEAR #nearprotocol
A
Hello,
everyone,
and
thanks
for
joining
me
for
my
talk
on
the
introduction
to
the
near
filecoin
bridge
today,
we're
going
to
talk
about
a
pretty
cool
way
that
you
can
get
permissionless,
storage
for
your
dap
or
dao
or
nft,
or
whatever
project
from
near
to
filecoin.
A
A
We
think
that
keeping
humanity's
data
safe
means
creating
systems
that
promote
the
exchange
of
data
and
information
across
borders
and
through
time,
and
so
we're
really
doubling
down
on
file
coin,
as
this
means
to
safeguard
humanity's
data
as
as
a
result,
we're
pretty
committed
to
getting
as
many
bytes
on
filecoin
as
possible,
because
we
believe
this
is
the
most
direct
path
to
enabling
every
individual
organization
dao
community
to
own
control
and
preserve
their
data
into
the
future.
A
A
And
so
what
we
have
really
here
is
a
means
for
adapt
developers
to
easily
and
pretty
seamlessly
store
user
data,
app
data,
nft
assets
and
a
whole
lot
of
other
stuff
off
chain.
On
a
purpose-built
storage,
blockchain
like
filecoin
and
then
reference
that
data
whenever
and
however,
they
like
in
their
native
chain
so
near
dap
or
in
a
you,
know,
javascript
react
app
or
on
the
command
line
or
wherever
and
so
we're
building
a
filecoin
bridge
to
just
about
every
blockchain.
A
We
can
get
our
hands
on
and
we
started
actually
with
near
and
now
we
also
support
ethereum
and
polygon,
with
more
blockchains
to
come,
and
really
bridges
are
just
an
open
interface
for
providing
off-chain
storage
to
blockchain
apps.
So,
under
the
hood,
bridges
use
an
open,
filecoin
auctioning
system
that
textile
developed
to
push
data
to
filecoin.
A
What
this
means
is
that,
when
you're,
using
the
bridge
to
push
data
from
your
native
chain
to
falcoin
that
could
be,
via
you
know,
an
app
or
a
smart
contract,
you
still
reference
and
retrieve
data
over
ipfs,
like
you
normally
would.
A
But
the
raw
data
is
also
available
in
storage
contracts
created
with
miners
on
the
file
coin
network,
and
so
the
metadata
for
that
storage
can
then
be
reported
back
to
the
native
chain
as
open
and
reusable
building
blocks
that
we
all
love
in
the
blockchain
space,
and
so
the
core
filecoin
storage
bridge
revolves
around
kind
of
two
key
concepts:
deposits
and
storage.
A
So
the
deposits
api
that
all
happens
on
chain
in
say
near
that's
this
component
here,
whereas
the
storage
apis,
they
all
interact
with
off
off-chain
storage
via
something
we
call
a
validator
that
interfaces
with
filecoin.
So
that's
this
piece
here
so
validators
handle
things
like
compiling
and
batching
and
deal
making
with
the
filecoin
network,
and
then
they
report
deal
success
back
to
the
native
chain
along
the
way.
Data
is
cached
in
a
highly
available
ipfs
layer,
while
all
the
whole
deal
ceiling
and
proving
stages
are
underway
for
the
filecoin
component.
A
A
Now,
validators
can
provide
things
like
indexing
mapping
of
cids,
so
the
content
for
data
that's
pushed
over
the
bridge
and
more
to
on-chain,
apps
and
services,
and
the
deposit
component
is
really
just
a
sort
of
sybil
resistance
component
so
that
users
looking
to
store
data
on
filecoin
via
a
validator.
They
first
have
to
deposit
funds
proportional
to
the
length
of
time,
they'd
like
to
continue
storing
data,
and
there
are
some
defaults
there
about
a
quarter
year
for
10
minutes.
I
think
after
funds
expire,
they
can
be
released
by
any
user
in
the
ecosystem.
A
Just
by
making
a
smart
contract
call
it's
pretty
cheap
and
this
provides
a
way
to
release
funds
after
a
storage
session
has
been
completed
without
locking
up
those
funds
during
the
long
proof
process
for
file
coin,
and
so
once
that
that
deposit
is
available,
the
app
user
or
even
the
smart
contract
who
might
be
operating
on
behalf
of
the
user,
they
can
push
data
to
the
validator
using
a
an
api
endpoint
that
is
available
via
the
validator
smart
contract.
That's
right
here,
and
then
they
can
interface.
A
This
off
chain
rest
api
to
push
data
for
upload
to
filecoin.
A
The
status
of
each
storage
request
can
also
be
queried
by
a
rest,
api,
so
store
and
status,
and
that
status
can
range
anywhere
from
batching
to
files
together
to
preparing
the
storage
deal
to
auctioning
the
data
off
to
actually
deal
making
and
success
on
the
filecoin
blockchain
along
the
way.
Query.
Clients
can
query
that
at
any
time
to
get
the
status
of
their
storage
request,
so
digging
a
bit
more
into
the
on-chain
components.
We
have
two
main
contracts
that
you
might
want
to
think
about.
A
A
The
validator
contracts
they're,
similarly
pretty
simple
interfaces
and
they
can
be
implemented
by
anyone
that
wants
to
run
a
filecoin,
validator
note,
or
rather
a
bridge
validator
node.
The
core
interface
looks
like
this,
and,
unlike
the
registry,
it's
pretty,
it
doesn't
require
that
the
contract
is,
you
know
owned
by
anyone
in
particular,
but
there
are
a
few
sort
of
key
api
requirements,
including
the
api,
endpoint
and
adding
and
checking
and
releasing
deposits.
A
We
also
provide
some
logging
functionality
so
that
you
can
watch
for
sort
of
events
in
the
logs
of
smart
contract
calls,
and
that
just
makes
it
a
little
bit
easier
to
do.
Things
like
interact
with
events
and
I'll
talk
a
little
bit
more
about
that.
In
a
moment
when
we
talk
about
some
features
that
we've
been
working
on
with
the
graph.
A
So
how
can
you
leverage
the
this
sort
of
bridge
system
for
storing
off
chain
data?
Well,
if
you're
a
smart
contract
developer,
then
you
might
want
to
just
try
making
some
cross-contract
calls
deposit
some
funds
from
your
dap
for
your
user
or
have
your
user.
Do
it
any
way
that
you'd
normally
interact
with
a
smart
contract?
A
Dapps
that
monitor
file,
coin
storage,
requests
on
near,
which
is
a
pretty
amazing
superpower,
and
if
you're
at
all
interested
in
that
pay
close
attention
to
what
the
graph
team
is
bringing
to
the
near
ecosystem.
But
if
smart
contracts
aren't
your
thing,
then
textiles,
filecoin
storage
bridge
also
provides
some
typescript
or
javascript
sdks
that
make
it
really
easy
to
store
data
on
filecoin
from
any
blockchain
based
app,
but
in
particular
from
near
so
we
have
a
javascript
library
called
neurodot
storage
and
that
should
feel
really
comfortable
to
any
developer.
A
That's
already
familiar
with
the
sort
of
common
near
javascript
libraries
that
are
available,
and
it
provides
a
pretty
small
but
useful
api
that
basically
covers
all
of
the
functionality
that
the
smart
contracts
do,
but
it
wraps
it
up
in
a
nice
javascript
sdk.
So
really
you
end
up
just
having
to
import
the
library.
A
A
It's
a
simple
react
app,
but
it's
also
deployed
live
so
that
you
can
interact
with
it
and
deposit
some
funds
and
help
upload
some
files
and
I'll
actually
show
you
example
of
using
this
in
a
little
demo
later
now,
by
the
way
I
should
mention
this
whole
bridge
system
is
actually
being
made
free
for
the
foreseeable
future,
thanks
to
support
from
a
bunch
of
the
awesome
folks
at
filecoin
and
near
and
also
the
polygon
ecosystem.
So
you
know,
there's
really
no
barriers
to
trying
this
out.
A
So
if
you're
interested
in
playing
around
with
the
javascript
sdk,
it's
pretty
simple
just
a
couple
of
normal
imports
that
you'd
always
expect
up
at
the
top
and
then
one
extra
one
to
initialize
the
near
storage
sdk.
A
So
normally
you
do
your
normal
connect
to
your
near
linear.
Test
net,
for
instance,
create
a
new
wallet.
Connection
instance
request
a
sign
in
and
maybe
you'll
stick
your
your
wall
or
your
smart
contract
address
here
and
then
you
just
simply
initialize
based
on
the
wallets
account.
Now
you
get
back
a
storage
object
and
that
storage
object
pretty
much
reflects
all
of
the
apis
that
are
available
on
the
in
the
validator
contract.
A
A
What
you
get
back
is
a
storage
request
id
and
the
cid
or
content
id
for
that
data.
Anytime.
You
can
get
the
status
of
your
storage
request
by
calling
storage.status
you
get
back
the
request
and
any
of
the
deals.
The
filecoin
deals
that
that
data
is
associated
with
now,
if
you've
just
pushed
something
over
the
bridge,
it's
probably
not
available
in
any
deals
yet,
but
it
should
be
on
its
way
to
batching
and
being
put
into
storage
deals.
Pretty
quick.
A
After
that
you
can
call
storage,
dot,
release
deposits.
If
your
session
has
timed
out
and
then
you
might
wanna,
you
know
sign
out
of
your
wallet
or
whatever
sort
of
user
interactions
you
might
wanna
provide.
A
So,
with
the
time
remaining,
I
wanted
to
go
through
a
quick
demo
that
allows
that
goes
through
cloning
building,
deploying
uploading
and
minting
a
simple
nft
using
some
of
the
components
of
the
bridge,
and
so
we
can
jump
over
to
a
notion
document
that
I
have
available
so
for
those
folks
that
are
watching
at
home.
They
can
go
through
at
their
own
pace.
A
A
So
what
we're
going
to
do
is
create
a
nft
using
a
near's
standard,
nft
contract,
and
so
what
you
can
do
is
if
you're
running
working
from
the
command
line,
you
might
just
create
a
new
demo
folder
and
move
into
it
and
then
clone
the
near
examples.
A
A
So
all
you
need
to
do
is
just
make
sure
that
you
can
build
the
contract
and
then
set
up
the
tooling
to
do
that,
so
make
sure
that
rust
is
installed
as
per
the
prerequisites
in
the
near
sdk
rust,
and
you
can
go
to
that
github
link
if
you
want
and
check
that
out
and
then
make
sure
that
you
have
the
near
cli
installed,
and
you
can
do
all
that
stuff
at
once
by
running
these
commands.
A
So
with
those
two
things
out
of
the
way,
it's
really
pretty
easy
to
build
that
nft
contract.
So
you
can
just
call
build.sh.
A
Now,
I'm
not
going
to
bother
going
through
all
the
tests
and
things
like
that
right
now.
You
probably
should
do
that
yourself,
but
we're
just
going
to
do
a
quick
deploy
today
in
to
a
throwaway
dev
account
that
you
can
just
play
around
with,
but
then
what
I'll
do
is
I'll
actually
transfer
my
nft
to
a
real
testnet
account
to
see
how
things
went
and
so
that
you
can
actually
view
the
nft
in
your
testnet
wallet.
A
So
if
you
follow
this
code
here,
you
can
do
a
near
dev,
deploy
using
the
near
cli
and
specify
the
nft
wasom
file
that
you
just
built.
You'll
also
want
to
specify
the
helper
url
for
the
contract
helper,
and
that's
can
all
be
done
there
behind
the
scenes.
This
is
actually
creating
a
new
account
and
deploying
a
contract
to
it
and
on
the
console,
you'll
see
a
message,
a
bunch
of
text
and
then
it'll
finish
off
with
something
like
this.
A
So
to
make
the
next
few
steps
a
little
bit
easier,
you
can
actually
just
source
that
dot
end
file
and
that
will
just
add
a
few
environment
variables
that
make
it
a
little
bit
easier
to
reference
things,
and
so
you
can
check
to
see
if
that
environment
variable
is
available
by
just
echoing
the
contract
name.
A
So
now,
what
we'll
do
is
we'll
actually
mint
this
nft,
but
we
do
kind
of
need
some
sort
of
asset
associated
with
it.
Otherwise
it's
just
an
empty
nft
and
it's
not
very
exciting.
A
So
I'm
actually
going
to
use
the
filecoin
bridge
to
near
to
deploy
our
asset
to
ipfs
and
filecoin,
and
the
really
cool
thing
here
is
that
means
we've
got.
We've
got
a
content,
addressable
verifiable
asset
on
ipfs
and
filecoin
that
we
can
reference
in
our
nft
for
a
truly
secure
and
strong
nft
implementation,
and
so
this
is
one
of
my
favorite
gifts.
A
A
A
A
A
And
so,
if
you
want
to
take
a
look
here,
I
put
the
the
cid
of
my
uploaded
file
as
the
media
url,
and
then
I
also
include
the
media
hash
as
a
base64,
encoded
string
and
then
what
I
can
do
is.
I
can
actually
transfer
the
ownership
of
this
nft
to
some
account
that
I
own,
so
that
I
can
actually
view
it
and
enjoy
it
and
check
it
out.