Code Monkey home page Code Monkey logo

altme's People

Contributors

bibash28 avatar hawkbee1 avatar hugondo avatar talebrafiepour avatar thierrythevenet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

altme's Issues

iOS build failure

warning: field is never read: comment
--> lib/src/ssh_agent.rs:115:5
|
115 | pub comment: String,
| ^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default

warning: field is never read: key_blob
--> lib/src/ssh_agent.rs:116:5
|
116 | pub key_blob: Vec,
| ^^^^^^^^^^^^^^^^^^^^^

warning: field is never read: key_type
--> lib/src/ssh_agent.rs:117:5
|
117 | pub key_type: String,
| ^^^^^^^^^^^^^^^^^^^^

warning: unused return value of CString::from_raw that must be used
--> lib/src/c.rs:412:9
|
412 | CString::from_raw(string as *mut c_char);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_must_use)] on by default
= note: call drop(from_raw(ptr)) if you intend to drop the CString

warning: didkit (lib) generated 4 warnings
Compiling didkit-cli v0.1.1 (/Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/didkit/cli)
Compiling didkit-http v0.1.1 (/Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/didkit/http)
Finished dev [unoptimized + debuginfo] target(s) in 1m 32s
moving to credible and building apk
Project now uses Flutter [2.8.1]
update cocoapod

[!] Invalid Podfile file: /Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/credible/ios/Flutter/Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first.

from /Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/credible/ios/Podfile:16

-------------------------------------------

unless File.exist?(generated_xcode_build_settings_path)

 raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"

end

-------------------------------------------

[!] Invalid Podfile file: /Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/credible/ios/Flutter/Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first.

from /Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/credible/ios/Podfile:16

-------------------------------------------

unless File.exist?(generated_xcode_build_settings_path)

 raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"

end

-------------------------------------------

build ios version
Changing current working directory to: /Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/credible
Running "flutter pub get" in credible... 3.1s
Changing current working directory to: /Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/credible
Building co.talao.wallet for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: FH3A3ZJ2YU
Running pod install... 1,691ms
Running Xcode build...
Xcode build done. 3.3s
Failed to build iOS app
Error output from Xcode build:

** BUILD FAILED **

Xcode's output:

note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/bibash/Projects/Talao/mobile-install-deploy/spruceid/credible/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'MTBBarcodeScanner' from project 'Pods')
error: No profiles for 'co.talao.wallet' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'co.talao.wallet'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')

Encountered error while building for device.
./install_talao.sh: line 128: cd: ios: No such file or directory
./install_talao.sh: line 129: fastlane: command not found

Screen Shot 2022-01-28 at 13 58 04

Screen Shot 2022-01-28 at 13 58 23

Handling navigation

@bibash28 What do you think about the current Talao Wallet navigation system ?
It allows to move/remove from project features with navigation without having to keep a dedicate list of routes.

/// StatefulWidget or StatelessWidget
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);

static Route route() {
  return PageRouteBuilder<void>(
    pageBuilder: (context, animation, secondaryAnimation) => const HomePage(),
    /// defining the route name
    settings: const RouteSettings(name: '/home'),
    /// defining transition animation if not the basic one
    transitionDuration: const Duration(seconds: 1),
    transitionsBuilder: (context, animation, secondaryAnimation, child) {
      // ignore: prefer_int_literals
      const begin = 0.0;
      const end = 1.0;
      final tween = Tween(begin: begin, end: end);
      final offsetAnimation = animation.drive(tween);
      return FadeTransition(opacity: offsetAnimation, child: child);
    },
  );
}

Import key from Temple

Tezotopia user have tz1 DID on temple: https://templewallet.com/
User can "create"/import a wallet with Temple secret key.

Temple browser add on allow export of secret key. Here's an example:
edskS9dZPCs2ww5bJXnPS93xkAHi1V9Fkiw9Zr2JTMFQVrxFnvwb2mBbvNpyF1SPcesUBKm9BS2o3XHqLcpJPGaDXDsBKbJNPq

This secret key needs to be transformed into JWT to be used with DIDKit. Here's a python example:

"""
From Tezos tz1 private key (Ed25519 curve) to JWK

"""
from datetime import datetime, timedelta
import uuid
import base58
import base64
import json
import didkit# Tezos lib , we do not mind which one, just need to get the secret key, private key and address
from pytezos.crypto.key import Key# This Input is taken from the Temple wallet through a QR code or a manual paste/coppy. It is en encoded secret key
temple_private_key = "edskRzfJzQnyKWr4qP4rUipDfTNCXJGxBW91m5HtgTYS92MmWo1tUge6nXkumkrNqDa767qPgqiJQaqNfmjebFJUc96JmuBLQn"
# For information : this the address read on Temple associated with the previous encoded secret key  -> tz1Q7zwo7fmRNyCL7jdz6hcPSsYukkWY66Q3# Thank to the Tezos lib, one can also check that the address calculated from the encoded private key is the same as the one read on Temple
_key = Key.from_encoded_key(temple_private_key.encode())
secret_key = _key.secret_key()
public_key = _key.public_key()
#address =  _key.public_key_hash()# we change the format of the private key and public key from Base58 to Base64
# one removes the first 4 bytes (prefix) and the 4 last bytes (checking digest)# the secret key from base58 to base64 url safe
d_bytes =  base58.b58decode(secret_key.encode())[4:-4]
d = base64.urlsafe_b64encode(d_bytes)
# we do the same with the public key
x_bytes = base58.b58decode(public_key.encode())[4:-4]
x = base64.urlsafe_b64encode(x_bytes)
# bytes to string
d = d.decode()
x = x.decode()
​
# this is the final JWK for a Ed25519 tezos address (tz1)
JWK =  {
        "crv":"Ed25519",
        "d": d,
        "kty":"OKP",
        "x": x
        }
print('JWK = ', JWK)
​
​
####################### TEST# one checks with didkit that everything is ok
DID = didkit.keyToDID('tz', json.dumps(JWK))
print('Tezos DID  = ', DID)
vm = didkit.keyToVerificationMethod('tz', json.dumps(JWK))
print("vm = ", vm)
​
# one setups a VC to sign and then to check the signature
DELAY = timedelta(seconds= 12*24*60*60)
credential = json.load(open('./verifiable_credentials/EmailPass.jsonld', 'r'))
credential["issuer"] = DID
credential['credentialSubject']['id'] = "did:tz:tz2E4kuaB9zHa1C3LqNeZncvZogYjQsXxvxz"
credential['issuanceDate'] = datetime.now().replace(microsecond=0).isoformat() + "Z"
credential['expirationDate'] = (datetime.now() +  DELAY).replace(microsecond=0).isoformat() + "Z"
credential['id'] = "urn:uuid:" + str(uuid.uuid4())
didkit_options = {
        "proofPurpose": "assertionMethod",
        "verificationMethod": vm,
        }
signed_credential =  didkit.issueCredential(
        json.dumps(credential),
        didkit_options.__str__().replace("'", '"'),
        json.dumps(JWK)
        )
​
result = didkit.verifyCredential(signed_credential, '{}')
print('signature check = ', result)
​
""" Test vectorsedskRzfJzQnyKWr4qP4rUipDfTNCXJGxBW91m5HtgTYS92MmWo1tUge6nXkumkrNqDa767qPgqiJQaqNfmjebFJUc96JmuBLQn
JWK =  {'crv': 'Ed25519', 'd': 'rRsH4WNxjh6E_XzEBJxiBi-nsR1QPMINu6Ciri2XhZ8=', 'kty': 'OKP', 'x': 'ZfeZIUWmL61MbAqP9kPDfWBeqAZmV-josXNft__RkLI='}
did:tz:tz1Q7zwo7fmRNyCL7jdz6hcPSsYukkWY66Q3edskRxpqPEttt82HJeWsxFKH4PGySjyJo2oX285PyCVEYgueZ3FUa81fcWprPhtx7nDb5FkZ3LNPLtVqL8wQhjxYh6rFpoE9oS
JWK =  {'crv': 'Ed25519', 'd': 'nxLS92GgP_7mEo_ZEiJhhiY6wB4YM2_JkboSl0YXWRY=', 'kty': 'OKP', 'x': '9DxX1rfCjP7dBO115_bQoVsYSWq1uo5Lw1F1OgU3png='}
did:tz:tz1NJrXkEhwcqNxkARvb44psCCb4VyJ4Qh1bedskSBTjP6S9bUYtbmSW3EmdVK71Dt3fyk32FVyvKsAKvPTVeEMTYPPeVhZLVHdmWfqPbnNDxhjvnu9mAphHETciMmPktrKAcN
JWK =  {'crv': 'Ed25519', 'd': '_6i8-m3SDp1cpp1ghuiJlt2Nj2kMHiZY9IixqstJRuY=', 'kty': 'OKP', 'x': 'i4khU1t8RUpULxCf6ybA-Q3y0JClOHkNF4wNDuGxzDs='}
did:tz:tz1Ve9tKqvJLHdn412xorB1mA7g2FGMuYA2k
​
"""

signature d'un VC avec une adresse Bitcoin ou Ethereum ou Tezos en utilisant didkit et la method did:pkh pour une meme cle secp256k

La method did:pkh a l avantage d'utiliser une adresse blockchain lisible par ailleurs en utilisant la courbe secp256k on peut aller avec la meme cle sur les 3 blockchains.

en python ca donne ça avec la meme cle

key = {
"crv": "secp256k1",
"d": "WxNkSy38UZUxfAOBWbHQSynEi8pmu97fKehiojNv9mw",
"kty": "EC",
"x": "bjyWuKGoDtUXKD6RzbE4suxoNk0E6pKe0qZTHh1LMg4",
"y": "O1JNLN8bO3EP23WNIiqxfGY8OwOkrcw4hmXXHzwmsGg",
"alg": "ES256K-R"}
// key transformée en string
key = json.dumps(key)

// choix Bitcoin ou Ethereum ou Tezos
method = 'pkh:btc' #pour Bitcoin
// method = 'pkh:eth' #pour Ethereum
// method = 'pkh:tz' # pour Tezos

// calcul du DID
did = didkit.key_to_did(method, key)

// ############ PARTIE NOUVELLE ##################
// attention on doit extraire la vm du DID document
// calcul du DID Document
did_doc = json.loads(didkit.resolve_did(did, '{}'))
vm = did_doc['didDocument']['assertionMethod'][0]

// initit un credential de test
credential = json.load(open('./verifiable_credentials/EmailPass.jsonld', 'r'))
credential["issuer"] = did
credential['credentialSubject']['id'] = "did:tz:tz2E4kuaB9zHa1C3LqNeZncvZogYjQsXxvxz"
credential['issuanceDate'] = datetime.now().replace(microsecond=0).isoformat() + "Z"
credential['id'] = "urn:uuid:" + str(uuid.uuid4())

// setup des options
didkit_options = {
"proofPurpose": "assertionMethod",
"verificationMethod": vm,
}

// signature du credential
signed_credential = didkit.issue_credential(
json.dumps(credential),
didkit_options.str().replace("'", '"'),
key
)

// print('signed credentilal = ', signed_credential)

// verifiaction de la signature
result = didkit.verify_credential(signed_credential, '{}')
print(result)

nouvelle page principale

Inspirée sur la page principale de metamask
Screenshot_20220103-212313_MetaMask

comme sur Metamsk
-> mettre le scan en haut a droite
-> mettre le setting en haut a gauche

  • ajouter Receive Buy Send dans la page Tokens et NFTs

sur notre app menu bas : credential Tokens NFTs

Mettre "Profil 1" en haut de l ecran a l aplace de "attestation"

On en parle

MVP AltMe

  • Talao wallet functionalities
  • New app for google and apple stores
  • App designed based on AltMe.io
  • Import private Tezos crypto key from Kukai or Temple
  • Support for did:pkh
  • Visualize Tezos crypto and NFT
  • VC provider list with links to website
  • Activate Tezotopia vouchers with SIOPV2 flow
  • App help functions and/or discovery

android build failure

Checking for android sdk.
Failed to find Android SDK

Screen Shot 2022-01-28 at 17 44 37

bibash@Bibashs-MacBook-Pro mobile-install-deploy % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.1 20C69 darwin-x64, locale en-NP)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[!] Xcode - develop for iOS and macOS (Xcode 12.5.1)
! Flutter recommends a minimum Xcode version of 13.0.0.
Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.63.2)
[✓] Connected device (1 available)

Global message system.

Based on the work done with network error messages and StateMessage (error, warning, info, success) we create a global message system as discussed during working session.

Add "id" attribute in the credentialOffer response

https://github.com/TalaoDAO/talao-wallet/blob/dev-talao/docs/talao_interaction_protocol.md#issuer-implementation

The purpose of this attribute is to allow the management of static QR code.

Currently an issuer must display a dynamic QR code (with a dynamic endpoint) in order to be able to track the call of one wallet. With that new attibute the QR can remain static. The wallet will read an "id" on the GET and then pass it to its response beside to the subject_id. So the issuer will track the specific call.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.