1.1.0 • Published 8 months ago
wallet-sdk-development v1.1.0
语言切换 / Language Switch
Installing
Using npm
$ npm install wallet-sdk-development --save
Once the package is installed, you can import the library using import approach:
import WalletSdkDev, { ConfigType, ConfigEnvEnum } from 'wallet-sdk-development';
Examples
import WalletSdkDev, { ConfigType, ConfigEnvEnum, AuthSingleResponseDto } from 'wallet-sdk-development';
const config: ConfigType = {
providerId: 'tongits',
gameId: 'tongits',
operatorToken: process.env['OPERATOR_TOKEN'] ?? '',
secretKey: process.env['SECRET_KEY'] ?? '',
version: '1',
env: ConfigEnvEnum.Test,
};
const sdk = new WalletSdkDev(config);
async authenticate(token: string) {
const result = await this.walletDev.authenticate(token);
return this.formatResponse<string, AuthSingleResponseDto>(WalletFunctionEnum.Authenticate, result, token);
}