►
From YouTube: How To Use the Agoric Wallet in your Dapp
Description
Michael FIG, Software Engineer at Agoric, will teach you how to use the Agoric wallet in your dapp + APIs and UI.
Resources:
https://agoric.com/documentation/getting-started/
ABOUT
Build Fast, Earn Fast - Agoric enables developers to rapidly deploy dapps and DeFi markets on-chain using composable JavaScript smart contracts. Safely get your project from vision to global market.
LINKS
https://agoric.com
https://agoric.com/twitter
https://agoric.com/discord
https://agoric.com/telegram
https://agoric.com/newsletter
Click the 'SUBSCRIBE' button to follow our Youtube channel!
https://github.com/Agoric/agoric-sdk
B
So,
as
roland
had
mentioned,
we
do
have
a
live
chat
and
you
can
always
join
our
discord
later
to
talk
more
about
things
with
our
engineers,
we're
always
listening
on
there
and
the
agenda
for
today's
presentation
is
first
going
over
the
dap
architecture.
This
is
how
adapts
in
the
wallet
are
all
connected,
then
we'll
have
a
little
demo
of
the
wallet.
B
B
So
as
far
as
stop
architecture,
you
can
think
of
the
igork
system
as
a
bunch
of
interconnected
gork
vms
that
some
of
them
are
on
the
blockchain.
Some
of
them
are
local
and
then
the
the
wallet
is
the
user's
trusted
agent
for,
inter
interacting
with
that
network.
B
The
gork
vm
uses
the
swingside
kernel,
which
brian
will
be
talking
about
in
an
hour
to
host
secure
js
object
capabilities,
so
the
gorg
vm
specifically
is
a
secure,
javascript
plus
the
use
of
a
kernel.
So
this
allows
multiple
independent
entities
within
the
kernel
to
run
without
being
able
to
compromise
one
another.
It's
just
another
partitioning
of
how
a
vm
is
set
up,
so
the
igor
chain
is
made
up
of
validators
that
run
on-chain
negorg
vms.
B
But
what
we
will
be
talking
about
mostly,
is
the
ag
solo,
which
is
the
off
chain
agora,
vm
that
can
communicate
with
the
chain
so
ag.
Solos
are
basically
somebody's
entry
point
into
the
cork
system.
They
have
their
own
user
interface
and
they
have
their
own
way
of
speaking
to
chains
or
and
not
necessarily
just
one
chain,
but
they
can
be
multiple
chains
and
multiple
other
network
connections.
B
A
B
Allows
you
to
approve
or
decline
proposals
from
enabled
apps,
and
these
are
zoe
offers
that
basically
the
dap
says
I
want
to.
I
want
to
have
the
user
offer
something,
and
then
the
wallet,
pops
up
the
message
and
the
user
can
say.
Yes,
I
do
want
to
enact
that
proposal,
or
else
I
just
want
to
decline
it.
B
So
pat
name
is
basically
your
own
personal
name
for
something,
so
my
personal
name
for
my
mom
might
be
mom,
but
your
personal
name
from
my
mom
is
not
mom.
It's
different,
so
a
pat
name
is
something
that
the
user
can
assign
to
make
sure
that
they're
talking
to
the
right
person
and
that
they,
if
they've,
seen
something
before
then
the
wallet
can
describe
it
in
terms
of
the
patent
name
that
the
user
gave
it.
B
So
adapts
being
untrusted
web
uis,
they
can
be
anywhere
usually
they're
web
apps
on
the
internet
that
interact
with
your
your
wallet
through
the
the
web
3
apis.
B
They
usually
want
your
money,
that's
what
dapps
are
they
they
want
to
exchange
help.
You
exchange
something,
possibly
not
collecting
anything
on
the
side.
They
might
want
to
give
you
something
for
free,
but
it's
adap,
adopt's
main
purpose
is
to
do
something
with
assets
on
the
chain
and,
finally,
you
use
the
wallet
to
control
what
access
they
have
and
to
manage
the
proposals.
B
So
this
is
a
great
diagram
that
kate
made
up
for
an
earlier
talk
that
basically
explains
how
these
different
parts
fit
together.
So
on
the
left,
here
we
have
the
dop
user
interface
and
basically
that
allows
you
to
do
something.
The
details
are
not
so
important,
but
the
user
interface
can
talk
to
the
dapps
app
server,
which
is
an
ag
solo
running
for
that
dap.
B
So
the
app
server
also
called
the
api
server
is
providing
services
to
the
user
interface
that
are
contacting
on-chain
assets,
so
the
api
server
might
actually
make
an
invitation.
The
contract
is
running
on
chain,
so
the
api
server
can
make
an
invitation,
and
then
they
can
use
the
on-chain
connection
to
send
something
to
the
wallet
now.
Currently,
this
actually
happens
via
the
dot
ui.
B
The
dot
user
interface
is
the
one
that
proposes
something
to
the
wallet,
but
we
hope
to
change
it
so
that
the
api
server
on
chain
can
talk
directly
to
the
wallet
in
a
secure
fashion,
so
that
the
wallet
only
gives
away
certain
access
to
it.
B
B
Okay,
so
I'll
get
to
the
wallet
demo.
Now
the
important
things
is
that
the
the
wallet
is
really
just
another
dap,
but
what's
special
about
it,
is
that
it's
installed
in
the
ike
solos
automatically
when
they
start
up
so
it's
possible
to
have
different
wallets.
It
is
possible
to
specify
installing
a
different
wallet
when
you
start
your
egg
solo,
but
the
important
thing
is
to
remember
that,
just
like
other
dapps,
the
site
solo
is
installed
with
its
own
backend.
So
I'll
go
back
one
to
show
you.
B
B
Chain,
so
the
the
wallet
dap
that's
installed
automatically
is
part
of
the
igork
sdk.
It's
in
packages
dapp's
felt
wallet.
This
was
a
wallet
based
on
svelt
that
we
cooked
up
in
about
a
week.
B
B
So
now
I'll
just
show
you
how
this
all
works.
B
Okay,
so
I'm
following
the
instructions
that
in
the
fungible
faucet
that
kate
demoed
earlier
on,
I'm
just
going
to
start
and
reset
the
chain.
So
this
is
running
a
simulated
chain
attached
to
my
egg.
A
B
B
B
B
B
So
agor
open
tells
your
web
browser
to
open
up
the
trusted
path.
So
here
we
see
I've
opened
the
repel,
which
has
a
little
command
line
at
the
bottom
that
we'll
be
using
later.
But
this
is
the
igork
wallet.
You'll
notice,
it's
running
on
port
8000..
B
What's
important
is
that
the
wallet
has
a
special
access
token,
so
this
access
token
is
private
to
the
user.
This
is
so
that
other
other
users
of
the
machine
who
might
have
access
to
the
wallet
ui
can't
get
to
it.
So
if
I
were
just
to
go
to
12701
without
the
access
token
or
I
just
change
the
access
token,
a
bit
then
you'll
see
it'll
come
up
with
an
empty
wallet
and
it'll
just
complain.
B
B
I'm
going
to
deploy
the
contract
and
the
api
server
for
the
agora
faucet,
so
this
just
takes
a
couple
of
seconds
to
run
it
installs
the
fungible
faucet,
and
what
you'll
notice
here
is
that,
as
it's
doing
the
deployment,
it's
installing
all
the
code
on
the
ice
holo
in
other
cases,
then
in
the
in
a
real
deployment.
This
would
be
on
the
isolo
on
the
internet,
but
we're
all
running
the
same
things
locally.
Basically,
okay,
so
this
is
where
pet
names
are
in
action.
We
haven't.
B
B
Okay,
so
now
kate's
faucet
is
approved,
and
we
say
okay
here,
and
you
see
that
now
the
button
is
here
to
mint
the
fungible
tokens
so
on
this
part
of
the
thing
you'll
see
on
the
wallet
that
kate's
faucet.token
is
available,
so
kate's
faucet
is
the
name
that
I
gave
to
it.
It's
the
patent
name,
so
I
know
her
tokens
as
case
faucets.
B
B
I
can
accept
it
and
then
sure
enough
now,
kate's
tokens
appear,
so
that
is
the
basic
flow
that
kate
had
explained
earlier
with
how
the
find
your
faucet
works.
Next
thing
I'm
going
to
do
is
to
show
you
what
the
the
websocket
api
looks
like
we'll
get
into
this
more
later,
but
essentially
this
dot.
This
app
at
localhost
3000
can't
directly
talk
to
localhost
8000.
B
It
has
to
first
guest
get
a
wallet
bridge,
so
the
bridge
allows
this
dap
to
have
an
iframe
that
I'll
show
you.
What
that
looks
like
the
dab
has
an
iframe
right.
B
About
will
I
find
it.
B
B
This
is
how
we
wired
up
the
token.
So
when
I
mince
more
tokens
you'll
see
here
that.
B
The
proposed
offer
came
from
kate's
faucet
dot
instance
that
was
actually
proposed
by
the
dap,
by
suggesting
an
instance
called
instance,
so
it
was
prefixed
with
kate's
faucet,
but
this
says
that
basically,
this
registered
name
on
the
board,
which
is
like
a
public
bulletin
board
of
well-known
objects,
corresponds
to
the
instance
that
we
want
to
suggest
to
the
wallet.
B
So
all
of
these
messages
went
out,
then
we
got
back
a
whole
bunch
of
things
saying
we
need
the
dap
approval,
so
this
was
how
kate
dapp
understood
that
we
needed
to
first
approve
or
enable
the
dap
in
the
wallet.
B
B
B
B
Faucet
we'll
see
that
more
messages
came
as
soon
as
all
these
dap
approvals
were
reported.
Then
the
actual
messages
got
forwarded
to
the
wallet
and
it
came
back
with
an
update
person's
request
or
response.
So
the
update
purses
tells
your
dap
how
what
are
the
parameters
around
the
purses
that
this
wallet
understands
so
with
different
apps?
You
might
actually
use
this
list
of
purses
to
decide.
Oh,
I
want
to
create
an
offer
from
a
given
purse.
B
So
all
these
parameters
just
have
a
look
at
the
depth
that
you
you
are
interested
in.
That
can
do
something
similar,
like
maybe
the
auto
swap
or
the
simple
exchange,
and
then
you
can
see
that
these
update
purses
come
in
the
dap.
Exp
exposes
these
as
a
ui
elements
where
you
can
drop
down
a
purse
and
you'll
see
that
the
the
current
balance
of
the
purse
is
there,
so
the
zoe
invite
purse
is
empty.
It
just
has
an
empty
array.
B
So
these
are
all
the
the
purse
reporting
and
then
we
get
back
some
other
responses
from
our
get
the
positive
facet
id.
We
get
a
response
that
says
the
facetious
number
is
this
number
in
the
board.
B
B
So
what
I'd
like
to
show
you
next
well,
first
I'll,
go
back
to
the
wallet
and
show
you
more
about
pet
names,
so
pet
names
in
the
wallet
we
can
go
into
setup
and
you'll,
see
that
these
are
the
different
issuers
we
have.
We
should
be
able
to
assign
different
patterns,
but
currently
we
don't.
We
only
have
patenting
assignment
for
dapps,
but
I
can
change
this
at
any
time.
B
So
you'll
see
that
it's
called
muscle
when
I
change
that
you'll
see
that
all
of
a
sudden,
now
it's
mosset
dot,
token
mula,
simoleon
and
zoe-
invites
were
created
by
the
by
the
agora
chain.
When
we
initialized
the
egg
solo
by
the
sim
chain
and
contacts
also
appear
so
when
you
import
something,
you
give
a
board
id
and
you
give
it
a
pet
name.
So
I
can
basically
say
I
want
to
create
a
contact
to
somebody.
B
I
met
at
a
conference
or
something
so
I
can
send
them
tokens
if
I
need
to.
B
That's
customized
for
a
certain
environment
or
a
certain
consumer,
so
the
dap
never
gets
to
send
messages
directly
to
the
wallet.
It
only
gets
to
talk
to
something
that
knows
where
the
dap
is
coming
from
knows
what
the
origin
is,
so
the
wallet
bridge
is
available
over
post
message
from
the
dab
and
another
way
of
interacting
with
the
wallet
bridge
is
via
or
the
wallet
itself
is
via
the
trusted
grapple.
So
the
replace
the
redevelop
loop.
This
is
the
little
command
prompt
that
you
see
in
the
wallet.
B
This
this
little
shortcut
of
till
dot
is
a
different
way
of
writing
this.
What
you've
probably
seen
before,
but
in
the
in
the
command
line,
the
tilde
is
a
bit
of
a
shortcut
instead
of
having
to
write
e.
So
if
I
run
that
I'll
just
get
the
same
response,
but
now
I'm
going
to
start
the
reply.
B
Only
okay,
so
with
the
home
wallet,
I
can
do
something
like
home.wallet
get
issuers.
B
So
in
here
we
have
all
this
list
of
issuers
they're
all
generated
by
getting
the
issuers
list.
We
have
the
the
ui,
for
the
wallet
is
actually
using
e
to
to
contact
the
remote
presence
for
the
object.
It
uses
a
connection
to
the
wallet
that
allows
forwarding
of
objects.
B
So
another
thing
we
can
do
is
actually
look
at
the
offers
that
we
have,
we
can
decline
or
get
them.
Let's
get
the
inbox
jason.
Okay,
where
is.
B
B
So
it
says
currently
the
inbox
is
empty,
but
it
hadn't
it
had
some
updates.
So
if
I
run
this
again,
I
mean
some
fungible
tokens,
then
over
here
the
inbox
notifier
will
say
that
we
have
some
data
in
our
inbox,
and
so
I
might
want
to
say,
let's
get
the
the
value
is
a
json
object.
So
I'm
going
to
say:
let's
take
history,
five
I'll
json.parse
history,
5
dot
value,
and
then
you
see
that
this
is
a
json
object
and
it
has
various
things
in
it.
It
has
a
proposal
associated
with
an
origin.
B
This
is
where
they're
going
to
put
the
tokens
into
the
dab
context
is
something
that
your
adapter
can
receive
back
and
then
all
these
different
details
of
the
of
the
actual
history,
so
what's
important
here
too,
is
that
the
proposal
for
display
shows
we
want
a
certain
token
of
a
mosfet.token,
and
the
display
info
says
that
it's
just
a
natural
amount
math.
B
So
this
is
all
kind
of
advanced
stuff,
but
the
the
bottom
line
is
that
the
wallet
just
uses
ertp
and
zoe
offers,
just
like
you
could,
with
your
with
your
test
contracts
when
you're
writing
it.
So
the
wallet
is
a
fairly
sophisticated
dap
but,
like
I
said
before,
it's
just
something
that
you
can
implement
in
terms
of
the
underlying
stuff.
It's
not
really
privileged
in
the
system.
It
just
provides
a
service
to
other
dapps.
B
B
B
B
We
will
have
more
documentation
over
time
and
we
hope
to
make
this
clear
for
everybody
to
understand,
as
should
be
very
clearly
said,
we're
still
in
an
alpha
release
and
we're
basically
just
trying
to
get
things
working,
but
we
do
have
plans
to
improve
our
wallet,
support.
There's
a
third
party,
that's
really
interested
in
helping
us
with
developing
our
wallet
and
perhaps
making
it
as
a
plug-in
for
their
wallet
as
well
as
other
things
where
we
can
improve
the
user
experience
and
the
developer
experience.
B
B
Clarity,
finally,
the
code
for
all
this
stuff
is
in
the
gork
sdk.
The
the
dappsfelt
wallet
that
I
pointed
out
before
is
not
the
sdk
and
contract
examples.
I
should
replace
this
and
say:
dap
examples
are
really
important
and
just
go
to
the
gork
github
and
search
for
dapps
I'll,
show
you
how
that
looks.
B
So
in
the
gork
github
repository
or
github
organization,
if
you
just
search
for
dapps,
you
can
see
the
different
apps
we've
built.
So
these
are
all
things
that
you
can
have.
A
look
at
and
experiment
with
the
ones
with
a
greater
pulse
are
usually
the
ones
that
are
used
more
often,
fungible
faucet
only
existed
very
recently.
Dap
encouragement
is
one,
that's
a
little
bit
trickier,
but
exports
explores
more
of
how
to
interact
with
the
wallet.
A
All
right,
michael,
thank
you
so
much
for
coming
in.
We,
we
had
one
comment
that
we
definitely
would
need
to
put
together
a
diagram
to
understand
the
various
components
of
the
wallet
that
are
that
are
talking
together,
and
I
know
that
that's
in
the
works
so
stay
tuned
everybody.
We
will
have
a
diagram
coming
up
and.