mirror of
https://github.com/valitydev/wallet-utils.git
synced 2024-11-06 08:55:19 +00:00
RBKmoney Wallets Additional UI
cca92ff9f9
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.0 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.4.0...v6.5.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
build_utils@5cb25f049c | ||
config | ||
src | ||
.gitignore | ||
.gitmodules | ||
containerpilot.json | ||
Dockerfile.sh | ||
Jenkinsfile | ||
LICENSE | ||
Makefile | ||
nginx.conf | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json | ||
tslint.json |
wallet-utils
API
Type definition
declare class RbkmoneyWalletUtils {
constructor(token: string);
startIdentityChallenge(params: StartIdentityChallengeParams): void;
createDestination(params: CreateDestinationsParams): void;
abort(): void;
onCompleteIdentityChallenge(event: IdentityChallengeEvent) => void;
onFailIdentityChallenge(event: IdentityChallengeEvent) => void;
onCancelIdentityChallenge(event: IdentityChallengeEvent) => void;
onCreateDestination(event: CreateDestinationEvent) => void;
onCancel(event: CancelEvent) => void;
}
declare interface StartIdentityChallengeParams {
identityID: string;
level?: IdentityLevel;
}
declare enum IdentityLevel {
partial = 'partial'
}
declare interface CreateDestinationParams {
identityID: string;
name: string;
}
declare interface WalletUtilsEvent {
target: RbkmoneyWalletUtils;
}
declare interface IdentityChallengeEvent extends WalletUtilsEvent {
identityChallenge: IdentityChallenge;
}
declare interface CreateDestinationEvent extends WalletUtilsEvent {
destination: Destination;
}
declare interface CancelEvent extends WalletUtilsEvent {
type: CancelEventType;
}
declare enum CancelEventType {
uiDismissing: 'uiDismissing',
error: 'error'
}
declare interface ErrorCancelEvent extends CancelEvent {
error: LogicError;
}
declare interface LogicError {
code: string;
message: string;
}
declare type IdentityChallenge = any; // see swagger definition
declare type Destination = any; // see swagger definition
Usage
const walletUtils = new RbkmoneyWalletUtils('<jwt token>');
walletUtils.startIdentityChallenge({
identityID: '<string>'
});
walletUtils.onCompleteIdentityChallenge = (event) => {
// handle user complete identity challenge
};
walletUtils.onFailIdentityChallenge = (event) => {
// handle user failed identity challenge
};
walletUtils.onCancel = (event) => {
// handle UI dismissing
};