Socket
Socket
Sign inDemoInstall

@atomicfinance/client

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atomicfinance/client - npm Package Compare versions

Comparing version 1.0.0-alpha.4 to 1.0.0

dist/Cfd.d.ts

733

dist/Cfd.js
"use strict";
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());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var Cfd = /** @class */ (function () {
function Cfd(client) {
class Cfd {
constructor(client) {
this.client = client;
}
Cfd.prototype.AddMultisigSign = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('AddMultisigSign')(jsonObject)];
});
});
};
Cfd.prototype.AddPubkeyHashSign = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('AddPubkeyHashSign')(jsonObject)];
});
});
};
Cfd.prototype.AddRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('AddRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.AddScriptHashSign = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('AddScriptHashSign')(jsonObject)];
});
});
};
Cfd.prototype.AddSign = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('AddSign')(jsonObject)];
});
});
};
Cfd.prototype.AppendDescriptorChecksum = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('AppendDescriptorChecksum')(jsonObject)];
});
});
};
Cfd.prototype.BlindRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('BlindRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.CalculateEcSignature = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CalculateEcSignature')(jsonObject)];
});
});
};
Cfd.prototype.ConvertAes = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('ConvertAes')(jsonObject)];
});
});
};
Cfd.prototype.ConvertEntropyToMnemonic = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('ConvertEntropyToMnemonic')(jsonObject)];
});
});
};
Cfd.prototype.ConvertMnemonicToSeed = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('ConvertMnemonicToSeed')(jsonObject)];
});
});
};
Cfd.prototype.CreateAddress = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateAddress')(jsonObject)];
});
});
};
Cfd.prototype.CreateDescriptor = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateDescriptor')(jsonObject)];
});
});
};
Cfd.prototype.CreateExtkey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateExtkey')(jsonObject)];
});
});
};
Cfd.prototype.CreateExtkeyFromParent = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateExtkeyFromParent')(jsonObject)];
});
});
};
Cfd.prototype.CreateExtkeyFromParentKey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateExtkeyFromParentKey')(jsonObject)];
});
});
};
Cfd.prototype.CreateExtkeyFromParentPath = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateExtkeyFromParentPath')(jsonObject)];
});
});
};
Cfd.prototype.CreateExtkeyFromSeed = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateExtkeyFromSeed')(jsonObject)];
});
});
};
Cfd.prototype.CreateExtPubkey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateExtPubkey')(jsonObject)];
});
});
};
Cfd.prototype.CreateKeyPair = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateKeyPair')(jsonObject)];
});
});
};
Cfd.prototype.CreateMultisigScriptSig = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateMultisigScriptSig')(jsonObject)];
});
});
};
Cfd.prototype.CreateScript = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateScript')(jsonObject)];
});
});
};
Cfd.prototype.DecodeBase58 = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('DecodeBase58')(jsonObject)];
});
});
};
Cfd.prototype.DecodeDerSignatureToRaw = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('DecodeDerSignatureToRaw')(jsonObject)];
});
});
};
Cfd.prototype.DecodeRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('DecodeRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.ElementsAddRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('ElementsAddRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.CreateDestroyAmount = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateDestroyAmount')(jsonObject)];
});
});
};
Cfd.prototype.CreatePegInAddress = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreatePegInAddress')(jsonObject)];
});
});
};
Cfd.prototype.CreateRawPegin = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateRawPegin')(jsonObject)];
});
});
};
Cfd.prototype.CreateRawPegout = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateRawPegout')(jsonObject)];
});
});
};
Cfd.prototype.ElementsCreateRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('ElementsCreateRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.ElementsDecodeRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('ElementsDecodeRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.GetConfidentialAddress = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetConfidentialAddress')(jsonObject)];
});
});
};
Cfd.prototype.GetUnblindedAddress = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetUnblindedAddress')(jsonObject)];
});
});
};
Cfd.prototype.SetRawIssueAsset = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('SetRawIssueAsset')(jsonObject)];
});
});
};
Cfd.prototype.SetRawReissueAsset = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('SetRawReissueAsset')(jsonObject)];
});
});
};
Cfd.prototype.UnblindRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('UnblindRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.EncodeBase58 = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('EncodeBase58')(jsonObject)];
});
});
};
Cfd.prototype.EncodeSignatureByDer = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('EncodeSignatureByDer')(jsonObject)];
});
});
};
Cfd.prototype.EstimateFee = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('EstimateFee')(jsonObject)];
});
});
};
Cfd.prototype.FundRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('FundRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.GetAddressInfo = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetAddressInfo')(jsonObject)];
});
});
};
Cfd.prototype.GetAddressesFromMultisig = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetAddressesFromMultisig')(jsonObject)];
});
});
};
Cfd.prototype.GetCommitment = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetCommitment')(jsonObject)];
});
});
};
Cfd.prototype.GetCompressedPubkey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetCompressedPubkey')(jsonObject)];
});
});
};
Cfd.prototype.GetDefaultBlindingKey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetDefaultBlindingKey')(jsonObject)];
});
});
};
Cfd.prototype.GetExtkeyInfo = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetExtkeyInfo')(jsonObject)];
});
});
};
Cfd.prototype.GetIssuanceBlindingKey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetIssuanceBlindingKey')(jsonObject)];
});
});
};
Cfd.prototype.GetMnemonicWordlist = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetMnemonicWordlist')(jsonObject)];
});
});
};
Cfd.prototype.GetPrivkeyFromExtkey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetPrivkeyFromExtkey')(jsonObject)];
});
});
};
Cfd.prototype.GetPrivkeyFromWif = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetPrivkeyFromWif')(jsonObject)];
});
});
};
Cfd.prototype.GetPrivkeyWif = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetPrivkeyWif')(jsonObject)];
});
});
};
Cfd.prototype.GetPubkeyFromExtkey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetPubkeyFromExtkey')(jsonObject)];
});
});
};
Cfd.prototype.GetPubkeyFromPrivkey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetPubkeyFromPrivkey')(jsonObject)];
});
});
};
Cfd.prototype.GetWitnessStackNum = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetWitnessStackNum')(jsonObject)];
});
});
};
Cfd.prototype.CreateMultisig = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateMultisig')(jsonObject)];
});
});
};
Cfd.prototype.ParseDescriptor = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('ParseDescriptor')(jsonObject)];
});
});
};
Cfd.prototype.ParseScript = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('ParseScript')(jsonObject)];
});
});
};
Cfd.prototype.SelectUtxos = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('SelectUtxos')(jsonObject)];
});
});
};
Cfd.prototype.SerializeLedgerFormat = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('SerializeLedgerFormat')(jsonObject)];
});
});
};
Cfd.prototype.CreateSignatureHash = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateSignatureHash')(jsonObject)];
});
});
};
Cfd.prototype.CreateElementsSignatureHash = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateElementsSignatureHash')(jsonObject)];
});
});
};
Cfd.prototype.SignWithPrivkey = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('SignWithPrivkey')(jsonObject)];
});
});
};
Cfd.prototype.GetSupportedFunction = function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetSupportedFunction')()];
});
});
};
Cfd.prototype.CreateRawTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateRawTransaction')(jsonObject)];
});
});
};
Cfd.prototype.UpdateTxOutAmount = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('UpdateTxOutAmount')(jsonObject)];
});
});
};
Cfd.prototype.UpdateWitnessStack = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('UpdateWitnessStack')(jsonObject)];
});
});
};
Cfd.prototype.VerifySign = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('VerifySign')(jsonObject)];
});
});
};
Cfd.prototype.VerifySignature = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('VerifySignature')(jsonObject)];
});
});
};
return Cfd;
}());
async AddMultisigSign(jsonObject) {
return this.client.getMethod('AddMultisigSign')(jsonObject);
}
async AddPubkeyHashSign(jsonObject) {
return this.client.getMethod('AddPubkeyHashSign')(jsonObject);
}
async AddRawTransaction(jsonObject) {
return this.client.getMethod('AddRawTransaction')(jsonObject);
}
async AddScriptHashSign(jsonObject) {
return this.client.getMethod('AddScriptHashSign')(jsonObject);
}
async AddSign(jsonObject) {
return this.client.getMethod('AddSign')(jsonObject);
}
async AppendDescriptorChecksum(jsonObject) {
return this.client.getMethod('AppendDescriptorChecksum')(jsonObject);
}
async BlindRawTransaction(jsonObject) {
return this.client.getMethod('BlindRawTransaction')(jsonObject);
}
async CalculateEcSignature(jsonObject) {
return this.client.getMethod('CalculateEcSignature')(jsonObject);
}
async ConvertAes(jsonObject) {
return this.client.getMethod('ConvertAes')(jsonObject);
}
async ConvertEntropyToMnemonic(jsonObject) {
return this.client.getMethod('ConvertEntropyToMnemonic')(jsonObject);
}
async ConvertMnemonicToSeed(jsonObject) {
return this.client.getMethod('ConvertMnemonicToSeed')(jsonObject);
}
async CreateAddress(jsonObject) {
return this.client.getMethod('CreateAddress')(jsonObject);
}
async CreateDescriptor(jsonObject) {
return this.client.getMethod('CreateDescriptor')(jsonObject);
}
async CreateExtkey(jsonObject) {
return this.client.getMethod('CreateExtkey')(jsonObject);
}
async CreateExtkeyFromParent(jsonObject) {
return this.client.getMethod('CreateExtkeyFromParent')(jsonObject);
}
async CreateExtkeyFromParentKey(jsonObject) {
return this.client.getMethod('CreateExtkeyFromParentKey')(jsonObject);
}
async CreateExtkeyFromParentPath(jsonObject) {
return this.client.getMethod('CreateExtkeyFromParentPath')(jsonObject);
}
async CreateExtkeyFromSeed(jsonObject) {
return this.client.getMethod('CreateExtkeyFromSeed')(jsonObject);
}
async CreateExtPubkey(jsonObject) {
return this.client.getMethod('CreateExtPubkey')(jsonObject);
}
async CreateKeyPair(jsonObject) {
return this.client.getMethod('CreateKeyPair')(jsonObject);
}
async CreateMultisigScriptSig(jsonObject) {
return this.client.getMethod('CreateMultisigScriptSig')(jsonObject);
}
async CreateScript(jsonObject) {
return this.client.getMethod('CreateScript')(jsonObject);
}
async DecodeBase58(jsonObject) {
return this.client.getMethod('DecodeBase58')(jsonObject);
}
async DecodeDerSignatureToRaw(jsonObject) {
return this.client.getMethod('DecodeDerSignatureToRaw')(jsonObject);
}
async DecodeRawTransaction(jsonObject) {
return this.client.getMethod('DecodeRawTransaction')(jsonObject);
}
async ElementsAddRawTransaction(jsonObject) {
return this.client.getMethod('ElementsAddRawTransaction')(jsonObject);
}
async CreateDestroyAmount(jsonObject) {
return this.client.getMethod('CreateDestroyAmount')(jsonObject);
}
async CreatePegInAddress(jsonObject) {
return this.client.getMethod('CreatePegInAddress')(jsonObject);
}
async CreateRawPegin(jsonObject) {
return this.client.getMethod('CreateRawPegin')(jsonObject);
}
async CreateRawPegout(jsonObject) {
return this.client.getMethod('CreateRawPegout')(jsonObject);
}
async ElementsCreateRawTransaction(jsonObject) {
return this.client.getMethod('ElementsCreateRawTransaction')(jsonObject);
}
async ElementsDecodeRawTransaction(jsonObject) {
return this.client.getMethod('ElementsDecodeRawTransaction')(jsonObject);
}
async GetConfidentialAddress(jsonObject) {
return this.client.getMethod('GetConfidentialAddress')(jsonObject);
}
async GetUnblindedAddress(jsonObject) {
return this.client.getMethod('GetUnblindedAddress')(jsonObject);
}
async SetRawIssueAsset(jsonObject) {
return this.client.getMethod('SetRawIssueAsset')(jsonObject);
}
async SetRawReissueAsset(jsonObject) {
return this.client.getMethod('SetRawReissueAsset')(jsonObject);
}
async UnblindRawTransaction(jsonObject) {
return this.client.getMethod('UnblindRawTransaction')(jsonObject);
}
async EncodeBase58(jsonObject) {
return this.client.getMethod('EncodeBase58')(jsonObject);
}
async EncodeSignatureByDer(jsonObject) {
return this.client.getMethod('EncodeSignatureByDer')(jsonObject);
}
async EstimateFee(jsonObject) {
return this.client.getMethod('EstimateFee')(jsonObject);
}
async FundRawTransaction(jsonObject) {
return this.client.getMethod('FundRawTransaction')(jsonObject);
}
async GetAddressInfo(jsonObject) {
return this.client.getMethod('GetAddressInfo')(jsonObject);
}
async GetAddressesFromMultisig(jsonObject) {
return this.client.getMethod('GetAddressesFromMultisig')(jsonObject);
}
async GetCommitment(jsonObject) {
return this.client.getMethod('GetCommitment')(jsonObject);
}
async GetCompressedPubkey(jsonObject) {
return this.client.getMethod('GetCompressedPubkey')(jsonObject);
}
async GetDefaultBlindingKey(jsonObject) {
return this.client.getMethod('GetDefaultBlindingKey')(jsonObject);
}
async GetExtkeyInfo(jsonObject) {
return this.client.getMethod('GetExtkeyInfo')(jsonObject);
}
async GetIssuanceBlindingKey(jsonObject) {
return this.client.getMethod('GetIssuanceBlindingKey')(jsonObject);
}
async GetMnemonicWordlist(jsonObject) {
return this.client.getMethod('GetMnemonicWordlist')(jsonObject);
}
async GetPrivkeyFromExtkey(jsonObject) {
return this.client.getMethod('GetPrivkeyFromExtkey')(jsonObject);
}
async GetPrivkeyFromWif(jsonObject) {
return this.client.getMethod('GetPrivkeyFromWif')(jsonObject);
}
async GetPrivkeyWif(jsonObject) {
return this.client.getMethod('GetPrivkeyWif')(jsonObject);
}
async GetPubkeyFromExtkey(jsonObject) {
return this.client.getMethod('GetPubkeyFromExtkey')(jsonObject);
}
async GetPubkeyFromPrivkey(jsonObject) {
return this.client.getMethod('GetPubkeyFromPrivkey')(jsonObject);
}
async GetWitnessStackNum(jsonObject) {
return this.client.getMethod('GetWitnessStackNum')(jsonObject);
}
async CreateMultisig(jsonObject) {
return this.client.getMethod('CreateMultisig')(jsonObject);
}
async ParseDescriptor(jsonObject) {
return this.client.getMethod('ParseDescriptor')(jsonObject);
}
async ParseScript(jsonObject) {
return this.client.getMethod('ParseScript')(jsonObject);
}
async SelectUtxos(jsonObject) {
return this.client.getMethod('SelectUtxos')(jsonObject);
}
async SerializeLedgerFormat(jsonObject) {
return this.client.getMethod('SerializeLedgerFormat')(jsonObject);
}
async CreateSignatureHash(jsonObject) {
return this.client.getMethod('CreateSignatureHash')(jsonObject);
}
async CreateElementsSignatureHash(jsonObject) {
return this.client.getMethod('CreateElementsSignatureHash')(jsonObject);
}
async SignWithPrivkey(jsonObject) {
return this.client.getMethod('SignWithPrivkey')(jsonObject);
}
async GetSupportedFunction() {
return this.client.getMethod('GetSupportedFunction')();
}
async CreateRawTransaction(jsonObject) {
return this.client.getMethod('CreateRawTransaction')(jsonObject);
}
async UpdateTxOutAmount(jsonObject) {
return this.client.getMethod('UpdateTxOutAmount')(jsonObject);
}
async UpdateWitnessStack(jsonObject) {
return this.client.getMethod('UpdateWitnessStack')(jsonObject);
}
async VerifySign(jsonObject) {
return this.client.getMethod('VerifySign')(jsonObject);
}
async VerifySignature(jsonObject) {
return this.client.getMethod('VerifySignature')(jsonObject);
}
}
exports.default = Cfd;
//# sourceMappingURL=Cfd.js.map
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

@@ -38,25 +25,23 @@ if (k2 === undefined) k2 = k;

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __importStar(require("lodash"));
var find = _.find, findLast = _.findLast, findLastIndex = _.findLastIndex, isFunction = _.isFunction;
var Dlc_1 = __importDefault(require("./Dlc"));
var Cfd_1 = __importDefault(require("./Cfd"));
var Wallet_1 = __importDefault(require("./Wallet"));
var errors_1 = require("@liquality/errors");
var Client = /** @class */ (function (_super) {
__extends(Client, _super);
const _ = __importStar(require("lodash"));
const { find, findLast, findLastIndex, isFunction } = _;
const Dlc_1 = __importDefault(require("./Dlc"));
const Cfd_1 = __importDefault(require("./Cfd"));
const Wallet_1 = __importDefault(require("./Wallet"));
const errors_1 = require("@liquality/errors");
class Client extends Dlc_1.default {
/**
* Client
*/
function Client(client) {
var _this = _super.call(this, client) || this;
_this.client = client;
constructor(client) {
super(client);
this.client = client;
/**
* @type {Array}
*/
_this._providers = [];
_this._dlc = new Dlc_1.default(_this);
_this._cfd = new Cfd_1.default(_this);
_this._wallet = new Wallet_1.default(_this);
_this.identifier = 'Client';
return _this;
this._providers = [];
this._dlc = new Dlc_1.default(this);
this._cfd = new Cfd_1.default(this);
this._wallet = new Wallet_1.default(this);
this.identifier = 'Client';
}

@@ -70,7 +55,7 @@ /**

*/
Client.prototype.addProvider = function (provider) {
addProvider(provider) {
if (!isFunction(provider.setClient)) {
throw new (errors_1.InvalidProviderError('Provider should have "setClient" method'))();
}
var duplicate = find(this._providers, function (_provider) { return provider.constructor === _provider.constructor; });
const duplicate = find(this._providers, (_provider) => provider.constructor === _provider.constructor);
if (duplicate) {

@@ -82,3 +67,3 @@ throw new (errors_1.DuplicateProviderError('Duplicate provider'))();

return this;
};
}
/**

@@ -96,9 +81,8 @@ * Check the availability of a method.

*/
Client.prototype.getProviderForMethod = function (method, requestor) {
if (requestor === void 0) { requestor = false; }
getProviderForMethod(method, requestor = false) {
if (this._providers.concat(this.client._providers).length === 0) {
throw new (errors_1.NoProviderError('No provider provided. Add a provider to the client'))();
}
var indexOfRequestor = requestor
? findLastIndex(this._providers.concat(this.client._providers), function (provider) {
let indexOfRequestor = requestor
? findLastIndex(this.client._providers.concat(this._providers), function (provider) {
return (requestor.constructor === provider.constructor ||

@@ -108,6 +92,6 @@ (provider.getIdentifier &&

})
: this._providers.concat(this.client._providers).length;
: this.client._providers.concat(this._providers).length;
if (indexOfRequestor === -1)
indexOfRequestor = 0;
var provider = findLast(this._providers.concat(this.client._providers), function (provider) {
const provider = findLast(this.client._providers.concat(this._providers), function (provider) {
try {

@@ -126,6 +110,6 @@ return isFunction(provider[method]);

if (provider == null) {
throw new (errors_1.UnimplementedMethodError("Unimplemented method \"" + method + "\""))();
throw new (errors_1.UnimplementedMethodError(`Unimplemented method "${method}"`))();
}
return provider;
};
}
/**

@@ -138,5 +122,5 @@ * Helper method that returns method from a provider.

*/
Client.prototype.getMethod = function (method, requestor) {
getMethod(method, requestor) {
try {
var provider = this.getProviderForMethod(method, requestor);
const provider = this.getProviderForMethod(method, requestor);
return provider[method].bind(provider);

@@ -152,30 +136,17 @@ }

}
};
Object.defineProperty(Client.prototype, "dlc", {
get: function () {
return this._dlc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Client.prototype, "cfd", {
get: function () {
return this._cfd;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Client.prototype, "wallet", {
get: function () {
return this._wallet;
},
enumerable: false,
configurable: true
});
Client.prototype.getIdentifier = function () {
}
get dlc() {
return this._dlc;
}
get cfd() {
return this._cfd;
}
get wallet() {
return this._wallet;
}
getIdentifier() {
return this.identifier;
};
return Client;
}(Dlc_1.default));
}
}
exports.default = Client;
//# sourceMappingURL=Client.js.map
"use strict";
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());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dlc = /** @class */ (function () {
function Dlc(client) {
class Dlc {
constructor(client) {
this.client = client;
}
Dlc.prototype.initializeContractAndOffer = function (input, payouts, oracleInfo, messagesList, startingIndex, fixedInputs) {
if (startingIndex === void 0) { startingIndex = 0; }
if (fixedInputs === void 0) { fixedInputs = []; }
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('initializeContractAndOffer')(input, payouts, oracleInfo, messagesList, startingIndex, fixedInputs)];
});
});
};
Dlc.prototype.confirmContractOffer = function (offerMessage, startingIndex, fixedInputs) {
if (startingIndex === void 0) { startingIndex = 0; }
if (fixedInputs === void 0) { fixedInputs = []; }
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('confirmContractOffer')(offerMessage, startingIndex, fixedInputs)];
});
});
};
Dlc.prototype.signContract = function (acceptMessage) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('signContract')(acceptMessage)];
});
});
};
Dlc.prototype.finalizeContract = function (signMessage) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('finalizeContract')(signMessage)];
});
});
};
Dlc.prototype.refund = function (contractId) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('refund')(contractId)];
});
});
};
Dlc.prototype.initiateEarlyExit = function (contractId, outputs) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('initiateEarlyExit')(contractId, outputs)];
});
});
};
Dlc.prototype.finalizeEarlyExit = function (contractId, mutualClosingMessage) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('finalizeEarlyExit')(contractId, mutualClosingMessage)];
});
});
};
Dlc.prototype.unilateralClose = function (outcomeIndex, oracleSignatures, contractId) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('unilateralClose')(outcomeIndex, oracleSignatures, contractId)];
});
});
};
Dlc.prototype.buildUnilateralClose = function (oracleSignature, outcomeIndex, contractId) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('buildUnilateralClose')(oracleSignature, outcomeIndex, contractId)];
});
});
};
Dlc.prototype.getFundingUtxoAddressesForOfferMessages = function (offerMessages) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('getFundingUtxoAddressesForOfferMessages')(offerMessages)];
});
});
};
Dlc.prototype.getFundingUtxoAddressesForAcceptMessages = function (acceptMessages) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('getFundingUtxoAddressesForAcceptMessages')(acceptMessages)];
});
});
};
Dlc.prototype.hasDlc = function (contractId) {
async initializeContractAndOffer(input, payouts, oracleInfo, messagesList, startingIndex = 0, fixedInputs = []) {
return this.client.getMethod('initializeContractAndOffer')(input, payouts, oracleInfo, messagesList, startingIndex, fixedInputs);
}
async confirmContractOffer(offerMessage, startingIndex = 0, fixedInputs = []) {
return this.client.getMethod('confirmContractOffer')(offerMessage, startingIndex, fixedInputs);
}
async signContract(acceptMessage) {
return this.client.getMethod('signContract')(acceptMessage);
}
async finalizeContract(signMessage) {
return this.client.getMethod('finalizeContract')(signMessage);
}
async refund(contractId) {
return this.client.getMethod('refund')(contractId);
}
async initiateEarlyExit(contractId, outputs) {
return this.client.getMethod('initiateEarlyExit')(contractId, outputs);
}
async finalizeEarlyExit(contractId, mutualClosingMessage) {
return this.client.getMethod('finalizeEarlyExit')(contractId, mutualClosingMessage);
}
async unilateralClose(outcomeIndex, oracleSignatures, contractId) {
return this.client.getMethod('unilateralClose')(outcomeIndex, oracleSignatures, contractId);
}
async buildUnilateralClose(oracleSignature, outcomeIndex, contractId) {
return this.client.getMethod('buildUnilateralClose')(oracleSignature, outcomeIndex, contractId);
}
async getFundingUtxoAddressesForOfferMessages(offerMessages) {
return this.client.getMethod('getFundingUtxoAddressesForOfferMessages')(offerMessages);
}
async getFundingUtxoAddressesForAcceptMessages(acceptMessages) {
return this.client.getMethod('getFundingUtxoAddressesForAcceptMessages')(acceptMessages);
}
hasDlc(contractId) {
return this.client.getMethod('hasDlc')(contractId);
};
Dlc.prototype.importContract = function (contract, startingIndex) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('importContract')(contract, startingIndex)];
});
});
};
Dlc.prototype.exportContract = function (contractId) {
}
async importContract(contract, startingIndex) {
return this.client.getMethod('importContract')(contract, startingIndex);
}
exportContract(contractId) {
return this.client.getMethod('exportContract')(contractId);
};
Dlc.prototype.exportContracts = function () {
}
exportContracts() {
return this.client.getMethod('exportContracts')();
};
Dlc.prototype.deleteContract = function (contractId) {
}
deleteContract(contractId) {
return this.client.getMethod('deleteContract')(contractId);
};
Dlc.prototype.importContractFromOfferMessage = function (offerMessage, startingIndex) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('importContractFromOfferMessage')(offerMessage, startingIndex)];
});
});
};
Dlc.prototype.importContractFromAcceptMessage = function (offerMessage, acceptMessage, startingIndex) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('importContractFromAcceptMessage')(offerMessage, acceptMessage, startingIndex)];
});
});
};
Dlc.prototype.importContractFromAcceptAndSignMessage = function (offerMessage, acceptMessage, signMessage, startingIndex) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('importContractFromAcceptAndSignMessage')(offerMessage, acceptMessage, signMessage, startingIndex)];
});
});
};
Dlc.prototype.importContractFromSignMessageAndCreateFinal = function (offerMessage, acceptMessage, signMessage, startingIndex) {
if (startingIndex === void 0) { startingIndex = 0; }
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('importContractFromSignMessageAndCreateFinal')(offerMessage, acceptMessage, signMessage, startingIndex)];
});
});
};
Dlc.prototype.outputsToPayouts = function (outputs, oracleInfos, rValuesMessagesList, localCollateral, remoteCollateral, payoutLocal) {
}
async importContractFromOfferMessage(offerMessage, startingIndex) {
return this.client.getMethod('importContractFromOfferMessage')(offerMessage, startingIndex);
}
async importContractFromAcceptMessage(offerMessage, acceptMessage, startingIndex) {
return this.client.getMethod('importContractFromAcceptMessage')(offerMessage, acceptMessage, startingIndex);
}
async importContractFromAcceptAndSignMessage(offerMessage, acceptMessage, signMessage, startingIndex) {
return this.client.getMethod('importContractFromAcceptAndSignMessage')(offerMessage, acceptMessage, signMessage, startingIndex);
}
async importContractFromSignMessageAndCreateFinal(offerMessage, acceptMessage, signMessage, startingIndex = 0) {
return this.client.getMethod('importContractFromSignMessageAndCreateFinal')(offerMessage, acceptMessage, signMessage, startingIndex);
}
outputsToPayouts(outputs, oracleInfos, rValuesMessagesList, localCollateral, remoteCollateral, payoutLocal) {
return this.client.getMethod('outputsToPayouts')(outputs, oracleInfos, rValuesMessagesList, localCollateral, remoteCollateral, payoutLocal);
};
Dlc.prototype.AddSignatureToFundTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('AddSignatureToFundTransaction')(jsonObject)];
});
});
};
Dlc.prototype.CreateCetAdaptorSignature = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateCetAdaptorSignature')(jsonObject)];
});
});
};
Dlc.prototype.CreateCetAdaptorSignatures = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateCetAdaptorSignatures')(jsonObject)];
});
});
};
Dlc.prototype.AddSignaturesToRefundTx = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('AddSignaturesToRefundTx')(jsonObject)];
});
});
};
Dlc.prototype.CreateCet = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateCet')(jsonObject)];
});
});
};
Dlc.prototype.CreateDlcTransactions = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateDlcTransactions')(jsonObject)];
});
});
};
Dlc.prototype.CreateFundTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateFundTransaction')(jsonObject)];
});
});
};
Dlc.prototype.CreateRefundTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('CreateRefundTransaction')(jsonObject)];
});
});
};
Dlc.prototype.GetRawFundTxSignature = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetRawFundTxSignature')(jsonObject)];
});
});
};
Dlc.prototype.GetRawRefundTxSignature = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('GetRawRefundTxSignature')(jsonObject)];
});
});
};
Dlc.prototype.SignCetRequest = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('SignCetRequest')(jsonObject)];
});
});
};
Dlc.prototype.SignFundTransaction = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('SignFundTransaction')(jsonObject)];
});
});
};
Dlc.prototype.VerifyCetAdaptorSignature = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('VerifyCetAdaptorSignature')(jsonObject)];
});
});
};
Dlc.prototype.VerifyCetAdaptorSignaturesRequest = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('VerifyCetAdaptorSignatures')(jsonObject)];
});
});
};
Dlc.prototype.VerifyFundTxSignature = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('VerifyFundTxSignature')(jsonObject)];
});
});
};
Dlc.prototype.VerifyRefundTxSignature = function (jsonObject) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('VerifyRefundTxSignature')(jsonObject)];
});
});
};
return Dlc;
}());
}
async AddSignatureToFundTransaction(jsonObject) {
return this.client.getMethod('AddSignatureToFundTransaction')(jsonObject);
}
async CreateCetAdaptorSignature(jsonObject) {
return this.client.getMethod('CreateCetAdaptorSignature')(jsonObject);
}
async CreateCetAdaptorSignatures(jsonObject) {
return this.client.getMethod('CreateCetAdaptorSignatures')(jsonObject);
}
async AddSignaturesToRefundTx(jsonObject) {
return this.client.getMethod('AddSignaturesToRefundTx')(jsonObject);
}
async CreateCet(jsonObject) {
return this.client.getMethod('CreateCet')(jsonObject);
}
async CreateDlcTransactions(jsonObject) {
return this.client.getMethod('CreateDlcTransactions')(jsonObject);
}
async CreateFundTransaction(jsonObject) {
return this.client.getMethod('CreateFundTransaction')(jsonObject);
}
async CreateRefundTransaction(jsonObject) {
return this.client.getMethod('CreateRefundTransaction')(jsonObject);
}
async GetRawFundTxSignature(jsonObject) {
return this.client.getMethod('GetRawFundTxSignature')(jsonObject);
}
async GetRawRefundTxSignature(jsonObject) {
return this.client.getMethod('GetRawRefundTxSignature')(jsonObject);
}
async SignCetRequest(jsonObject) {
return this.client.getMethod('SignCetRequest')(jsonObject);
}
async SignFundTransaction(jsonObject) {
return this.client.getMethod('SignFundTransaction')(jsonObject);
}
async VerifyCetAdaptorSignature(jsonObject) {
return this.client.getMethod('VerifyCetAdaptorSignature')(jsonObject);
}
async VerifyCetAdaptorSignaturesRequest(jsonObject) {
return this.client.getMethod('VerifyCetAdaptorSignatures')(jsonObject);
}
async VerifyFundTxSignature(jsonObject) {
return this.client.getMethod('VerifyFundTxSignature')(jsonObject);
}
async VerifyRefundTxSignature(jsonObject) {
return this.client.getMethod('VerifyRefundTxSignature')(jsonObject);
}
}
exports.default = Dlc;
//# sourceMappingURL=Dlc.js.map
"use strict";
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());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var Wallet = /** @class */ (function () {
function Wallet(client) {
class Wallet {
constructor(client) {
this.client = client;
}
Wallet.prototype.buildSweepTransactionWithSetOutputs = function (externalChangeAddress, feePerByte, outputs, fixedInputs) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('buildSweepTransactionWithSetOutputs')(externalChangeAddress, feePerByte, outputs, fixedInputs)];
});
});
};
Wallet.prototype.sendSweepTransactionWithSetOutputs = function (externalChangeAddress, feePerByte, outputs, fixedInputs) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.client.getMethod('sendSweepTransactionWithSetOutputs')(externalChangeAddress, feePerByte, outputs, fixedInputs)];
});
});
};
return Wallet;
}());
async buildSweepTransactionWithSetOutputs(externalChangeAddress, feePerByte, outputs, fixedInputs) {
return this.client.getMethod('buildSweepTransactionWithSetOutputs')(externalChangeAddress, feePerByte, outputs, fixedInputs);
}
async sendSweepTransactionWithSetOutputs(externalChangeAddress, feePerByte, outputs, fixedInputs) {
return this.client.getMethod('sendSweepTransactionWithSetOutputs')(externalChangeAddress, feePerByte, outputs, fixedInputs);
}
async getUnusedAddress(change = false, numAddressPerCall = 100) {
return this.client.getMethod('getUnusedAddress')(change, numAddressPerCall);
}
}
exports.default = Wallet;
//# sourceMappingURL=Wallet.js.map
{
"name": "@atomicfinance/client",
"umdName": "Client",
"version": "1.0.0-alpha.4",
"version": "1.0.0",
"description": "> TODO: description",

@@ -15,7 +15,7 @@ "author": "Matthew Black <mblackmblackmblack@gmail.com>",

"scripts": {
"build": "yarn run clean && yarn run compile",
"clean": "rimraf -rf ./dist",
"compile": "tsc -p tsconfig.build.json",
"build": "../../node_modules/.bin/tsc --project tsconfig.json",
"prepublishOnly": "yarn run build",
"test": "yarn run build"
"test": "yarn run build",
"lint": "../../node_modules/.bin/eslint --ignore-path ../../.eslintignore -c ../../.eslintrc.js .",
"lint:fix": "../../node_modules/.bin/eslint --fix --ignore-path ../../.eslintignore -c ../../.eslintrc.js ."
},

@@ -32,3 +32,3 @@ "dependencies": {

},
"gitHead": "fd47bb847175121d587ef80e5f35887fb3167567"
"gitHead": "3040814c31dd62ede1bbf9bb6d20637019477a23"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc