Using tKey JS SDK on web, I am able to initialize a threshold key. However, for the same verifier id, if I try to initialize a threshold key on iOS or Android it fails with a Runtime Error. if I create a new user with a different verifier id and initialize a threshold key on Android or iOS without the web. It works on ios, Android and web subsequently. The major issue is having to first initialize a threshold key on the web and it will never work on Android or iOS for the same verifier ID
@onye Welcome Aboard!
Your issue has been forwarded to our Dev team and we will get back with further updates.
Could you share you code for setting up tkey in web and ios ?
Hi,
We use flutter and firebase, so we wrote a plugin wrapper for it. But here is a snipper to how we use it.
final idToken = await auth.currentUser?.getIdToken(true);
await _web3authTsKey.init(
InitializeParams(
verifierId: uid,
manualSync: true,
neverInitializeNewKey: true,
includeLocalMetadataTransitions: true,
verifierName: _config.web3AuthVerifierName ?? "",
web3AuthClientId: _config.web3AuthClientId ?? "",
idToken: idToken ?? "",
network: _config.solanaCluster == "mainnet"
? Network.mainnet
: Network.testnet,
chainConfig: ChainConfig(
chainId: _config.solanaCluster == "mainnet" ? '0x1' : '0x03',
chainNamespace: "solana",
rpcTarget: _config.solanaRPCUrl!,
displayName: 'Solana',
blockExplorer: _config.solanaExploreUrl!,
ticker: 'SOL',
tickerName: 'Solana',
),
),
);
final postBoxKeyShare = await _web3authTsKey.getPostBoxKey();
final keyDetails = await _web3authTsKey.initializeTsKey(postBoxKeyShare);
Here is the repo url of the plugin: GitHub - peerwaya/web3_auth_ts_key
So currently we just use only the web sdk and use a headless browser on ios/android for consistency.
The following libraries need to be included for the web:
<script src="https://unpkg.com/@tkey-mpc/core@9.0.2/dist/core.umd.min.js"></script>
<script src="https://unpkg.com/@web3auth/solana-provider@7.2.0/dist/solanaProvider.umd.min.js"></script>
<script src="https://unpkg.com/@tkey-mpc/storage-layer-torus@9.0.2/dist/storageLayerTorus.umd.min.js"></script>
<script src="https://unpkg.com/@tkey-mpc/share-serialization@9.0.2/dist/shareSerialization.umd.min.js"></script>
<script src="https://unpkg.com/@tkey/web-storage@12.0.0/dist/webStorage.umd.min.js"></script>
<script src="https://unpkg.com/@tkey/security-questions@12.0.0/dist/securityQuestions.umd.min.js"></script>
<script src="https://unpkg.com/@tkey/service-provider-sfa@11.0.0/dist/serviceProviderSfa.umd.min.js"></script>
For Android we used:
com.github.torusresearch:tkey-rust-android:0.0.4
For iOS
tkey-rust-ios,