Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
/ iden3-mobile Public archive

iden3 light client library implementation in Go for native wallets (with gomobile-friendly wrappers)

License

Notifications You must be signed in to change notification settings

iden3/iden3-mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-iden3-light-wallet

iden3 light wallet client library implementation in Go for desktop & smartphone wallets (using GoMobile).

Test

  • this library connects with the IdenityServer, so will need a running IdentityServer
go test ./...

Usage

// define a provider
providerParams := make(map[string]string)
providerParams["url"] = "http://127.0.0.1:25000/api/unstable"
provider := Provider{
        Type:   "remote",
        Params: providerParams,
}

// new BabyJubJub public key
kOpStr := "0x117f0a278b32db7380b078cdb451b509a2ed591664d1bac464e8c35a90646796"
var kOpComp babyjub.PublicKeyComp
err := kOpComp.UnmarshalText([]byte(kOpStr))
assert.Nil(t, err)
kOpPub, err := kOpComp.Decompress()

// create new identity
identity, err := provider.NewIdentity(kOpPub, nil)
assert.Nil(t, err)
assert.Equal(t, "119h9u2nXbtg5TmPsMm8W5bDkmVZhdS6TgKMvNWPU3", identity.ID.String())

// [WIP]

Gomobile

Using go1.12.7 linux/amd64

go mod vendor
gomobile init
ln -s ~/git/iden3/go-iden3-light-wallet ~/go/src/github.com/iden3/
GO111MODULE=off go get github.com/ethereum/go-ethereum
cp -r \
  "${GOPATH}/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1" \
  "vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/"
GO111MODULE=off gomobile bind -target=android github.com/iden3/go-iden3-light-wallet/identityprovider

About

iden3 light client library implementation in Go for native wallets (with gomobile-friendly wrappers)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •