Fawi Wallet

The Fawi Wallet API provides ....

Usage
//get network status
Network.getStatus()
    .then((status)=>{
        console.log(status)
    })
    .catch((error) => {
        console.error(error);
    });
//get network status
window.Network.getStatus()
    .then((status) => {
        console.log(status);
    })
    .catch((error) => {
        console.error(error);
    });
//get network status
window.Network.getStatus()
    .then((status) => {
        console.log(status);
    })
    .catch((error) => {
        console.error(error);
    });
//get network status
(<any>window).Network.getStatus()
    .then((status) => {
        console.log(status);
    })
    .catch((error) => {
        console.error(error);
    });
//get network status
window.Network.getStatus()
    .then((status) => {
        console.log(status);
    })
    .catch((error) => {
        console.error(error);
    });

Classes


FawiWallet

processPayment
processPayment(): Promise<PaymentStatus>

Returns the current payment status.


RETURN
returns: Promise<PaymentStatus>
gameOver
gameOver(): Promise<any>

Pause App and call payment form.


RETURN
returns: Promise<any>
getArcadeInfo
getArcadeInfo(): Promise<ArcadeInfo>

Get current arcade info.


RETURN
returns: Promise<ArcadeInfo>

Interfaces Used

PaymentStatus

PaymentStatus {
    connected: boolean; 
    type: string;  // One of Connection type
}

ArcadeInfo

ArcadeInfo {
    connected: boolean; 
    type: string;  // One of Connection type
}

Enumeration

Connection

enum Connection{
    UNKNOWN: 'unknown',
    ETHERNET: 'ethernet',
    WIFI: 'wifi',
    CELL_2G: '2g',
    CELL_3G: '3g',
    CELL_4G: '4g',
    CELL: 'cellular',
    NONE: 'none'
}