►
From YouTube: Ethereum NFT Lock
Description
Ethereum NFT Lock, works with August/Yale's Smart Lock
https://github.com/AlphaWallet/TokenScriptDoorClient
A
Ethereum
devs,
what
I'm
going
to
be
talking
to
you
today
is
about
a
way
to
add
ethereum
power
to
your
august
or
yale
front
door
lock
via
erc
721
tokens.
You
might
have
heard
of
this
particular
type
of
nfts.
First,
through
cryptokitties,
the
people
auction,
maybe
and
lately
board
apes,
said,
run
axes
and
many
many
others.
A
Now
today,
we're
actually
going
to
be
using
nfts
as
a
utility
token.
So
there's
going
to
be
some
some
function
attached
to
the
token
which
is
operating
our
yale
log.
So
the
cool
thing
about
using
nfts
for
access
control
is
you
can
define
all
of
the
rules.
You
can
define
how
exactly
how
the
token
is
going
to
be
used
and
who
can
use
the
token.
A
A
So
today,
we're
actually
going
to
be
using
the
token
script
framework
to
to
give
us
a
nice,
quick
user
interface
for
the
log,
and
I'm
going
to
talk
you
through
how
to
set
up
each
component
like
the
the
interface
to
the
yellow,
lock
itself,
we're
going
to
set
up
the
we're
going
to
mint
some
door
tokens
we're
going
to
write
the
token
script
and
then
we're
going
to
put
them
all
together
and
see
if
it
see
how
it
works
and
then
finally
I'll
take
you
behind
the
scenes
to
show
you
exactly
what's
happening:
okay,
first,
let's
have
a
quick
look
at
the
lock,
so
here's
the
standard,
yellow
lock
with
an
app
that
connects
to
it
and
I'm
just
gonna
open
the
front
door
for
you.
A
So
this
is
the
default
way
that
we
that
we
operate
the
yellow
okay,
let's
get
started
so
the
first
thing
I
want
you
to
do
is
to
clone
the
token
script
door
client.
So
first
of
all
go
to
the
alpha
wallet:
github
repo,
just
github.com,
alpha
wallet,
open
up
the
tokenscriptdoor
client,
which
you'll
see
there's
a
public
repo
and
there's
a
few
instructions
there,
which
you
can
go
into
if
you
wish.
A
It
should
come
down
now.
This
is
actually
a
xamarin
framework,
app,
so
you're
going
to
be
using
visual
studio.
A
So
we've
got
that
installed
here
so
pop
that
guy
open,
so
you'll
need
visual
studio
with
the
xamarin
framework,
so
cloning
that
straight
from
the
repo
open
it
up
and
you'll,
see.
There's
if
you
open
up
main
activity,
you
will
see
there's
a
bunch
of
there's
a
bunch
of
keys
that
you
have
to
find
here.
So
the
instructions
to
find
those
keys
are
in
the
github
repo
instructions.
A
So
after
setting
up
your
keys,
what
I
want
you
to
do
is
install
this
onto
a
test
phone
that
you
have
so
in
my
case,
I
have
a
spare
google
pixel,
one
which
I
like
to
use
and
set
that
up.
A
A
And
you
can
see
it's
it's
connecting
to
the
bridge.
A
A
Communicating
with
the
the
august
lock
okay,
so
now,
we've
established
that
the
thing
we
want
is
the
device
address.
So
this
address
here
is
created
when
the
when
the
app
first
runs
it
stores
it
and
it's
persistent
address,
that's
used
each
time
now.
This
address
doesn't
actually
do
anything
other
than
doing
ecdsa
cryptography.
So
there's
no
tokens
on
this
address.
So
what
I'm
going
to
do
is
just
click
that
link
and
I
should
get
a
yeah
there.
We
go
copied
address
to
clipboard.
So
that's
what
I
want.
A
A
A
A
So,
let's
go
to
let's
open
remix,
so
remix
is
how
we're
going
to
deploy
the
token.
So
here's
the
standard
thing
it's
just
remix.ethereum.org.
A
A
A
A
So
when
you
open
this
token
in
your
wallet,
it
appears
that
you've
got
board
apes,
but
you
haven't
really:
okay,
okay,
so
open
up
the
deploy
and
run
transactions
window
click
on
injected
web3,
and
you
should
see
your
account
and
you
say
yes,
okay,
0.1
ethers,
so
that
should
be
enough
to
do
everything
we
need
to
do
today
make
sure
that
you're
selected
the
right,
the
right
class
to
burn
so
that's
door,
token,
dot,
sol
and
finally
deploy
so
metamask
should
pop
up
and
then
we're
asked
to
confirm
the
transaction.
A
A
Contract
here
and
oh
there's,
the
transaction
hash,
so
here's
here's
the
contract
functions
now.
What
I'm
going
to
get
you
to
do
is
to
mint
some
door
tokens
so
we're
just
going
to
call
this
utility
function
that
I
added
this
custom
utility
function
to
just
click
mint
using
sequential
and
we
should
get
the
metamask
popup
confirm
that
you're
happy
to
mint.
Then,
let's
mint
one
more
just
for
fun.
A
Okay,
so
now
I
should
have
two
of
these
tokens
in
my
wallet.
What
we're
going
to
do
now
is
transfer
this
wallet
to
alpha
wallet
so
so
that
we
can
use
a
token
script.
So,
to
do
that,
you
have
to
open
the
wallet,
see
we've
just
we've
lost
a
little
bit
of
ether
burning
the
transaction
yeah.
The
mint
function
is
still
pending.
A
A
Your
account
password
open
it
up
and
there's
my
private
key
there's
nothing
on
this.
This
key
apart
from
that
not
point
not
one
ring
b,
so
just
copy
that
into
the
clipboard,
and
I'm
going
to
show
you
a
very
insecure
way
of
transferring
it
again.
Don't
do
this
with
the
real
key,
so
I
go
to
saved
messages
in
telegram
paste.
The
private
key
in
there
send
it
off
and
now
that's
available
on
my
device.
A
The
next
thing
to
do
is
to
set
up
the
token
script
so
to
do
that,
we're
going
to
go
back
to
the
tonescript
door,
client,
repo,
open
up
the
tonescript,
folder
and
you'll.
Do
this
on
your
local
computer
and
you'll
find
this
lock
entry.xml
file.
Now
I
want
you
to
open
that
up
in
visual
studio,
so
it
should
look
something
like
this.
So
this
is
a
tokenscript
file
and
it
comprises
of
xml.
A
It's
an
xml
wrapper
around
some
definition,
xml
definitions.
We
have
css
here
you
can
see
and
we
have
some
html
and
javascript
and
all
these
are
ways
of
programming
user
interface
onto
tokens.
So
we
only
actually
need
to
edit
two
things
in
this
file
to
get
it
working
for
you.
We
just
the
first
thing.
Is
our
contract
address,
so
what
I
want
you
to
do
is
to
go
to
remix,
which,
hopefully
you
still
got
open.
A
You
can
see
under
deploy
contracts.
You
can
see
the
function,
the
contract
that
we
just
deployed
and
check
the
name
here.
Let's
see
door
tokens
here,
so,
let's
copy
the
contract
address
here,
go
back
to
visual
studio
code
and
paste
that
that's
the
first
step.
So
the
next
thing
I
want
to
do
is
look
search
for
iot
in
this
folder
you
will
see
in
the
javascript
snippet
you'll
see
iot
address.
This
is
the
address
of
the
remote
client
that
we
found
in
a
previous
step.
A
B
A
A
And
I
am
going
to
import
that
guy,
so
I've
just
imported
it.
Let's
switch
over
to
the
wallet
and
you
can
see,
we've
already
got
the
door
tokens
imported.
Let's
just
give
it
a
few
seconds
and
it
should
spot
our
rink
b
yeah
there.
It
goes
okay.
So
it's
seen
our
ring
bit
seen
our
door
tokens.
So
before
we
install
the
token
script.
Let's
just
have
a
quick
look
at
the
door.
Tokens
and
oh
board
apes,
great
okay!
So
that's
okay!
A
Now
we're
going
to
upload
the
token
script
into
alpha
wallet,
so
the
token
script
that
you
previously
copied
to
telegram.
Let's
go
into
there.
You
can
see
that
the
first
intent
is
alpha
wallet.
So
let's
go
into
our
wallet,
it
opens
up
and
you
can
see
straight
away
that
the
issuer
of
the
token
is
now
token
script
debug.
A
So
that
tells
us
that
we've
been
successful.
Let's
click
on
here
you
can
see
it's
uncertified
when,
after
you've
finished
debugging
your
token
script,
you
can
sign
it
and
then,
when
after
it's
been
signed
and
uploaded
to
the
repo
server,
this
will
then
become
a
nice
green
tick.
Just
like
a
website
certificate,
okay,
so
we're
going
to
click
on
one
of
the
tokens
that
we've
got.
You
see
a
little
history
there.
Let's
the
token
script
contain
two
verbs:
we've
got
a
mint
verb
to
mean
new
tokens
and
we've
got
an
interverb.
A
So,
let's,
let's
click
on
enter
and
you
can
see
that
we've
just
received
the
challenge
from
the
door,
the
door
client.
So,
let's,
let's
click
enter.
So
I'm
now
being
asked
to
do
a
sign,
personal
message
on
this
challenge.
So
I'm
going
to
go
ahead
with
that.
I'm
just
going
to
use
my
fingerprint
okay,
let's
go
so
the
sign
successful
and
there
you
go
and
it's
just
transmitted
to
the
the
app.
A
A
Once
it's
got
that
private
key,
as
you
saw
what
it
does
then
so
on
opening.
It
will
then
try
and
connect
itself
to
the
token
script
bridge.
So
what
happens
as
it
logs
into
the
token
script
bridge
that
will
then
send
back
some
challenge.
Bytes
what
happens
now?
The
client
will
sign
those
challenge.
Bytes
return,
the
signature
back
to
the
proxy
bridge.
A
What
happens
then?
The
proxy
bridge
ec
recovers
the
token
script
door
client
address
and
then
creates
a
mapping
of
the
token
script
door
client
as
a
tcp
client
against
this
against
its
ethereum
address.
So
now
we've
got
the
client
connected
to
the
bridge.
So
what
happens?
Next?
A
The
user
opens
the
door
entry
token
in
his
wallet
and
the
token
script
engine
will
ask
for
a
challenge,
so
it'll
send
a
challenge
to
it'll
say:
please
give
me
a
challenge
to
token
script
bridge
the
token
script
bridge
just
forwards
that
to
the
the
target
address,
which
will
be
the
token
script
door.
Client,
the
token
script
door
client
generates
a
challenge
which
looks
something
like
this
and
then
transmits
it
back
to
the
token
script
engine.
So
this
just
happens
via
javascript
promises
within
the
token
script,
the
lock
entry.xml
that
we
just
edited.
A
So
now
we
are
displaying
this
this
this
challenge.
So
what
happens
now?
The
user,
through
the
alpha
wallet,
app
signs
this
challenge
and
then
transmits
the
signature
back
to
the
token
script
bridge.
So
that's
now
the
turnstill
bridge
is
aware
of
this
signature
and
also
the
target
that
we're
speaking
to
so.
It
then
forwards
the
signature
to
the
door
client
via
this
mapping
and
then
what
happens
is
the
door
client
will
recover
the
alpha
wallet
address,
knowing
the
challenge
and
being
given
the
signature.
A
So
now
that
it
has
the
address
the
verified
address
of
the
the
wallet,
it
can
then
check
to
see
if
there's
any
balance
of
the
door
entry
tokens
at
this
address
and
if
there
is
it,
opens
the
door.
A
And
that's
gonna
do
it.
So
if
you
enjoyed
this
video,
please
send
us
some
feedback
and
like,
if
not
also
send
us
some
feedback
too,
and
let
us
know
what
you
think
and
if
you
would
like
to
get
started
with
tokenscript.
A
There's
plenty
of
people
here
at
smarttokenlabs
who
can
put
you
on
the
right
guidelines,
there's
also
a
white
paper.
You
can
read:
that's
in
the
github.com
tokenscript
repo
and
there's
plenty
of
tonyscript
examples
on
on
the
alpha
wallet,
repo
and
the
typoscript
repo.