Added AccountClient

This commit is contained in:
muscleman 2021-11-18 10:40:25 -06:00
parent f9559f2a13
commit 6546534cee
9 changed files with 3073 additions and 7 deletions

View File

@ -40,6 +40,8 @@ message RegisterDisputeAgentRequest {
message RegisterDisputeAgentReply {
}
///////////////////////////////////////////////////////////////////////////////////////////
// Help
///////////////////////////////////////////////////////////////////////////////////////////

View File

@ -964,7 +964,7 @@ message DisputeResult {
bool screen_cast = 7;
string summary_notes = 8;
ChatMessage chat_message = 9;
reserved 10; // was bytes arbitrator_signature = 10;
bytes arbitrator_signature = 10;
int64 buyer_payout_amount = 11;
int64 seller_payout_amount = 12;
bytes arbitrator_pub_key = 13;
@ -1915,4 +1915,4 @@ message MockMailboxPayload {
message MockPayload {
string message_version = 1;
string message = 2;
}
}

View File

@ -3,16 +3,19 @@ import logo from './logo.png';
import './App.css';
import {HavenoDaemon} from './HavenoDaemon';
const HAVENO_DAEMON_URL = "http://localhost:8080";
const HAVENO_DAEMON_PASSWORD = "apitest";
class App extends React.Component<{}, {daemonVersion: string}> {
class App extends React.Component<{}, {daemonVersion: string, exists: string, accountOpen: string}> {
daemon: HavenoDaemon;
constructor(props: any) {
super(props);
this.state = {daemonVersion: ""};
this.state = {daemonVersion: "",
exists: "",
accountOpen: ""};
this.daemon = new HavenoDaemon(HAVENO_DAEMON_URL, HAVENO_DAEMON_PASSWORD);
}
@ -27,6 +30,56 @@ class App extends React.Component<{}, {daemonVersion: string}> {
<p>
Coming soon...
</p>
<div>
<button
onClick={async(e) => await this.accountExits()}>Account Exists
</button>&nbsp;
Exists: {this.state.exists}
</div>
<div>
<button
onClick={async(e) => await this.isAccountOpen()}>Is Account Open
</button>&nbsp;
Exists: {this.state.accountOpen}
</div>
<div>
<input type="password"></input>&nbsp;
<button
onClick={async(e) => await this.createAccount()}>Create Account
</button>
</div>
<div>
<input type="password"></input>&nbsp;
<button
onClick={async(e) => await this.openAccount()}>Open Account
</button>
</div>
<div>
<button
onClick={async(e) => await this.closeAccount()}>Close Account
</button>
</div>
<div>
<button
onClick={async(e) => await this.backupAccount()}>Backup Account
</button>
</div>
<div>
<button
onClick={async(e) => await this.deleteAccount()}>Delete Account
</button>
</div>
<div>
<button
onClick={async(e) => await this.restoreAccount()}>Restore Account
</button>
</div>
<div>
<input type="password"></input>&nbsp;
<button
onClick={async(e) => await this.changePassword()}>Change Password
</button>
</div>
<a
className="App-link"
href="https://haveno.exchange"
@ -48,6 +101,80 @@ class App extends React.Component<{}, {daemonVersion: string}> {
this.setState({daemonVersion: " not available"});
}
}
async accountExits() {
try {
let result = await this.daemon.accountExists();
this.setState({exists: result ? "true" : "false"});
} catch (err) {
console.error(err);
}
}
async isAccountOpen() {
try {
let result = await this.daemon.isAccountOpen();
this.setState({accountOpen: result ? "true" : "false"});
} catch (err) {
console.error(err);
}
}
async createAccount() {
try {
await this.daemon.createAccount("123456");
} catch (err) {
console.error(err);
}
}
async openAccount() {
try {
await this.daemon.openAccount("123456");
} catch (err) {
console.error(err);
}
}
async closeAccount() {
try {
await this.daemon.closeAccount();
} catch (err) {
console.error(err);
}
}
async backupAccount() {
try {
await this.daemon.backupAccount();
} catch (err) {
console.error(err);
}
}
async deleteAccount() {
try {
await this.daemon.deleteAccount();
} catch (err) {
console.error(err);
}
}
async restoreAccount() {
try {
//await this.daemon.restoreAccount();
} catch (err) {
console.error(err);
}
}
async changePassword() {
try {
await this.daemon.changePassword("abcdefg");
} catch (err) {
console.error(err);
}
}
}
export default App;

View File

@ -1,6 +1,23 @@
import * as grpcWeb from 'grpc-web';
import {GetVersionClient, PriceClient, WalletsClient, OffersClient, PaymentAccountsClient, TradesClient} from './protobuf/GrpcServiceClientPb';
import {GetVersionRequest, GetVersionReply, MarketPriceRequest, MarketPriceReply, GetBalancesRequest, GetBalancesReply, XmrBalanceInfo, GetOffersRequest, GetOffersReply, OfferInfo, GetPaymentAccountsRequest, GetPaymentAccountsReply, CreateCryptoCurrencyPaymentAccountRequest, CreateCryptoCurrencyPaymentAccountReply, CreateOfferRequest, CreateOfferReply, CancelOfferRequest, TakeOfferRequest, TakeOfferReply, TradeInfo, GetTradeRequest, GetTradeReply, GetNewDepositSubaddressRequest, GetNewDepositSubaddressReply, ConfirmPaymentStartedRequest, ConfirmPaymentReceivedRequest} from './protobuf/grpc_pb';
import {GetVersionClient, PriceClient, WalletsClient, OffersClient, PaymentAccountsClient, TradesClient, AccountClient} from './protobuf/GrpcServiceClientPb';
import {GetVersionRequest, GetVersionReply, MarketPriceRequest, MarketPriceReply, GetBalancesRequest, GetBalancesReply, XmrBalanceInfo, GetOffersRequest, GetOffersReply, OfferInfo, GetPaymentAccountsRequest, GetPaymentAccountsReply, CreateCryptoCurrencyPaymentAccountRequest, CreateCryptoCurrencyPaymentAccountReply, CreateOfferRequest, CreateOfferReply, CancelOfferRequest, TakeOfferRequest, TakeOfferReply, TradeInfo, GetTradeRequest, GetTradeReply, GetNewDepositSubaddressRequest, GetNewDepositSubaddressReply, ConfirmPaymentStartedRequest, ConfirmPaymentReceivedRequest,
AccountExistsRequest,
AccountExistsReply,
IsAccountOpenRequest,
IsAccountOpenReply,
CreateAccountRequest,
CreateAccountReply,
OpenAccountRequest,
OpenAccountReply,
CloseAccountRequest,
CloseAccountReply,
BackupAccountRequest,
BackupAccountReply,
DeleteAccountRequest,
DeleteAccountReply,
ChangePasswordRequest,
ChangePasswordReply
} from './protobuf/grpc_pb';
import {PaymentAccount, AvailabilityResult} from './protobuf/pb_pb';
/**
@ -17,7 +34,8 @@ class HavenoDaemon {
_paymentAccountsClient: PaymentAccountsClient;
_offersClient: OffersClient;
_tradesClient: TradesClient;
_accountClient: AccountClient;
/**
* Construct a client connected to a Haveno daemon.
*
@ -33,6 +51,7 @@ class HavenoDaemon {
this._paymentAccountsClient = new PaymentAccountsClient(this._url);
this._offersClient = new OffersClient(this._url);
this._tradesClient = new TradesClient(this._url);
this._accountClient = new AccountClient(this._url);
}
/**
@ -296,6 +315,142 @@ class HavenoDaemon {
});
});
}
///////////////////////////////////////////////
// Account
///////////////////////////////////////////////
/**
* Determine if an Account Exists.
*
* @return {boolean} whether an account exists
*/
async accountExists(): Promise<boolean> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.accountExists(new AccountExistsRequest(), {password: that._password}, function(err: grpcWeb.RpcError, response: AccountExistsReply) {
if (err) reject(err);
else resolve(response.getAccountExists());
});
});
}
/**
* Determine if an Account is open.
*
* @return {boolean} whether an account is open
*/
async isAccountOpen(): Promise<boolean> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.isAccountOpen(new IsAccountOpenRequest(), {password: that._password}, function(err: grpcWeb.RpcError, response: IsAccountOpenReply) {
if (err) reject(err);
else resolve(response.getIsAccountOpen());
});
});
}
/**
* Create an Account.
*
* @param {string} password - the password for the Account
*/
async createAccount(password: string): Promise<void> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.createAccount(new CreateAccountRequest().setPassword(password), {password: that._password}, function(err: grpcWeb.RpcError, response: CreateAccountReply) {
if (err) reject(err);
else resolve();
});
});
}
/**
* Create an Account.
*
* @param {string} password - the password for the Account
*/
async openAccount(password: string): Promise<void> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.openAccount(new OpenAccountRequest().setPassword(password), {password: that._password}, function(err: grpcWeb.RpcError, response: OpenAccountReply) {
if (err) reject(err);
else resolve();
});
});
}
/**
* Close an Account.
*
*/
async closeAccount(): Promise<void> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.closeAccount(new CloseAccountRequest(), {password: that._password}, function(err: grpcWeb.RpcError, response: CloseAccountReply) {
if (err) reject(err);
else resolve();
});
});
}
/**
* Backup an Account.
*
*/
async backupAccount(): Promise<void> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.backupAccount(new BackupAccountRequest(), {password: that._password}, function(err: grpcWeb.RpcError, response: BackupAccountReply) {
if (err) reject(err);
else resolve();
});
});
}
/**
* Delete an Account.
*
*/
async deleteAccount(): Promise<void> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.deleteAccount(new DeleteAccountRequest(), {password: that._password}, function(err: grpcWeb.RpcError, response: DeleteAccountReply) {
if (err) reject(err);
else resolve();
});
});
}
/**
* restore an Account.
*
*/
/*
async restoreAccount(): Promise<void> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.restoreAccount(new RestoreAccountRequest(), {password: that._password}, function(err: grpcWeb.RpcError, response: RestoreAccountReply) {
if (err) reject(err);
else resolve();
});
});
}
*/
/**
* change Account password.
*
*/
async changePassword(password: string): Promise<void> {
let that = this;
return new Promise(function(resolve, reject) {
that._accountClient.changePassword(new ChangePasswordRequest().setPassword(password), {password: that._password}, function(err: grpcWeb.RpcError, response: ChangePasswordReply) {
if (err) reject(err);
else resolve();
});
});
}
}
export {HavenoDaemon};

View File

@ -80,6 +80,371 @@ export class DisputeAgentsClient {
}
export class AccountClient {
client_: grpcWeb.AbstractClientBase;
hostname_: string;
credentials_: null | { [index: string]: string; };
options_: null | { [index: string]: any; };
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: any; }) {
if (!options) options = {};
if (!credentials) credentials = {};
options['format'] = 'text';
this.client_ = new grpcWeb.GrpcWebClientBase(options);
this.hostname_ = hostname;
this.credentials_ = credentials;
this.options_ = options;
}
methodInfoAccountExists = new grpcWeb.MethodDescriptor(
'/io.bisq.protobuffer.Account/AccountExists',
grpcWeb.MethodType.UNARY,
grpc_pb.AccountExistsRequest,
grpc_pb.AccountExistsReply,
(request: grpc_pb.AccountExistsRequest) => {
return request.serializeBinary();
},
grpc_pb.AccountExistsReply.deserializeBinary
);
accountExists(
request: grpc_pb.AccountExistsRequest,
metadata: grpcWeb.Metadata | null): Promise<grpc_pb.AccountExistsReply>;
accountExists(
request: grpc_pb.AccountExistsRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.RpcError,
response: grpc_pb.AccountExistsReply) => void): grpcWeb.ClientReadableStream<grpc_pb.AccountExistsReply>;
accountExists(
request: grpc_pb.AccountExistsRequest,
metadata: grpcWeb.Metadata | null,
callback?: (err: grpcWeb.RpcError,
response: grpc_pb.AccountExistsReply) => void) {
if (callback !== undefined) {
return this.client_.rpcCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/AccountExists',
request,
metadata || {},
this.methodInfoAccountExists,
callback);
}
return this.client_.unaryCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/AccountExists',
request,
metadata || {},
this.methodInfoAccountExists);
}
methodInfoIsAccountOpen = new grpcWeb.MethodDescriptor(
'/io.bisq.protobuffer.Account/IsAccountOpen',
grpcWeb.MethodType.UNARY,
grpc_pb.IsAccountOpenRequest,
grpc_pb.IsAccountOpenReply,
(request: grpc_pb.IsAccountOpenRequest) => {
return request.serializeBinary();
},
grpc_pb.IsAccountOpenReply.deserializeBinary
);
isAccountOpen(
request: grpc_pb.IsAccountOpenRequest,
metadata: grpcWeb.Metadata | null): Promise<grpc_pb.IsAccountOpenReply>;
isAccountOpen(
request: grpc_pb.IsAccountOpenRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.RpcError,
response: grpc_pb.IsAccountOpenReply) => void): grpcWeb.ClientReadableStream<grpc_pb.IsAccountOpenReply>;
isAccountOpen(
request: grpc_pb.IsAccountOpenRequest,
metadata: grpcWeb.Metadata | null,
callback?: (err: grpcWeb.RpcError,
response: grpc_pb.IsAccountOpenReply) => void) {
if (callback !== undefined) {
return this.client_.rpcCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/IsAccountOpen',
request,
metadata || {},
this.methodInfoIsAccountOpen,
callback);
}
return this.client_.unaryCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/IsAccountOpen',
request,
metadata || {},
this.methodInfoIsAccountOpen);
}
methodInfoCreateAccount = new grpcWeb.MethodDescriptor(
'/io.bisq.protobuffer.Account/CreateAccount',
grpcWeb.MethodType.UNARY,
grpc_pb.CreateAccountRequest,
grpc_pb.CreateAccountReply,
(request: grpc_pb.CreateAccountRequest) => {
return request.serializeBinary();
},
grpc_pb.CreateAccountReply.deserializeBinary
);
createAccount(
request: grpc_pb.CreateAccountRequest,
metadata: grpcWeb.Metadata | null): Promise<grpc_pb.CreateAccountReply>;
createAccount(
request: grpc_pb.CreateAccountRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.RpcError,
response: grpc_pb.CreateAccountReply) => void): grpcWeb.ClientReadableStream<grpc_pb.CreateAccountReply>;
createAccount(
request: grpc_pb.CreateAccountRequest,
metadata: grpcWeb.Metadata | null,
callback?: (err: grpcWeb.RpcError,
response: grpc_pb.CreateAccountReply) => void) {
if (callback !== undefined) {
return this.client_.rpcCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/CreateAccount',
request,
metadata || {},
this.methodInfoCreateAccount,
callback);
}
return this.client_.unaryCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/CreateAccount',
request,
metadata || {},
this.methodInfoCreateAccount);
}
methodInfoOpenAccount = new grpcWeb.MethodDescriptor(
'/io.bisq.protobuffer.Account/OpenAccount',
grpcWeb.MethodType.UNARY,
grpc_pb.OpenAccountRequest,
grpc_pb.OpenAccountReply,
(request: grpc_pb.OpenAccountRequest) => {
return request.serializeBinary();
},
grpc_pb.OpenAccountReply.deserializeBinary
);
openAccount(
request: grpc_pb.OpenAccountRequest,
metadata: grpcWeb.Metadata | null): Promise<grpc_pb.OpenAccountReply>;
openAccount(
request: grpc_pb.OpenAccountRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.RpcError,
response: grpc_pb.OpenAccountReply) => void): grpcWeb.ClientReadableStream<grpc_pb.OpenAccountReply>;
openAccount(
request: grpc_pb.OpenAccountRequest,
metadata: grpcWeb.Metadata | null,
callback?: (err: grpcWeb.RpcError,
response: grpc_pb.OpenAccountReply) => void) {
if (callback !== undefined) {
return this.client_.rpcCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/OpenAccount',
request,
metadata || {},
this.methodInfoOpenAccount,
callback);
}
return this.client_.unaryCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/OpenAccount',
request,
metadata || {},
this.methodInfoOpenAccount);
}
methodInfoCloseAccount = new grpcWeb.MethodDescriptor(
'/io.bisq.protobuffer.Account/CloseAccount',
grpcWeb.MethodType.UNARY,
grpc_pb.CloseAccountRequest,
grpc_pb.CloseAccountReply,
(request: grpc_pb.CloseAccountRequest) => {
return request.serializeBinary();
},
grpc_pb.CloseAccountReply.deserializeBinary
);
closeAccount(
request: grpc_pb.CloseAccountRequest,
metadata: grpcWeb.Metadata | null): Promise<grpc_pb.CloseAccountReply>;
closeAccount(
request: grpc_pb.CloseAccountRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.RpcError,
response: grpc_pb.CloseAccountReply) => void): grpcWeb.ClientReadableStream<grpc_pb.CloseAccountReply>;
closeAccount(
request: grpc_pb.CloseAccountRequest,
metadata: grpcWeb.Metadata | null,
callback?: (err: grpcWeb.RpcError,
response: grpc_pb.CloseAccountReply) => void) {
if (callback !== undefined) {
return this.client_.rpcCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/CloseAccount',
request,
metadata || {},
this.methodInfoCloseAccount,
callback);
}
return this.client_.unaryCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/CloseAccount',
request,
metadata || {},
this.methodInfoCloseAccount);
}
methodInfoBackupAccount = new grpcWeb.MethodDescriptor(
'/io.bisq.protobuffer.Account/BackupAccount',
grpcWeb.MethodType.UNARY,
grpc_pb.BackupAccountRequest,
grpc_pb.BackupAccountReply,
(request: grpc_pb.BackupAccountRequest) => {
return request.serializeBinary();
},
grpc_pb.BackupAccountReply.deserializeBinary
);
backupAccount(
request: grpc_pb.BackupAccountRequest,
metadata: grpcWeb.Metadata | null): Promise<grpc_pb.BackupAccountReply>;
backupAccount(
request: grpc_pb.BackupAccountRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.RpcError,
response: grpc_pb.BackupAccountReply) => void): grpcWeb.ClientReadableStream<grpc_pb.BackupAccountReply>;
backupAccount(
request: grpc_pb.BackupAccountRequest,
metadata: grpcWeb.Metadata | null,
callback?: (err: grpcWeb.RpcError,
response: grpc_pb.BackupAccountReply) => void) {
if (callback !== undefined) {
return this.client_.rpcCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/BackupAccount',
request,
metadata || {},
this.methodInfoBackupAccount,
callback);
}
return this.client_.unaryCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/BackupAccount',
request,
metadata || {},
this.methodInfoBackupAccount);
}
methodInfoDeleteAccount = new grpcWeb.MethodDescriptor(
'/io.bisq.protobuffer.Account/DeleteAccount',
grpcWeb.MethodType.UNARY,
grpc_pb.DeleteAccountRequest,
grpc_pb.DeleteAccountReply,
(request: grpc_pb.DeleteAccountRequest) => {
return request.serializeBinary();
},
grpc_pb.DeleteAccountReply.deserializeBinary
);
deleteAccount(
request: grpc_pb.DeleteAccountRequest,
metadata: grpcWeb.Metadata | null): Promise<grpc_pb.DeleteAccountReply>;
deleteAccount(
request: grpc_pb.DeleteAccountRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.RpcError,
response: grpc_pb.DeleteAccountReply) => void): grpcWeb.ClientReadableStream<grpc_pb.DeleteAccountReply>;
deleteAccount(
request: grpc_pb.DeleteAccountRequest,
metadata: grpcWeb.Metadata | null,
callback?: (err: grpcWeb.RpcError,
response: grpc_pb.DeleteAccountReply) => void) {
if (callback !== undefined) {
return this.client_.rpcCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/DeleteAccount',
request,
metadata || {},
this.methodInfoDeleteAccount,
callback);
}
return this.client_.unaryCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/DeleteAccount',
request,
metadata || {},
this.methodInfoDeleteAccount);
}
methodInfoChangePassword = new grpcWeb.MethodDescriptor(
'/io.bisq.protobuffer.Account/ChangePassword',
grpcWeb.MethodType.UNARY,
grpc_pb.ChangePasswordRequest,
grpc_pb.ChangePasswordReply,
(request: grpc_pb.ChangePasswordRequest) => {
return request.serializeBinary();
},
grpc_pb.ChangePasswordReply.deserializeBinary
);
changePassword(
request: grpc_pb.ChangePasswordRequest,
metadata: grpcWeb.Metadata | null): Promise<grpc_pb.ChangePasswordReply>;
changePassword(
request: grpc_pb.ChangePasswordRequest,
metadata: grpcWeb.Metadata | null,
callback: (err: grpcWeb.RpcError,
response: grpc_pb.ChangePasswordReply) => void): grpcWeb.ClientReadableStream<grpc_pb.ChangePasswordReply>;
changePassword(
request: grpc_pb.ChangePasswordRequest,
metadata: grpcWeb.Metadata | null,
callback?: (err: grpcWeb.RpcError,
response: grpc_pb.ChangePasswordReply) => void) {
if (callback !== undefined) {
return this.client_.rpcCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/ChangePassword',
request,
metadata || {},
this.methodInfoChangePassword,
callback);
}
return this.client_.unaryCall(
this.hostname_ +
'/io.bisq.protobuffer.Account/ChangePassword',
request,
metadata || {},
this.methodInfoChangePassword);
}
}
export class HelpClient {
client_: grpcWeb.AbstractClientBase;
hostname_: string;

View File

@ -39,6 +39,250 @@ export namespace RegisterDisputeAgentReply {
}
}
export class AccountExistsRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AccountExistsRequest.AsObject;
static toObject(includeInstance: boolean, msg: AccountExistsRequest): AccountExistsRequest.AsObject;
static serializeBinaryToWriter(message: AccountExistsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AccountExistsRequest;
static deserializeBinaryFromReader(message: AccountExistsRequest, reader: jspb.BinaryReader): AccountExistsRequest;
}
export namespace AccountExistsRequest {
export type AsObject = {
}
}
export class AccountExistsReply extends jspb.Message {
getAccountExists(): boolean;
setAccountExists(value: boolean): AccountExistsReply;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AccountExistsReply.AsObject;
static toObject(includeInstance: boolean, msg: AccountExistsReply): AccountExistsReply.AsObject;
static serializeBinaryToWriter(message: AccountExistsReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AccountExistsReply;
static deserializeBinaryFromReader(message: AccountExistsReply, reader: jspb.BinaryReader): AccountExistsReply;
}
export namespace AccountExistsReply {
export type AsObject = {
accountExists: boolean,
}
}
export class IsAccountOpenRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): IsAccountOpenRequest.AsObject;
static toObject(includeInstance: boolean, msg: IsAccountOpenRequest): IsAccountOpenRequest.AsObject;
static serializeBinaryToWriter(message: IsAccountOpenRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): IsAccountOpenRequest;
static deserializeBinaryFromReader(message: IsAccountOpenRequest, reader: jspb.BinaryReader): IsAccountOpenRequest;
}
export namespace IsAccountOpenRequest {
export type AsObject = {
}
}
export class IsAccountOpenReply extends jspb.Message {
getIsAccountOpen(): boolean;
setIsAccountOpen(value: boolean): IsAccountOpenReply;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): IsAccountOpenReply.AsObject;
static toObject(includeInstance: boolean, msg: IsAccountOpenReply): IsAccountOpenReply.AsObject;
static serializeBinaryToWriter(message: IsAccountOpenReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): IsAccountOpenReply;
static deserializeBinaryFromReader(message: IsAccountOpenReply, reader: jspb.BinaryReader): IsAccountOpenReply;
}
export namespace IsAccountOpenReply {
export type AsObject = {
isAccountOpen: boolean,
}
}
export class CreateAccountRequest extends jspb.Message {
getPassword(): string;
setPassword(value: string): CreateAccountRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateAccountRequest.AsObject;
static toObject(includeInstance: boolean, msg: CreateAccountRequest): CreateAccountRequest.AsObject;
static serializeBinaryToWriter(message: CreateAccountRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CreateAccountRequest;
static deserializeBinaryFromReader(message: CreateAccountRequest, reader: jspb.BinaryReader): CreateAccountRequest;
}
export namespace CreateAccountRequest {
export type AsObject = {
password: string,
}
}
export class CreateAccountReply extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateAccountReply.AsObject;
static toObject(includeInstance: boolean, msg: CreateAccountReply): CreateAccountReply.AsObject;
static serializeBinaryToWriter(message: CreateAccountReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CreateAccountReply;
static deserializeBinaryFromReader(message: CreateAccountReply, reader: jspb.BinaryReader): CreateAccountReply;
}
export namespace CreateAccountReply {
export type AsObject = {
}
}
export class OpenAccountRequest extends jspb.Message {
getPassword(): string;
setPassword(value: string): OpenAccountRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): OpenAccountRequest.AsObject;
static toObject(includeInstance: boolean, msg: OpenAccountRequest): OpenAccountRequest.AsObject;
static serializeBinaryToWriter(message: OpenAccountRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): OpenAccountRequest;
static deserializeBinaryFromReader(message: OpenAccountRequest, reader: jspb.BinaryReader): OpenAccountRequest;
}
export namespace OpenAccountRequest {
export type AsObject = {
password: string,
}
}
export class OpenAccountReply extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): OpenAccountReply.AsObject;
static toObject(includeInstance: boolean, msg: OpenAccountReply): OpenAccountReply.AsObject;
static serializeBinaryToWriter(message: OpenAccountReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): OpenAccountReply;
static deserializeBinaryFromReader(message: OpenAccountReply, reader: jspb.BinaryReader): OpenAccountReply;
}
export namespace OpenAccountReply {
export type AsObject = {
}
}
export class CloseAccountRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CloseAccountRequest.AsObject;
static toObject(includeInstance: boolean, msg: CloseAccountRequest): CloseAccountRequest.AsObject;
static serializeBinaryToWriter(message: CloseAccountRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CloseAccountRequest;
static deserializeBinaryFromReader(message: CloseAccountRequest, reader: jspb.BinaryReader): CloseAccountRequest;
}
export namespace CloseAccountRequest {
export type AsObject = {
}
}
export class CloseAccountReply extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CloseAccountReply.AsObject;
static toObject(includeInstance: boolean, msg: CloseAccountReply): CloseAccountReply.AsObject;
static serializeBinaryToWriter(message: CloseAccountReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CloseAccountReply;
static deserializeBinaryFromReader(message: CloseAccountReply, reader: jspb.BinaryReader): CloseAccountReply;
}
export namespace CloseAccountReply {
export type AsObject = {
}
}
export class BackupAccountRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BackupAccountRequest.AsObject;
static toObject(includeInstance: boolean, msg: BackupAccountRequest): BackupAccountRequest.AsObject;
static serializeBinaryToWriter(message: BackupAccountRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BackupAccountRequest;
static deserializeBinaryFromReader(message: BackupAccountRequest, reader: jspb.BinaryReader): BackupAccountRequest;
}
export namespace BackupAccountRequest {
export type AsObject = {
}
}
export class BackupAccountReply extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): BackupAccountReply.AsObject;
static toObject(includeInstance: boolean, msg: BackupAccountReply): BackupAccountReply.AsObject;
static serializeBinaryToWriter(message: BackupAccountReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): BackupAccountReply;
static deserializeBinaryFromReader(message: BackupAccountReply, reader: jspb.BinaryReader): BackupAccountReply;
}
export namespace BackupAccountReply {
export type AsObject = {
}
}
export class DeleteAccountRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeleteAccountRequest.AsObject;
static toObject(includeInstance: boolean, msg: DeleteAccountRequest): DeleteAccountRequest.AsObject;
static serializeBinaryToWriter(message: DeleteAccountRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DeleteAccountRequest;
static deserializeBinaryFromReader(message: DeleteAccountRequest, reader: jspb.BinaryReader): DeleteAccountRequest;
}
export namespace DeleteAccountRequest {
export type AsObject = {
}
}
export class DeleteAccountReply extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeleteAccountReply.AsObject;
static toObject(includeInstance: boolean, msg: DeleteAccountReply): DeleteAccountReply.AsObject;
static serializeBinaryToWriter(message: DeleteAccountReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DeleteAccountReply;
static deserializeBinaryFromReader(message: DeleteAccountReply, reader: jspb.BinaryReader): DeleteAccountReply;
}
export namespace DeleteAccountReply {
export type AsObject = {
}
}
export class ChangePasswordRequest extends jspb.Message {
getPassword(): string;
setPassword(value: string): ChangePasswordRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ChangePasswordRequest.AsObject;
static toObject(includeInstance: boolean, msg: ChangePasswordRequest): ChangePasswordRequest.AsObject;
static serializeBinaryToWriter(message: ChangePasswordRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ChangePasswordRequest;
static deserializeBinaryFromReader(message: ChangePasswordRequest, reader: jspb.BinaryReader): ChangePasswordRequest;
}
export namespace ChangePasswordRequest {
export type AsObject = {
password: string,
}
}
export class ChangePasswordReply extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ChangePasswordReply.AsObject;
static toObject(includeInstance: boolean, msg: ChangePasswordReply): ChangePasswordReply.AsObject;
static serializeBinaryToWriter(message: ChangePasswordReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ChangePasswordReply;
static deserializeBinaryFromReader(message: ChangePasswordReply, reader: jspb.BinaryReader): ChangePasswordReply;
}
export namespace ChangePasswordReply {
export type AsObject = {
}
}
export class GetMethodHelpRequest extends jspb.Message {
getMethodName(): string;
setMethodName(value: string): GetMethodHelpRequest;

File diff suppressed because it is too large Load Diff

View File

@ -4097,6 +4097,11 @@ export class DisputeResult extends jspb.Message {
hasChatMessage(): boolean;
clearChatMessage(): DisputeResult;
getArbitratorSignature(): Uint8Array | string;
getArbitratorSignature_asU8(): Uint8Array;
getArbitratorSignature_asB64(): string;
setArbitratorSignature(value: Uint8Array | string): DisputeResult;
getBuyerPayoutAmount(): number;
setBuyerPayoutAmount(value: number): DisputeResult;
@ -4139,6 +4144,7 @@ export namespace DisputeResult {
screenCast: boolean,
summaryNotes: string,
chatMessage?: ChatMessage.AsObject,
arbitratorSignature: Uint8Array | string,
buyerPayoutAmount: number,
sellerPayoutAmount: number,
arbitratorPubKey: Uint8Array | string,

View File

@ -35281,6 +35281,7 @@ proto.io.bisq.protobuffer.DisputeResult.toObject = function(includeInstance, msg
screenCast: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
summaryNotes: jspb.Message.getFieldWithDefault(msg, 8, ""),
chatMessage: (f = msg.getChatMessage()) && proto.io.bisq.protobuffer.ChatMessage.toObject(includeInstance, f),
arbitratorSignature: msg.getArbitratorSignature_asB64(),
buyerPayoutAmount: jspb.Message.getFieldWithDefault(msg, 11, 0),
sellerPayoutAmount: jspb.Message.getFieldWithDefault(msg, 12, 0),
arbitratorPubKey: msg.getArbitratorPubKey_asB64(),
@ -35361,6 +35362,10 @@ proto.io.bisq.protobuffer.DisputeResult.deserializeBinaryFromReader = function(m
reader.readMessage(value,proto.io.bisq.protobuffer.ChatMessage.deserializeBinaryFromReader);
msg.setChatMessage(value);
break;
case 10:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setArbitratorSignature(value);
break;
case 11:
var value = /** @type {number} */ (reader.readInt64());
msg.setBuyerPayoutAmount(value);
@ -35482,6 +35487,13 @@ proto.io.bisq.protobuffer.DisputeResult.serializeBinaryToWriter = function(messa
proto.io.bisq.protobuffer.ChatMessage.serializeBinaryToWriter
);
}
f = message.getArbitratorSignature_asU8();
if (f.length > 0) {
writer.writeBytes(
10,
f
);
}
f = message.getBuyerPayoutAmount();
if (f !== 0) {
writer.writeInt64(
@ -35743,6 +35755,48 @@ proto.io.bisq.protobuffer.DisputeResult.prototype.hasChatMessage = function() {
};
/**
* optional bytes arbitrator_signature = 10;
* @return {!(string|Uint8Array)}
*/
proto.io.bisq.protobuffer.DisputeResult.prototype.getArbitratorSignature = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};
/**
* optional bytes arbitrator_signature = 10;
* This is a type-conversion wrapper around `getArbitratorSignature()`
* @return {string}
*/
proto.io.bisq.protobuffer.DisputeResult.prototype.getArbitratorSignature_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getArbitratorSignature()));
};
/**
* optional bytes arbitrator_signature = 10;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getArbitratorSignature()`
* @return {!Uint8Array}
*/
proto.io.bisq.protobuffer.DisputeResult.prototype.getArbitratorSignature_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getArbitratorSignature()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.io.bisq.protobuffer.DisputeResult} returns this
*/
proto.io.bisq.protobuffer.DisputeResult.prototype.setArbitratorSignature = function(value) {
return jspb.Message.setProto3BytesField(this, 10, value);
};
/**
* optional int64 buyer_payout_amount = 11;
* @return {number}