UNPKG

@venly/venly-core-sdk

Version:

Javascrip/Typescript SDK for Venly's Web3 Services

103 lines 5.85 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.VyWalletAPI = void 0; const wallet = __importStar(require("../models/wallet/index")); const VyWalletAPI_generated_1 = require("./VyWalletAPI.generated"); class VyWalletAPI extends VyWalletAPI_generated_1.VyWalletAPI_Gen { constructor(apiBase) { super(apiBase); } // /** // * This endpoint is used to create and execute any type of transaction. You need to provide the pincode in request body or the signing method in the header. You can execute any transaction such as NFT transfer, native transfer, ERC 20, etc. // * @param {VyBuildContractExecutionTransactionRequest} reqParams - Request data for the operation // * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user // * @returns {VyTransactionResultDto} // */ // public executeContract(reqParams: wallet.VyBuildContractExecutionTransactionRequest, signingMethod: VyUserAuth) : VyPromise<wallet.VyTransactionResultDto> // { // var req = new wallet.VyBuildAndExecuteTransactionDto(); // req.transactionRequest = reqParams; // return this.executeTransaction(req, signingMethod); // } // /** // * This endpoint is used to create and execute any type of transaction. You need to provide the pincode in request body or the signing method in the header. You can execute any transaction such as NFT transfer, native transfer, ERC 20, etc. // * @param {VyBuildTransferTransactionRequest} reqParams - Request data for the operation // * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user // * @returns {VyTransactionResultDto} // */ // public transferNativeToken(reqParams: wallet.VyBuildTransferTransactionRequest, signingMethod: VyUserAuth) : VyPromise<wallet.VyTransactionResultDto> // { // var req = new wallet.VyBuildAndExecuteTransactionDto(); // req.transactionRequest = reqParams; // return this.executeTransaction(req, signingMethod); // } // /** // * This endpoint is used to create and execute any type of transaction. You need to provide the pincode in request body or the signing method in the header. You can execute any transaction such as NFT transfer, native transfer, ERC 20, etc. // * @param {VyBuildTokenTransferTransactionRequest} reqParams - Request data for the operation // * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user // * @returns {VyTransactionResultDto} // */ // public transferErc20Token(reqParams: wallet.VyBuildTokenTransferTransactionRequest, signingMethod: VyUserAuth) : VyPromise<wallet.VyTransactionResultDto> // { // var req = new wallet.VyBuildAndExecuteTransactionDto(); // req.transactionRequest = reqParams; // return this.executeTransaction(req, signingMethod); // } // /** // * This endpoint is used to create and execute any type of transaction. You need to provide the pincode in request body or the signing method in the header. You can execute any transaction such as NFT transfer, native transfer, ERC 20, etc. // * @param {VyBuildNftTransferTransactionRequest} reqParams - Request data for the operation // * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user // * @returns {VyTransactionResultDto} // */ // public transferNonFungibleToken(reqParams: wallet.VyBuildNftTransferTransactionRequest, signingMethod: VyUserAuth) : VyPromise<wallet.VyTransactionResultDto> // { // var req = new wallet.VyBuildAndExecuteTransactionDto(); // req.transactionRequest = reqParams; // return this.executeTransaction(req, signingMethod); // } /** * Archive a wallet * @param {string} id - The id of the wallet * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyWalletDto} Updated Wallet */ archiveWallet(id) { var reqParams = new wallet.VyUpdateWalletRequest(); reqParams.archived = true; return this.updateWallet(id, reqParams); } /** * Unarchive a wallet * @param {string} id - The id of the wallet * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyWalletDto} Updated Wallet */ unarchiveWallet(id) { var reqParams = new wallet.VyUpdateWalletRequest(); reqParams.archived = false; return this.updateWallet(id, reqParams); } } exports.VyWalletAPI = VyWalletAPI; //# sourceMappingURL=VyWalletAPI.js.map