@mozaic-io/mozaic-sdk-node
Version:
The Mozaic Node SDK enables you to pay your creators easily via the Mozaic API.
48 lines (47 loc) • 1.88 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Wallets = void 0;
const api_1 = require("../../api");
const BaseResource_1 = require("../BaseResource");
const Wallet_1 = require("./Wallet");
/**
* @group Resources
*/
class Wallets extends BaseResource_1.BaseResource {
/**
* @internal
* You should not call this constructor directly. Instead, use the Mozaic main
* entry point to get access to the SDK classes.
* @param configuration
*/
constructor(mozaic, configuration) {
super();
this._walletsApi = new api_1.WalletsApi(configuration);
}
/**
* Get the underlying API for direct calls to the Mozaic API.
*/
get WalletsApi() {
return this._walletsApi;
}
/**
* Gets all of the available wallets that you have created with Mozaic's partner wallet providers.
* @returns
*/
getWallets() {
return __awaiter(this, void 0, void 0, function* () {
var result = yield this.execute(() => this._walletsApi.apiWalletsGet());
return result.map((value) => new Wallet_1.Wallet(value));
});
}
}
exports.Wallets = Wallets;