update dist

This commit is contained in:
woodser 2023-07-25 09:15:40 -04:00
parent 1dc0a31555
commit ceeeab36cd
7 changed files with 25 additions and 25 deletions

View File

@ -423,10 +423,10 @@ export default class HavenoClient {
* @param {number} marketPriceMarginPct - if using market price, % from market price to accept (optional, default 0%)
* @param {bigint} minAmount - minimum amount to trade (optional, default to fixed amount)
* @param {number} triggerPrice - price to remove offer (optional)
* @param {number} splitOutput - create a new output reserved for the offer, incurring an on-chain transaction and 10 confirmations before the offer goes live (default = false)
* @param {number} reserveExactAmount - reserve exact amount needed for offer, incurring on-chain transaction and 10 confirmations before the offer goes live (default = false)
* @return {OfferInfo} the posted offer
*/
postOffer(direction: string, amount: bigint, assetCode: string, paymentAccountId: string, buyerSecurityDepositPct: number, price?: number, marketPriceMarginPct?: number, triggerPrice?: number, splitOutput?: boolean, minAmount?: bigint): Promise<OfferInfo>;
postOffer(direction: string, amount: bigint, assetCode: string, paymentAccountId: string, buyerSecurityDepositPct: number, price?: number, marketPriceMarginPct?: number, triggerPrice?: number, reserveExactAmount?: boolean, minAmount?: bigint): Promise<OfferInfo>;
/**
* Remove a posted offer, releasing its reserved funds.
*

View File

@ -979,10 +979,10 @@ class HavenoClient {
* @param {number} marketPriceMarginPct - if using market price, % from market price to accept (optional, default 0%)
* @param {bigint} minAmount - minimum amount to trade (optional, default to fixed amount)
* @param {number} triggerPrice - price to remove offer (optional)
* @param {number} splitOutput - create a new output reserved for the offer, incurring an on-chain transaction and 10 confirmations before the offer goes live (default = false)
* @param {number} reserveExactAmount - reserve exact amount needed for offer, incurring on-chain transaction and 10 confirmations before the offer goes live (default = false)
* @return {OfferInfo} the posted offer
*/
async postOffer(direction, amount, assetCode, paymentAccountId, buyerSecurityDepositPct, price, marketPriceMarginPct, triggerPrice, splitOutput, minAmount) {
async postOffer(direction, amount, assetCode, paymentAccountId, buyerSecurityDepositPct, price, marketPriceMarginPct, triggerPrice, reserveExactAmount, minAmount) {
try {
const request = new grpc_pb_1.PostOfferRequest()
.setDirection(direction)
@ -998,8 +998,8 @@ class HavenoClient {
request.setMarketPriceMarginPct(marketPriceMarginPct);
if (triggerPrice)
request.setTriggerPrice(triggerPrice.toString());
if (splitOutput)
request.setSplitOutput(splitOutput);
if (reserveExactAmount)
request.setReserveExactAmount(reserveExactAmount);
return (await this._offersClient.postOffer(request, { password: this._password })).getOffer();
}
catch (e) {

File diff suppressed because one or more lines are too long

View File

@ -1499,8 +1499,8 @@ export class PostOfferRequest extends jspb.Message {
getTriggerPrice(): string;
setTriggerPrice(value: string): PostOfferRequest;
getSplitOutput(): boolean;
setSplitOutput(value: boolean): PostOfferRequest;
getReserveExactAmount(): boolean;
setReserveExactAmount(value: boolean): PostOfferRequest;
getPaymentAccountId(): string;
setPaymentAccountId(value: string): PostOfferRequest;
@ -1524,7 +1524,7 @@ export namespace PostOfferRequest {
minAmount: string,
buyerSecurityDepositPct: number,
triggerPrice: string,
splitOutput: boolean,
reserveExactAmount: boolean,
paymentAccountId: string,
}
}

View File

@ -14510,7 +14510,7 @@ proto.io.haveno.protobuffer.PostOfferRequest.toObject = function(includeInstance
minAmount: jspb.Message.getFieldWithDefault(msg, 7, "0"),
buyerSecurityDepositPct: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0),
triggerPrice: jspb.Message.getFieldWithDefault(msg, 9, ""),
splitOutput: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
reserveExactAmount: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
paymentAccountId: jspb.Message.getFieldWithDefault(msg, 11, "")
};
@ -14586,7 +14586,7 @@ proto.io.haveno.protobuffer.PostOfferRequest.deserializeBinaryFromReader = funct
break;
case 10:
var value = /** @type {boolean} */ (reader.readBool());
msg.setSplitOutput(value);
msg.setReserveExactAmount(value);
break;
case 11:
var value = /** @type {string} */ (reader.readString());
@ -14684,7 +14684,7 @@ proto.io.haveno.protobuffer.PostOfferRequest.serializeBinaryToWriter = function(
f
);
}
f = message.getSplitOutput();
f = message.getReserveExactAmount();
if (f) {
writer.writeBool(
10,
@ -14864,10 +14864,10 @@ proto.io.haveno.protobuffer.PostOfferRequest.prototype.setTriggerPrice = functio
/**
* optional bool split_output = 10;
* optional bool reserve_exact_amount = 10;
* @return {boolean}
*/
proto.io.haveno.protobuffer.PostOfferRequest.prototype.getSplitOutput = function() {
proto.io.haveno.protobuffer.PostOfferRequest.prototype.getReserveExactAmount = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
};
@ -14876,7 +14876,7 @@ proto.io.haveno.protobuffer.PostOfferRequest.prototype.getSplitOutput = function
* @param {boolean} value
* @return {!proto.io.haveno.protobuffer.PostOfferRequest} returns this
*/
proto.io.haveno.protobuffer.PostOfferRequest.prototype.setSplitOutput = function(value) {
proto.io.haveno.protobuffer.PostOfferRequest.prototype.setReserveExactAmount = function(value) {
return jspb.Message.setProto3BooleanField(this, 10, value);
};

View File

@ -5875,8 +5875,8 @@ export class OpenOffer extends jspb.Message {
getTriggerPrice(): number;
setTriggerPrice(value: number): OpenOffer;
getSplitOutput(): boolean;
setSplitOutput(value: boolean): OpenOffer;
getReserveExactAmount(): boolean;
setReserveExactAmount(value: boolean): OpenOffer;
getScheduledTxHashesList(): Array<string>;
setScheduledTxHashesList(value: Array<string>): OpenOffer;
@ -5911,7 +5911,7 @@ export namespace OpenOffer {
offer?: Offer.AsObject,
state: OpenOffer.State,
triggerPrice: number,
splitOutput: boolean,
reserveExactAmount: boolean,
scheduledTxHashesList: Array<string>,
scheduledAmount: string,
splitOutputTxHash: string,

View File

@ -48268,7 +48268,7 @@ proto.io.haveno.protobuffer.OpenOffer.toObject = function(includeInstance, msg)
offer: (f = msg.getOffer()) && proto.io.haveno.protobuffer.Offer.toObject(includeInstance, f),
state: jspb.Message.getFieldWithDefault(msg, 2, 0),
triggerPrice: jspb.Message.getFieldWithDefault(msg, 3, 0),
splitOutput: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
reserveExactAmount: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
scheduledTxHashesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f,
scheduledAmount: jspb.Message.getFieldWithDefault(msg, 6, ""),
splitOutputTxHash: jspb.Message.getFieldWithDefault(msg, 7, ""),
@ -48326,7 +48326,7 @@ proto.io.haveno.protobuffer.OpenOffer.deserializeBinaryFromReader = function(msg
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setSplitOutput(value);
msg.setReserveExactAmount(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
@ -48403,7 +48403,7 @@ proto.io.haveno.protobuffer.OpenOffer.serializeBinaryToWriter = function(message
f
);
}
f = message.getSplitOutput();
f = message.getReserveExactAmount();
if (f) {
writer.writeBool(
4,
@ -48542,10 +48542,10 @@ proto.io.haveno.protobuffer.OpenOffer.prototype.setTriggerPrice = function(value
/**
* optional bool split_output = 4;
* optional bool reserve_exact_amount = 4;
* @return {boolean}
*/
proto.io.haveno.protobuffer.OpenOffer.prototype.getSplitOutput = function() {
proto.io.haveno.protobuffer.OpenOffer.prototype.getReserveExactAmount = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};
@ -48554,7 +48554,7 @@ proto.io.haveno.protobuffer.OpenOffer.prototype.getSplitOutput = function() {
* @param {boolean} value
* @return {!proto.io.haveno.protobuffer.OpenOffer} returns this
*/
proto.io.haveno.protobuffer.OpenOffer.prototype.setSplitOutput = function(value) {
proto.io.haveno.protobuffer.OpenOffer.prototype.setReserveExactAmount = function(value) {
return jspb.Message.setProto3BooleanField(this, 4, value);
};