This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Chain, | |
ProviderRpcError, | |
RpcError, | |
SwitchChainError, | |
UserRejectedRequestError, | |
normalizeChainId, | |
getClient, | |
} from "@wagmi/core"; | |
import { providers } from "ethers"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { configureChains, createConfig } from '@wagmi/core' | |
import { mainnet, polygon, optimism } from '@wagmi/core/chains' | |
import { alchemyProvider } from '@wagmi/core/providers/alchemy' | |
import { publicProvider } from '@wagmi/core/providers/public' | |
import { InjectedConnector } from '@wagmi/core/connectors/injected' | |
import ImKeyProvider from "@imkey/web3-provider" | |
const imKeyProvider = new ImKeyProvider({ | |
rpcUrl: 'put your infura address here', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.consenlabs.test.f17; | |
import androidx.appcompat.app.AlertDialog; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.appcompat.widget.AppCompatButton; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.util.Log; | |
import android.view.View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"consts": { | |
"babe": { | |
"epochDuration": 200, | |
"expectedBlockTime": 3000 | |
}, | |
"timestamp": { | |
"minimumPeriod": 1500 | |
}, | |
"balances": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"consts": { | |
"babe": { | |
"epochDuration": 200, | |
"expectedBlockTime": 3000 | |
}, | |
"timestamp": { | |
"minimumPeriod": 1500 | |
}, | |
"balances": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val HEX = "37158399CB98DCD114D873E06EBF4BCC" | |
val KEYSTORE_ALIAS = "imTokenDerivedKey" | |
val ANDROID_KEYSTORE_PROVIDER = "AndroidKeyStore" | |
val TAG = "Keychain" | |
var isEncrypt: Boolean = true | |
var encrypted: String = "" | |
var iv: ByteArray = ByteArray(0) | |
// 指纹验证相关回调方法 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EOSKey { | |
// Generate EOS owner pk and active pk from mnemonic | |
private static List<byte[]> calcDefaultKeys(List<String> mnemonics, String path) { | |
// Step 1. Get chaincode at m/44'/194' | |
// EOS Coin type is defined at SLIP44 ref: https://github.com/satoshilabs/slips/blob/master/slip-0044.md | |
// We believe that chaincode are more private | |
MnemonicUtil.validateMnemonics(mnemonics); | |
DeterministicSeed seed = new DeterministicSeed(mnemonics, null, "", 0L); | |
DeterministicKeyChain keyChain = DeterministicKeyChain.builder().seed(seed).build(); | |
DeterministicKey parent = keyChain.getKeyByPath(BIP44Util.generatePath(path), true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.graphics.Bitmap; | |
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; | |
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; | |
public class GlideCircleTransform extends BitmapTransformation { | |
public GlideCircleTransform(Context context) { | |
super(context); | |
} | |
@Override | |
protected Bitmap transform(BitmapPool pool, Bitmap source, int outWidth, int outHeight) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProgressDialogFragment extends DialogFragment { | |
public static LoadingDialogFragment newInstance() { | |
ProgressDialogFragment frag = new ProgressDialogFragment (); | |
frag.setCancelable(false); | |
return frag; | |
} | |
@Override | |
public Dialog onCreateDialog(Bundle savedInstanceState) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.xuneal.simplesns.app.ui; | |
import android.animation.Animator; | |
import android.animation.AnimatorListenerAdapter; | |
import android.os.Bundle; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.text.TextUtils; | |
import android.view.Menu; |