async function __calcKeyProvider(keyProvider) {
    if (!keyProvider) { return []; }

    // if keyProvider is function
    if (keyProvider.apply && keyProvider.call) {
        keyProvider = keyProvider();
    }

    // resolve for Promise
    keyProvider = await Promise.resolve(keyProvider);

    if (!Array.isArray(keyProvider)) {
        keyProvider = [ keyProvider ];
    }

    for (let key of keyProvider) {
        if (!EvtKey.isValidPrivateKey(key)) {
            throw new Error("Invalid private key");
        }
    }

    return keyProvider;
}