Package Exports
- skinsmoney-typescript
- skinsmoney-typescript/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (skinsmoney-typescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
skinsmoney-typescript
Installation:
npm i skinsmoney-typescript
Usage
Deposit info
import SkinsMoney, {ValidationException} from "../src";
(async () => {
try {
const skinsmoney = new SkinsMoney();
const deposit = skinsmoney.service("SERVICE_ID", "SERVICE_HASH");
const createDeposit = deposit.createDeposit();
const payment = await createDeposit.setMinValue(12.34)
.setCustom("Custom")
.setRedirectUrl("https://google.com")
.setTradeUrl("https://steamcommunity.com/...")
.setSteamId("STEAMID64")
.make();
const depositId = payment.getTransactionId() as string;
const depositInfo = await deposit.getDepositInfo(depositId);
console.log(depositInfo);
} catch (error: any) {
if (error instanceof ValidationException) {
console.log('ValidationException', error.getErrors());
}
}
})();Generate deposit
import SkinsMoney, {ValidationException} from "../src";
(async () => {
try {
const skinsmoney = new SkinsMoney();
const deposit = skinsmoney.service("SERVICE_ID", "SERVICE_HASH");
const createDeposit = deposit.createDeposit();
const payment = await createDeposit.setMinValue(12.34)
.setCustom("Custom")
.setRedirectUrl("https://google.com")
.setTradeUrl("https://steamcommunity.com/...")
.setSteamId("STEAMID64")
.make();
console.log(payment.getTransactionId());
console.log(payment.getRedirectUrl());
} catch (error: any) {
if (error instanceof ValidationException) {
console.log('ValidationException', error.getErrors());
}
}
})();Get currencies
import SkinsMoney from "../src";
(async () => {
const skinsmoney = new SkinsMoney();
const currencies = await skinsmoney.currencies().get();
console.log(currencies);
})();Service withdraw value
import SkinsMoney from "../src";
(async () => {
const skinsmoney = new SkinsMoney();
const deposit = skinsmoney.service("SERVICE_ID", "SERVICE_HASH");
const value = await deposit.getWithdrawValue();
console.log(value);
})();