@trustwallet/wallet-core 3.1.32 → 3.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2285,6 +2285,253 @@ export namespace TW {
|
|
2285
2285
|
}
|
2286
2286
|
}
|
2287
2287
|
|
2288
|
+
/** Namespace Barz. */
|
2289
|
+
namespace Barz {
|
2290
|
+
|
2291
|
+
/** Namespace Proto. */
|
2292
|
+
namespace Proto {
|
2293
|
+
|
2294
|
+
/** Properties of a ContractOwner. */
|
2295
|
+
interface IContractOwner {
|
2296
|
+
|
2297
|
+
/** ContractOwner publicKey */
|
2298
|
+
publicKey?: (string|null);
|
2299
|
+
|
2300
|
+
/** ContractOwner attestationObject */
|
2301
|
+
attestationObject?: (string|null);
|
2302
|
+
}
|
2303
|
+
|
2304
|
+
/** Represents a ContractOwner. */
|
2305
|
+
class ContractOwner implements IContractOwner {
|
2306
|
+
|
2307
|
+
/**
|
2308
|
+
* Constructs a new ContractOwner.
|
2309
|
+
* @param [properties] Properties to set
|
2310
|
+
*/
|
2311
|
+
constructor(properties?: TW.Barz.Proto.IContractOwner);
|
2312
|
+
|
2313
|
+
/** ContractOwner publicKey. */
|
2314
|
+
public publicKey?: (string|null);
|
2315
|
+
|
2316
|
+
/** ContractOwner attestationObject. */
|
2317
|
+
public attestationObject?: (string|null);
|
2318
|
+
|
2319
|
+
/** ContractOwner kind. */
|
2320
|
+
public kind?: ("publicKey"|"attestationObject");
|
2321
|
+
|
2322
|
+
/**
|
2323
|
+
* Creates a new ContractOwner instance using the specified properties.
|
2324
|
+
* @param [properties] Properties to set
|
2325
|
+
* @returns ContractOwner instance
|
2326
|
+
*/
|
2327
|
+
public static create(properties?: TW.Barz.Proto.IContractOwner): TW.Barz.Proto.ContractOwner;
|
2328
|
+
|
2329
|
+
/**
|
2330
|
+
* Encodes the specified ContractOwner message. Does not implicitly {@link TW.Barz.Proto.ContractOwner.verify|verify} messages.
|
2331
|
+
* @param message ContractOwner message or plain object to encode
|
2332
|
+
* @param [writer] Writer to encode to
|
2333
|
+
* @returns Writer
|
2334
|
+
*/
|
2335
|
+
public static encode(message: TW.Barz.Proto.IContractOwner, writer?: $protobuf.Writer): $protobuf.Writer;
|
2336
|
+
|
2337
|
+
/**
|
2338
|
+
* Decodes a ContractOwner message from the specified reader or buffer.
|
2339
|
+
* @param reader Reader or buffer to decode from
|
2340
|
+
* @param [length] Message length if known beforehand
|
2341
|
+
* @returns ContractOwner
|
2342
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
2343
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2344
|
+
*/
|
2345
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Barz.Proto.ContractOwner;
|
2346
|
+
|
2347
|
+
/**
|
2348
|
+
* Verifies a ContractOwner message.
|
2349
|
+
* @param message Plain object to verify
|
2350
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
2351
|
+
*/
|
2352
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
2353
|
+
|
2354
|
+
/**
|
2355
|
+
* Creates a ContractOwner message from a plain object. Also converts values to their respective internal types.
|
2356
|
+
* @param object Plain object
|
2357
|
+
* @returns ContractOwner
|
2358
|
+
*/
|
2359
|
+
public static fromObject(object: { [k: string]: any }): TW.Barz.Proto.ContractOwner;
|
2360
|
+
|
2361
|
+
/**
|
2362
|
+
* Creates a plain object from a ContractOwner message. Also converts values to other types if specified.
|
2363
|
+
* @param message ContractOwner
|
2364
|
+
* @param [options] Conversion options
|
2365
|
+
* @returns Plain object
|
2366
|
+
*/
|
2367
|
+
public static toObject(message: TW.Barz.Proto.ContractOwner, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
2368
|
+
|
2369
|
+
/**
|
2370
|
+
* Converts this ContractOwner to JSON.
|
2371
|
+
* @returns JSON object
|
2372
|
+
*/
|
2373
|
+
public toJSON(): { [k: string]: any };
|
2374
|
+
}
|
2375
|
+
|
2376
|
+
/** Properties of a ContractAddressInput. */
|
2377
|
+
interface IContractAddressInput {
|
2378
|
+
|
2379
|
+
/** ContractAddressInput factory */
|
2380
|
+
factory?: (string|null);
|
2381
|
+
|
2382
|
+
/** ContractAddressInput diamondCutFacet */
|
2383
|
+
diamondCutFacet?: (string|null);
|
2384
|
+
|
2385
|
+
/** ContractAddressInput accountFacet */
|
2386
|
+
accountFacet?: (string|null);
|
2387
|
+
|
2388
|
+
/** ContractAddressInput verificationFacet */
|
2389
|
+
verificationFacet?: (string|null);
|
2390
|
+
|
2391
|
+
/** ContractAddressInput entryPoint */
|
2392
|
+
entryPoint?: (string|null);
|
2393
|
+
|
2394
|
+
/** ContractAddressInput securityManager */
|
2395
|
+
securityManager?: (string|null);
|
2396
|
+
|
2397
|
+
/** ContractAddressInput facetRegistry */
|
2398
|
+
facetRegistry?: (string|null);
|
2399
|
+
|
2400
|
+
/** ContractAddressInput bytecode */
|
2401
|
+
bytecode?: (string|null);
|
2402
|
+
|
2403
|
+
/** ContractAddressInput owner */
|
2404
|
+
owner?: (TW.Barz.Proto.IContractOwner|null);
|
2405
|
+
}
|
2406
|
+
|
2407
|
+
/** Represents a ContractAddressInput. */
|
2408
|
+
class ContractAddressInput implements IContractAddressInput {
|
2409
|
+
|
2410
|
+
/**
|
2411
|
+
* Constructs a new ContractAddressInput.
|
2412
|
+
* @param [properties] Properties to set
|
2413
|
+
*/
|
2414
|
+
constructor(properties?: TW.Barz.Proto.IContractAddressInput);
|
2415
|
+
|
2416
|
+
/** ContractAddressInput factory. */
|
2417
|
+
public factory: string;
|
2418
|
+
|
2419
|
+
/** ContractAddressInput diamondCutFacet. */
|
2420
|
+
public diamondCutFacet: string;
|
2421
|
+
|
2422
|
+
/** ContractAddressInput accountFacet. */
|
2423
|
+
public accountFacet: string;
|
2424
|
+
|
2425
|
+
/** ContractAddressInput verificationFacet. */
|
2426
|
+
public verificationFacet: string;
|
2427
|
+
|
2428
|
+
/** ContractAddressInput entryPoint. */
|
2429
|
+
public entryPoint: string;
|
2430
|
+
|
2431
|
+
/** ContractAddressInput securityManager. */
|
2432
|
+
public securityManager: string;
|
2433
|
+
|
2434
|
+
/** ContractAddressInput facetRegistry. */
|
2435
|
+
public facetRegistry: string;
|
2436
|
+
|
2437
|
+
/** ContractAddressInput bytecode. */
|
2438
|
+
public bytecode: string;
|
2439
|
+
|
2440
|
+
/** ContractAddressInput owner. */
|
2441
|
+
public owner?: (TW.Barz.Proto.IContractOwner|null);
|
2442
|
+
|
2443
|
+
/**
|
2444
|
+
* Creates a new ContractAddressInput instance using the specified properties.
|
2445
|
+
* @param [properties] Properties to set
|
2446
|
+
* @returns ContractAddressInput instance
|
2447
|
+
*/
|
2448
|
+
public static create(properties?: TW.Barz.Proto.IContractAddressInput): TW.Barz.Proto.ContractAddressInput;
|
2449
|
+
|
2450
|
+
/**
|
2451
|
+
* Encodes the specified ContractAddressInput message. Does not implicitly {@link TW.Barz.Proto.ContractAddressInput.verify|verify} messages.
|
2452
|
+
* @param message ContractAddressInput message or plain object to encode
|
2453
|
+
* @param [writer] Writer to encode to
|
2454
|
+
* @returns Writer
|
2455
|
+
*/
|
2456
|
+
public static encode(message: TW.Barz.Proto.IContractAddressInput, writer?: $protobuf.Writer): $protobuf.Writer;
|
2457
|
+
|
2458
|
+
/**
|
2459
|
+
* Decodes a ContractAddressInput message from the specified reader or buffer.
|
2460
|
+
* @param reader Reader or buffer to decode from
|
2461
|
+
* @param [length] Message length if known beforehand
|
2462
|
+
* @returns ContractAddressInput
|
2463
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
2464
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2465
|
+
*/
|
2466
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Barz.Proto.ContractAddressInput;
|
2467
|
+
|
2468
|
+
/**
|
2469
|
+
* Verifies a ContractAddressInput message.
|
2470
|
+
* @param message Plain object to verify
|
2471
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
2472
|
+
*/
|
2473
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
2474
|
+
|
2475
|
+
/**
|
2476
|
+
* Creates a ContractAddressInput message from a plain object. Also converts values to their respective internal types.
|
2477
|
+
* @param object Plain object
|
2478
|
+
* @returns ContractAddressInput
|
2479
|
+
*/
|
2480
|
+
public static fromObject(object: { [k: string]: any }): TW.Barz.Proto.ContractAddressInput;
|
2481
|
+
|
2482
|
+
/**
|
2483
|
+
* Creates a plain object from a ContractAddressInput message. Also converts values to other types if specified.
|
2484
|
+
* @param message ContractAddressInput
|
2485
|
+
* @param [options] Conversion options
|
2486
|
+
* @returns Plain object
|
2487
|
+
*/
|
2488
|
+
public static toObject(message: TW.Barz.Proto.ContractAddressInput, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
2489
|
+
|
2490
|
+
/**
|
2491
|
+
* Converts this ContractAddressInput to JSON.
|
2492
|
+
* @returns JSON object
|
2493
|
+
*/
|
2494
|
+
public toJSON(): { [k: string]: any };
|
2495
|
+
}
|
2496
|
+
}
|
2497
|
+
}
|
2498
|
+
|
2499
|
+
/** Namespace Common. */
|
2500
|
+
namespace Common {
|
2501
|
+
|
2502
|
+
/** Namespace Proto. */
|
2503
|
+
namespace Proto {
|
2504
|
+
|
2505
|
+
/** SigningError enum. */
|
2506
|
+
enum SigningError {
|
2507
|
+
OK = 0,
|
2508
|
+
Error_general = 1,
|
2509
|
+
Error_internal = 2,
|
2510
|
+
Error_low_balance = 3,
|
2511
|
+
Error_zero_amount_requested = 4,
|
2512
|
+
Error_missing_private_key = 5,
|
2513
|
+
Error_invalid_private_key = 15,
|
2514
|
+
Error_invalid_address = 16,
|
2515
|
+
Error_invalid_utxo = 17,
|
2516
|
+
Error_invalid_utxo_amount = 18,
|
2517
|
+
Error_wrong_fee = 6,
|
2518
|
+
Error_signing = 7,
|
2519
|
+
Error_tx_too_big = 8,
|
2520
|
+
Error_missing_input_utxos = 9,
|
2521
|
+
Error_not_enough_utxos = 10,
|
2522
|
+
Error_script_redeem = 11,
|
2523
|
+
Error_script_output = 12,
|
2524
|
+
Error_script_witness_program = 13,
|
2525
|
+
Error_invalid_memo = 14,
|
2526
|
+
Error_input_parse = 19,
|
2527
|
+
Error_no_support_n2n = 20,
|
2528
|
+
Error_signatures_count = 21,
|
2529
|
+
Error_invalid_params = 22,
|
2530
|
+
Error_invalid_requested_token_amount = 23
|
2531
|
+
}
|
2532
|
+
}
|
2533
|
+
}
|
2534
|
+
|
2288
2535
|
/** Namespace Binance. */
|
2289
2536
|
namespace Binance {
|
2290
2537
|
|
@@ -4755,42 +5002,6 @@ export namespace TW {
|
|
4755
5002
|
}
|
4756
5003
|
}
|
4757
5004
|
|
4758
|
-
/** Namespace Common. */
|
4759
|
-
namespace Common {
|
4760
|
-
|
4761
|
-
/** Namespace Proto. */
|
4762
|
-
namespace Proto {
|
4763
|
-
|
4764
|
-
/** SigningError enum. */
|
4765
|
-
enum SigningError {
|
4766
|
-
OK = 0,
|
4767
|
-
Error_general = 1,
|
4768
|
-
Error_internal = 2,
|
4769
|
-
Error_low_balance = 3,
|
4770
|
-
Error_zero_amount_requested = 4,
|
4771
|
-
Error_missing_private_key = 5,
|
4772
|
-
Error_invalid_private_key = 15,
|
4773
|
-
Error_invalid_address = 16,
|
4774
|
-
Error_invalid_utxo = 17,
|
4775
|
-
Error_invalid_utxo_amount = 18,
|
4776
|
-
Error_wrong_fee = 6,
|
4777
|
-
Error_signing = 7,
|
4778
|
-
Error_tx_too_big = 8,
|
4779
|
-
Error_missing_input_utxos = 9,
|
4780
|
-
Error_not_enough_utxos = 10,
|
4781
|
-
Error_script_redeem = 11,
|
4782
|
-
Error_script_output = 12,
|
4783
|
-
Error_script_witness_program = 13,
|
4784
|
-
Error_invalid_memo = 14,
|
4785
|
-
Error_input_parse = 19,
|
4786
|
-
Error_no_support_n2n = 20,
|
4787
|
-
Error_signatures_count = 21,
|
4788
|
-
Error_invalid_params = 22,
|
4789
|
-
Error_invalid_requested_token_amount = 23
|
4790
|
-
}
|
4791
|
-
}
|
4792
|
-
}
|
4793
|
-
|
4794
5005
|
/** Namespace Bitcoin. */
|
4795
5006
|
namespace Bitcoin {
|
4796
5007
|
|
@@ -6354,6 +6354,656 @@
|
|
6354
6354
|
return Aptos;
|
6355
6355
|
})();
|
6356
6356
|
|
6357
|
+
TW.Barz = (function() {
|
6358
|
+
|
6359
|
+
/**
|
6360
|
+
* Namespace Barz.
|
6361
|
+
* @memberof TW
|
6362
|
+
* @namespace
|
6363
|
+
*/
|
6364
|
+
var Barz = {};
|
6365
|
+
|
6366
|
+
Barz.Proto = (function() {
|
6367
|
+
|
6368
|
+
/**
|
6369
|
+
* Namespace Proto.
|
6370
|
+
* @memberof TW.Barz
|
6371
|
+
* @namespace
|
6372
|
+
*/
|
6373
|
+
var Proto = {};
|
6374
|
+
|
6375
|
+
Proto.ContractOwner = (function() {
|
6376
|
+
|
6377
|
+
/**
|
6378
|
+
* Properties of a ContractOwner.
|
6379
|
+
* @memberof TW.Barz.Proto
|
6380
|
+
* @interface IContractOwner
|
6381
|
+
* @property {string|null} [publicKey] ContractOwner publicKey
|
6382
|
+
* @property {string|null} [attestationObject] ContractOwner attestationObject
|
6383
|
+
*/
|
6384
|
+
|
6385
|
+
/**
|
6386
|
+
* Constructs a new ContractOwner.
|
6387
|
+
* @memberof TW.Barz.Proto
|
6388
|
+
* @classdesc Represents a ContractOwner.
|
6389
|
+
* @implements IContractOwner
|
6390
|
+
* @constructor
|
6391
|
+
* @param {TW.Barz.Proto.IContractOwner=} [properties] Properties to set
|
6392
|
+
*/
|
6393
|
+
function ContractOwner(properties) {
|
6394
|
+
if (properties)
|
6395
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6396
|
+
if (properties[keys[i]] != null)
|
6397
|
+
this[keys[i]] = properties[keys[i]];
|
6398
|
+
}
|
6399
|
+
|
6400
|
+
/**
|
6401
|
+
* ContractOwner publicKey.
|
6402
|
+
* @member {string|null|undefined} publicKey
|
6403
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6404
|
+
* @instance
|
6405
|
+
*/
|
6406
|
+
ContractOwner.prototype.publicKey = null;
|
6407
|
+
|
6408
|
+
/**
|
6409
|
+
* ContractOwner attestationObject.
|
6410
|
+
* @member {string|null|undefined} attestationObject
|
6411
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6412
|
+
* @instance
|
6413
|
+
*/
|
6414
|
+
ContractOwner.prototype.attestationObject = null;
|
6415
|
+
|
6416
|
+
// OneOf field names bound to virtual getters and setters
|
6417
|
+
var $oneOfFields;
|
6418
|
+
|
6419
|
+
/**
|
6420
|
+
* ContractOwner kind.
|
6421
|
+
* @member {"publicKey"|"attestationObject"|undefined} kind
|
6422
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6423
|
+
* @instance
|
6424
|
+
*/
|
6425
|
+
Object.defineProperty(ContractOwner.prototype, "kind", {
|
6426
|
+
get: $util.oneOfGetter($oneOfFields = ["publicKey", "attestationObject"]),
|
6427
|
+
set: $util.oneOfSetter($oneOfFields)
|
6428
|
+
});
|
6429
|
+
|
6430
|
+
/**
|
6431
|
+
* Creates a new ContractOwner instance using the specified properties.
|
6432
|
+
* @function create
|
6433
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6434
|
+
* @static
|
6435
|
+
* @param {TW.Barz.Proto.IContractOwner=} [properties] Properties to set
|
6436
|
+
* @returns {TW.Barz.Proto.ContractOwner} ContractOwner instance
|
6437
|
+
*/
|
6438
|
+
ContractOwner.create = function create(properties) {
|
6439
|
+
return new ContractOwner(properties);
|
6440
|
+
};
|
6441
|
+
|
6442
|
+
/**
|
6443
|
+
* Encodes the specified ContractOwner message. Does not implicitly {@link TW.Barz.Proto.ContractOwner.verify|verify} messages.
|
6444
|
+
* @function encode
|
6445
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6446
|
+
* @static
|
6447
|
+
* @param {TW.Barz.Proto.IContractOwner} message ContractOwner message or plain object to encode
|
6448
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
6449
|
+
* @returns {$protobuf.Writer} Writer
|
6450
|
+
*/
|
6451
|
+
ContractOwner.encode = function encode(message, writer) {
|
6452
|
+
if (!writer)
|
6453
|
+
writer = $Writer.create();
|
6454
|
+
if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey"))
|
6455
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.publicKey);
|
6456
|
+
if (message.attestationObject != null && Object.hasOwnProperty.call(message, "attestationObject"))
|
6457
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.attestationObject);
|
6458
|
+
return writer;
|
6459
|
+
};
|
6460
|
+
|
6461
|
+
/**
|
6462
|
+
* Decodes a ContractOwner message from the specified reader or buffer.
|
6463
|
+
* @function decode
|
6464
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6465
|
+
* @static
|
6466
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6467
|
+
* @param {number} [length] Message length if known beforehand
|
6468
|
+
* @returns {TW.Barz.Proto.ContractOwner} ContractOwner
|
6469
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
6470
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6471
|
+
*/
|
6472
|
+
ContractOwner.decode = function decode(reader, length) {
|
6473
|
+
if (!(reader instanceof $Reader))
|
6474
|
+
reader = $Reader.create(reader);
|
6475
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Barz.Proto.ContractOwner();
|
6476
|
+
while (reader.pos < end) {
|
6477
|
+
var tag = reader.uint32();
|
6478
|
+
switch (tag >>> 3) {
|
6479
|
+
case 1:
|
6480
|
+
message.publicKey = reader.string();
|
6481
|
+
break;
|
6482
|
+
case 2:
|
6483
|
+
message.attestationObject = reader.string();
|
6484
|
+
break;
|
6485
|
+
default:
|
6486
|
+
reader.skipType(tag & 7);
|
6487
|
+
break;
|
6488
|
+
}
|
6489
|
+
}
|
6490
|
+
return message;
|
6491
|
+
};
|
6492
|
+
|
6493
|
+
/**
|
6494
|
+
* Verifies a ContractOwner message.
|
6495
|
+
* @function verify
|
6496
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6497
|
+
* @static
|
6498
|
+
* @param {Object.<string,*>} message Plain object to verify
|
6499
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
6500
|
+
*/
|
6501
|
+
ContractOwner.verify = function verify(message) {
|
6502
|
+
if (typeof message !== "object" || message === null)
|
6503
|
+
return "object expected";
|
6504
|
+
var properties = {};
|
6505
|
+
if (message.publicKey != null && message.hasOwnProperty("publicKey")) {
|
6506
|
+
properties.kind = 1;
|
6507
|
+
if (!$util.isString(message.publicKey))
|
6508
|
+
return "publicKey: string expected";
|
6509
|
+
}
|
6510
|
+
if (message.attestationObject != null && message.hasOwnProperty("attestationObject")) {
|
6511
|
+
if (properties.kind === 1)
|
6512
|
+
return "kind: multiple values";
|
6513
|
+
properties.kind = 1;
|
6514
|
+
if (!$util.isString(message.attestationObject))
|
6515
|
+
return "attestationObject: string expected";
|
6516
|
+
}
|
6517
|
+
return null;
|
6518
|
+
};
|
6519
|
+
|
6520
|
+
/**
|
6521
|
+
* Creates a ContractOwner message from a plain object. Also converts values to their respective internal types.
|
6522
|
+
* @function fromObject
|
6523
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6524
|
+
* @static
|
6525
|
+
* @param {Object.<string,*>} object Plain object
|
6526
|
+
* @returns {TW.Barz.Proto.ContractOwner} ContractOwner
|
6527
|
+
*/
|
6528
|
+
ContractOwner.fromObject = function fromObject(object) {
|
6529
|
+
if (object instanceof $root.TW.Barz.Proto.ContractOwner)
|
6530
|
+
return object;
|
6531
|
+
var message = new $root.TW.Barz.Proto.ContractOwner();
|
6532
|
+
if (object.publicKey != null)
|
6533
|
+
message.publicKey = String(object.publicKey);
|
6534
|
+
if (object.attestationObject != null)
|
6535
|
+
message.attestationObject = String(object.attestationObject);
|
6536
|
+
return message;
|
6537
|
+
};
|
6538
|
+
|
6539
|
+
/**
|
6540
|
+
* Creates a plain object from a ContractOwner message. Also converts values to other types if specified.
|
6541
|
+
* @function toObject
|
6542
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6543
|
+
* @static
|
6544
|
+
* @param {TW.Barz.Proto.ContractOwner} message ContractOwner
|
6545
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
6546
|
+
* @returns {Object.<string,*>} Plain object
|
6547
|
+
*/
|
6548
|
+
ContractOwner.toObject = function toObject(message, options) {
|
6549
|
+
if (!options)
|
6550
|
+
options = {};
|
6551
|
+
var object = {};
|
6552
|
+
if (message.publicKey != null && message.hasOwnProperty("publicKey")) {
|
6553
|
+
object.publicKey = message.publicKey;
|
6554
|
+
if (options.oneofs)
|
6555
|
+
object.kind = "publicKey";
|
6556
|
+
}
|
6557
|
+
if (message.attestationObject != null && message.hasOwnProperty("attestationObject")) {
|
6558
|
+
object.attestationObject = message.attestationObject;
|
6559
|
+
if (options.oneofs)
|
6560
|
+
object.kind = "attestationObject";
|
6561
|
+
}
|
6562
|
+
return object;
|
6563
|
+
};
|
6564
|
+
|
6565
|
+
/**
|
6566
|
+
* Converts this ContractOwner to JSON.
|
6567
|
+
* @function toJSON
|
6568
|
+
* @memberof TW.Barz.Proto.ContractOwner
|
6569
|
+
* @instance
|
6570
|
+
* @returns {Object.<string,*>} JSON object
|
6571
|
+
*/
|
6572
|
+
ContractOwner.prototype.toJSON = function toJSON() {
|
6573
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6574
|
+
};
|
6575
|
+
|
6576
|
+
return ContractOwner;
|
6577
|
+
})();
|
6578
|
+
|
6579
|
+
Proto.ContractAddressInput = (function() {
|
6580
|
+
|
6581
|
+
/**
|
6582
|
+
* Properties of a ContractAddressInput.
|
6583
|
+
* @memberof TW.Barz.Proto
|
6584
|
+
* @interface IContractAddressInput
|
6585
|
+
* @property {string|null} [factory] ContractAddressInput factory
|
6586
|
+
* @property {string|null} [diamondCutFacet] ContractAddressInput diamondCutFacet
|
6587
|
+
* @property {string|null} [accountFacet] ContractAddressInput accountFacet
|
6588
|
+
* @property {string|null} [verificationFacet] ContractAddressInput verificationFacet
|
6589
|
+
* @property {string|null} [entryPoint] ContractAddressInput entryPoint
|
6590
|
+
* @property {string|null} [securityManager] ContractAddressInput securityManager
|
6591
|
+
* @property {string|null} [facetRegistry] ContractAddressInput facetRegistry
|
6592
|
+
* @property {string|null} [bytecode] ContractAddressInput bytecode
|
6593
|
+
* @property {TW.Barz.Proto.IContractOwner|null} [owner] ContractAddressInput owner
|
6594
|
+
*/
|
6595
|
+
|
6596
|
+
/**
|
6597
|
+
* Constructs a new ContractAddressInput.
|
6598
|
+
* @memberof TW.Barz.Proto
|
6599
|
+
* @classdesc Represents a ContractAddressInput.
|
6600
|
+
* @implements IContractAddressInput
|
6601
|
+
* @constructor
|
6602
|
+
* @param {TW.Barz.Proto.IContractAddressInput=} [properties] Properties to set
|
6603
|
+
*/
|
6604
|
+
function ContractAddressInput(properties) {
|
6605
|
+
if (properties)
|
6606
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6607
|
+
if (properties[keys[i]] != null)
|
6608
|
+
this[keys[i]] = properties[keys[i]];
|
6609
|
+
}
|
6610
|
+
|
6611
|
+
/**
|
6612
|
+
* ContractAddressInput factory.
|
6613
|
+
* @member {string} factory
|
6614
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6615
|
+
* @instance
|
6616
|
+
*/
|
6617
|
+
ContractAddressInput.prototype.factory = "";
|
6618
|
+
|
6619
|
+
/**
|
6620
|
+
* ContractAddressInput diamondCutFacet.
|
6621
|
+
* @member {string} diamondCutFacet
|
6622
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6623
|
+
* @instance
|
6624
|
+
*/
|
6625
|
+
ContractAddressInput.prototype.diamondCutFacet = "";
|
6626
|
+
|
6627
|
+
/**
|
6628
|
+
* ContractAddressInput accountFacet.
|
6629
|
+
* @member {string} accountFacet
|
6630
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6631
|
+
* @instance
|
6632
|
+
*/
|
6633
|
+
ContractAddressInput.prototype.accountFacet = "";
|
6634
|
+
|
6635
|
+
/**
|
6636
|
+
* ContractAddressInput verificationFacet.
|
6637
|
+
* @member {string} verificationFacet
|
6638
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6639
|
+
* @instance
|
6640
|
+
*/
|
6641
|
+
ContractAddressInput.prototype.verificationFacet = "";
|
6642
|
+
|
6643
|
+
/**
|
6644
|
+
* ContractAddressInput entryPoint.
|
6645
|
+
* @member {string} entryPoint
|
6646
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6647
|
+
* @instance
|
6648
|
+
*/
|
6649
|
+
ContractAddressInput.prototype.entryPoint = "";
|
6650
|
+
|
6651
|
+
/**
|
6652
|
+
* ContractAddressInput securityManager.
|
6653
|
+
* @member {string} securityManager
|
6654
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6655
|
+
* @instance
|
6656
|
+
*/
|
6657
|
+
ContractAddressInput.prototype.securityManager = "";
|
6658
|
+
|
6659
|
+
/**
|
6660
|
+
* ContractAddressInput facetRegistry.
|
6661
|
+
* @member {string} facetRegistry
|
6662
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6663
|
+
* @instance
|
6664
|
+
*/
|
6665
|
+
ContractAddressInput.prototype.facetRegistry = "";
|
6666
|
+
|
6667
|
+
/**
|
6668
|
+
* ContractAddressInput bytecode.
|
6669
|
+
* @member {string} bytecode
|
6670
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6671
|
+
* @instance
|
6672
|
+
*/
|
6673
|
+
ContractAddressInput.prototype.bytecode = "";
|
6674
|
+
|
6675
|
+
/**
|
6676
|
+
* ContractAddressInput owner.
|
6677
|
+
* @member {TW.Barz.Proto.IContractOwner|null|undefined} owner
|
6678
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6679
|
+
* @instance
|
6680
|
+
*/
|
6681
|
+
ContractAddressInput.prototype.owner = null;
|
6682
|
+
|
6683
|
+
/**
|
6684
|
+
* Creates a new ContractAddressInput instance using the specified properties.
|
6685
|
+
* @function create
|
6686
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6687
|
+
* @static
|
6688
|
+
* @param {TW.Barz.Proto.IContractAddressInput=} [properties] Properties to set
|
6689
|
+
* @returns {TW.Barz.Proto.ContractAddressInput} ContractAddressInput instance
|
6690
|
+
*/
|
6691
|
+
ContractAddressInput.create = function create(properties) {
|
6692
|
+
return new ContractAddressInput(properties);
|
6693
|
+
};
|
6694
|
+
|
6695
|
+
/**
|
6696
|
+
* Encodes the specified ContractAddressInput message. Does not implicitly {@link TW.Barz.Proto.ContractAddressInput.verify|verify} messages.
|
6697
|
+
* @function encode
|
6698
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6699
|
+
* @static
|
6700
|
+
* @param {TW.Barz.Proto.IContractAddressInput} message ContractAddressInput message or plain object to encode
|
6701
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
6702
|
+
* @returns {$protobuf.Writer} Writer
|
6703
|
+
*/
|
6704
|
+
ContractAddressInput.encode = function encode(message, writer) {
|
6705
|
+
if (!writer)
|
6706
|
+
writer = $Writer.create();
|
6707
|
+
if (message.factory != null && Object.hasOwnProperty.call(message, "factory"))
|
6708
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.factory);
|
6709
|
+
if (message.diamondCutFacet != null && Object.hasOwnProperty.call(message, "diamondCutFacet"))
|
6710
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.diamondCutFacet);
|
6711
|
+
if (message.accountFacet != null && Object.hasOwnProperty.call(message, "accountFacet"))
|
6712
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.accountFacet);
|
6713
|
+
if (message.verificationFacet != null && Object.hasOwnProperty.call(message, "verificationFacet"))
|
6714
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.verificationFacet);
|
6715
|
+
if (message.entryPoint != null && Object.hasOwnProperty.call(message, "entryPoint"))
|
6716
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.entryPoint);
|
6717
|
+
if (message.securityManager != null && Object.hasOwnProperty.call(message, "securityManager"))
|
6718
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.securityManager);
|
6719
|
+
if (message.facetRegistry != null && Object.hasOwnProperty.call(message, "facetRegistry"))
|
6720
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.facetRegistry);
|
6721
|
+
if (message.bytecode != null && Object.hasOwnProperty.call(message, "bytecode"))
|
6722
|
+
writer.uint32(/* id 8, wireType 2 =*/66).string(message.bytecode);
|
6723
|
+
if (message.owner != null && Object.hasOwnProperty.call(message, "owner"))
|
6724
|
+
$root.TW.Barz.Proto.ContractOwner.encode(message.owner, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
6725
|
+
return writer;
|
6726
|
+
};
|
6727
|
+
|
6728
|
+
/**
|
6729
|
+
* Decodes a ContractAddressInput message from the specified reader or buffer.
|
6730
|
+
* @function decode
|
6731
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6732
|
+
* @static
|
6733
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6734
|
+
* @param {number} [length] Message length if known beforehand
|
6735
|
+
* @returns {TW.Barz.Proto.ContractAddressInput} ContractAddressInput
|
6736
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
6737
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6738
|
+
*/
|
6739
|
+
ContractAddressInput.decode = function decode(reader, length) {
|
6740
|
+
if (!(reader instanceof $Reader))
|
6741
|
+
reader = $Reader.create(reader);
|
6742
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Barz.Proto.ContractAddressInput();
|
6743
|
+
while (reader.pos < end) {
|
6744
|
+
var tag = reader.uint32();
|
6745
|
+
switch (tag >>> 3) {
|
6746
|
+
case 1:
|
6747
|
+
message.factory = reader.string();
|
6748
|
+
break;
|
6749
|
+
case 2:
|
6750
|
+
message.diamondCutFacet = reader.string();
|
6751
|
+
break;
|
6752
|
+
case 3:
|
6753
|
+
message.accountFacet = reader.string();
|
6754
|
+
break;
|
6755
|
+
case 4:
|
6756
|
+
message.verificationFacet = reader.string();
|
6757
|
+
break;
|
6758
|
+
case 5:
|
6759
|
+
message.entryPoint = reader.string();
|
6760
|
+
break;
|
6761
|
+
case 6:
|
6762
|
+
message.securityManager = reader.string();
|
6763
|
+
break;
|
6764
|
+
case 7:
|
6765
|
+
message.facetRegistry = reader.string();
|
6766
|
+
break;
|
6767
|
+
case 8:
|
6768
|
+
message.bytecode = reader.string();
|
6769
|
+
break;
|
6770
|
+
case 9:
|
6771
|
+
message.owner = $root.TW.Barz.Proto.ContractOwner.decode(reader, reader.uint32());
|
6772
|
+
break;
|
6773
|
+
default:
|
6774
|
+
reader.skipType(tag & 7);
|
6775
|
+
break;
|
6776
|
+
}
|
6777
|
+
}
|
6778
|
+
return message;
|
6779
|
+
};
|
6780
|
+
|
6781
|
+
/**
|
6782
|
+
* Verifies a ContractAddressInput message.
|
6783
|
+
* @function verify
|
6784
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6785
|
+
* @static
|
6786
|
+
* @param {Object.<string,*>} message Plain object to verify
|
6787
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
6788
|
+
*/
|
6789
|
+
ContractAddressInput.verify = function verify(message) {
|
6790
|
+
if (typeof message !== "object" || message === null)
|
6791
|
+
return "object expected";
|
6792
|
+
if (message.factory != null && message.hasOwnProperty("factory"))
|
6793
|
+
if (!$util.isString(message.factory))
|
6794
|
+
return "factory: string expected";
|
6795
|
+
if (message.diamondCutFacet != null && message.hasOwnProperty("diamondCutFacet"))
|
6796
|
+
if (!$util.isString(message.diamondCutFacet))
|
6797
|
+
return "diamondCutFacet: string expected";
|
6798
|
+
if (message.accountFacet != null && message.hasOwnProperty("accountFacet"))
|
6799
|
+
if (!$util.isString(message.accountFacet))
|
6800
|
+
return "accountFacet: string expected";
|
6801
|
+
if (message.verificationFacet != null && message.hasOwnProperty("verificationFacet"))
|
6802
|
+
if (!$util.isString(message.verificationFacet))
|
6803
|
+
return "verificationFacet: string expected";
|
6804
|
+
if (message.entryPoint != null && message.hasOwnProperty("entryPoint"))
|
6805
|
+
if (!$util.isString(message.entryPoint))
|
6806
|
+
return "entryPoint: string expected";
|
6807
|
+
if (message.securityManager != null && message.hasOwnProperty("securityManager"))
|
6808
|
+
if (!$util.isString(message.securityManager))
|
6809
|
+
return "securityManager: string expected";
|
6810
|
+
if (message.facetRegistry != null && message.hasOwnProperty("facetRegistry"))
|
6811
|
+
if (!$util.isString(message.facetRegistry))
|
6812
|
+
return "facetRegistry: string expected";
|
6813
|
+
if (message.bytecode != null && message.hasOwnProperty("bytecode"))
|
6814
|
+
if (!$util.isString(message.bytecode))
|
6815
|
+
return "bytecode: string expected";
|
6816
|
+
if (message.owner != null && message.hasOwnProperty("owner")) {
|
6817
|
+
var error = $root.TW.Barz.Proto.ContractOwner.verify(message.owner);
|
6818
|
+
if (error)
|
6819
|
+
return "owner." + error;
|
6820
|
+
}
|
6821
|
+
return null;
|
6822
|
+
};
|
6823
|
+
|
6824
|
+
/**
|
6825
|
+
* Creates a ContractAddressInput message from a plain object. Also converts values to their respective internal types.
|
6826
|
+
* @function fromObject
|
6827
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6828
|
+
* @static
|
6829
|
+
* @param {Object.<string,*>} object Plain object
|
6830
|
+
* @returns {TW.Barz.Proto.ContractAddressInput} ContractAddressInput
|
6831
|
+
*/
|
6832
|
+
ContractAddressInput.fromObject = function fromObject(object) {
|
6833
|
+
if (object instanceof $root.TW.Barz.Proto.ContractAddressInput)
|
6834
|
+
return object;
|
6835
|
+
var message = new $root.TW.Barz.Proto.ContractAddressInput();
|
6836
|
+
if (object.factory != null)
|
6837
|
+
message.factory = String(object.factory);
|
6838
|
+
if (object.diamondCutFacet != null)
|
6839
|
+
message.diamondCutFacet = String(object.diamondCutFacet);
|
6840
|
+
if (object.accountFacet != null)
|
6841
|
+
message.accountFacet = String(object.accountFacet);
|
6842
|
+
if (object.verificationFacet != null)
|
6843
|
+
message.verificationFacet = String(object.verificationFacet);
|
6844
|
+
if (object.entryPoint != null)
|
6845
|
+
message.entryPoint = String(object.entryPoint);
|
6846
|
+
if (object.securityManager != null)
|
6847
|
+
message.securityManager = String(object.securityManager);
|
6848
|
+
if (object.facetRegistry != null)
|
6849
|
+
message.facetRegistry = String(object.facetRegistry);
|
6850
|
+
if (object.bytecode != null)
|
6851
|
+
message.bytecode = String(object.bytecode);
|
6852
|
+
if (object.owner != null) {
|
6853
|
+
if (typeof object.owner !== "object")
|
6854
|
+
throw TypeError(".TW.Barz.Proto.ContractAddressInput.owner: object expected");
|
6855
|
+
message.owner = $root.TW.Barz.Proto.ContractOwner.fromObject(object.owner);
|
6856
|
+
}
|
6857
|
+
return message;
|
6858
|
+
};
|
6859
|
+
|
6860
|
+
/**
|
6861
|
+
* Creates a plain object from a ContractAddressInput message. Also converts values to other types if specified.
|
6862
|
+
* @function toObject
|
6863
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6864
|
+
* @static
|
6865
|
+
* @param {TW.Barz.Proto.ContractAddressInput} message ContractAddressInput
|
6866
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
6867
|
+
* @returns {Object.<string,*>} Plain object
|
6868
|
+
*/
|
6869
|
+
ContractAddressInput.toObject = function toObject(message, options) {
|
6870
|
+
if (!options)
|
6871
|
+
options = {};
|
6872
|
+
var object = {};
|
6873
|
+
if (options.defaults) {
|
6874
|
+
object.factory = "";
|
6875
|
+
object.diamondCutFacet = "";
|
6876
|
+
object.accountFacet = "";
|
6877
|
+
object.verificationFacet = "";
|
6878
|
+
object.entryPoint = "";
|
6879
|
+
object.securityManager = "";
|
6880
|
+
object.facetRegistry = "";
|
6881
|
+
object.bytecode = "";
|
6882
|
+
object.owner = null;
|
6883
|
+
}
|
6884
|
+
if (message.factory != null && message.hasOwnProperty("factory"))
|
6885
|
+
object.factory = message.factory;
|
6886
|
+
if (message.diamondCutFacet != null && message.hasOwnProperty("diamondCutFacet"))
|
6887
|
+
object.diamondCutFacet = message.diamondCutFacet;
|
6888
|
+
if (message.accountFacet != null && message.hasOwnProperty("accountFacet"))
|
6889
|
+
object.accountFacet = message.accountFacet;
|
6890
|
+
if (message.verificationFacet != null && message.hasOwnProperty("verificationFacet"))
|
6891
|
+
object.verificationFacet = message.verificationFacet;
|
6892
|
+
if (message.entryPoint != null && message.hasOwnProperty("entryPoint"))
|
6893
|
+
object.entryPoint = message.entryPoint;
|
6894
|
+
if (message.securityManager != null && message.hasOwnProperty("securityManager"))
|
6895
|
+
object.securityManager = message.securityManager;
|
6896
|
+
if (message.facetRegistry != null && message.hasOwnProperty("facetRegistry"))
|
6897
|
+
object.facetRegistry = message.facetRegistry;
|
6898
|
+
if (message.bytecode != null && message.hasOwnProperty("bytecode"))
|
6899
|
+
object.bytecode = message.bytecode;
|
6900
|
+
if (message.owner != null && message.hasOwnProperty("owner"))
|
6901
|
+
object.owner = $root.TW.Barz.Proto.ContractOwner.toObject(message.owner, options);
|
6902
|
+
return object;
|
6903
|
+
};
|
6904
|
+
|
6905
|
+
/**
|
6906
|
+
* Converts this ContractAddressInput to JSON.
|
6907
|
+
* @function toJSON
|
6908
|
+
* @memberof TW.Barz.Proto.ContractAddressInput
|
6909
|
+
* @instance
|
6910
|
+
* @returns {Object.<string,*>} JSON object
|
6911
|
+
*/
|
6912
|
+
ContractAddressInput.prototype.toJSON = function toJSON() {
|
6913
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6914
|
+
};
|
6915
|
+
|
6916
|
+
return ContractAddressInput;
|
6917
|
+
})();
|
6918
|
+
|
6919
|
+
return Proto;
|
6920
|
+
})();
|
6921
|
+
|
6922
|
+
return Barz;
|
6923
|
+
})();
|
6924
|
+
|
6925
|
+
TW.Common = (function() {
|
6926
|
+
|
6927
|
+
/**
|
6928
|
+
* Namespace Common.
|
6929
|
+
* @memberof TW
|
6930
|
+
* @namespace
|
6931
|
+
*/
|
6932
|
+
var Common = {};
|
6933
|
+
|
6934
|
+
Common.Proto = (function() {
|
6935
|
+
|
6936
|
+
/**
|
6937
|
+
* Namespace Proto.
|
6938
|
+
* @memberof TW.Common
|
6939
|
+
* @namespace
|
6940
|
+
*/
|
6941
|
+
var Proto = {};
|
6942
|
+
|
6943
|
+
/**
|
6944
|
+
* SigningError enum.
|
6945
|
+
* @name TW.Common.Proto.SigningError
|
6946
|
+
* @enum {number}
|
6947
|
+
* @property {number} OK=0 OK value
|
6948
|
+
* @property {number} Error_general=1 Error_general value
|
6949
|
+
* @property {number} Error_internal=2 Error_internal value
|
6950
|
+
* @property {number} Error_low_balance=3 Error_low_balance value
|
6951
|
+
* @property {number} Error_zero_amount_requested=4 Error_zero_amount_requested value
|
6952
|
+
* @property {number} Error_missing_private_key=5 Error_missing_private_key value
|
6953
|
+
* @property {number} Error_invalid_private_key=15 Error_invalid_private_key value
|
6954
|
+
* @property {number} Error_invalid_address=16 Error_invalid_address value
|
6955
|
+
* @property {number} Error_invalid_utxo=17 Error_invalid_utxo value
|
6956
|
+
* @property {number} Error_invalid_utxo_amount=18 Error_invalid_utxo_amount value
|
6957
|
+
* @property {number} Error_wrong_fee=6 Error_wrong_fee value
|
6958
|
+
* @property {number} Error_signing=7 Error_signing value
|
6959
|
+
* @property {number} Error_tx_too_big=8 Error_tx_too_big value
|
6960
|
+
* @property {number} Error_missing_input_utxos=9 Error_missing_input_utxos value
|
6961
|
+
* @property {number} Error_not_enough_utxos=10 Error_not_enough_utxos value
|
6962
|
+
* @property {number} Error_script_redeem=11 Error_script_redeem value
|
6963
|
+
* @property {number} Error_script_output=12 Error_script_output value
|
6964
|
+
* @property {number} Error_script_witness_program=13 Error_script_witness_program value
|
6965
|
+
* @property {number} Error_invalid_memo=14 Error_invalid_memo value
|
6966
|
+
* @property {number} Error_input_parse=19 Error_input_parse value
|
6967
|
+
* @property {number} Error_no_support_n2n=20 Error_no_support_n2n value
|
6968
|
+
* @property {number} Error_signatures_count=21 Error_signatures_count value
|
6969
|
+
* @property {number} Error_invalid_params=22 Error_invalid_params value
|
6970
|
+
* @property {number} Error_invalid_requested_token_amount=23 Error_invalid_requested_token_amount value
|
6971
|
+
*/
|
6972
|
+
Proto.SigningError = (function() {
|
6973
|
+
var valuesById = {}, values = Object.create(valuesById);
|
6974
|
+
values[valuesById[0] = "OK"] = 0;
|
6975
|
+
values[valuesById[1] = "Error_general"] = 1;
|
6976
|
+
values[valuesById[2] = "Error_internal"] = 2;
|
6977
|
+
values[valuesById[3] = "Error_low_balance"] = 3;
|
6978
|
+
values[valuesById[4] = "Error_zero_amount_requested"] = 4;
|
6979
|
+
values[valuesById[5] = "Error_missing_private_key"] = 5;
|
6980
|
+
values[valuesById[15] = "Error_invalid_private_key"] = 15;
|
6981
|
+
values[valuesById[16] = "Error_invalid_address"] = 16;
|
6982
|
+
values[valuesById[17] = "Error_invalid_utxo"] = 17;
|
6983
|
+
values[valuesById[18] = "Error_invalid_utxo_amount"] = 18;
|
6984
|
+
values[valuesById[6] = "Error_wrong_fee"] = 6;
|
6985
|
+
values[valuesById[7] = "Error_signing"] = 7;
|
6986
|
+
values[valuesById[8] = "Error_tx_too_big"] = 8;
|
6987
|
+
values[valuesById[9] = "Error_missing_input_utxos"] = 9;
|
6988
|
+
values[valuesById[10] = "Error_not_enough_utxos"] = 10;
|
6989
|
+
values[valuesById[11] = "Error_script_redeem"] = 11;
|
6990
|
+
values[valuesById[12] = "Error_script_output"] = 12;
|
6991
|
+
values[valuesById[13] = "Error_script_witness_program"] = 13;
|
6992
|
+
values[valuesById[14] = "Error_invalid_memo"] = 14;
|
6993
|
+
values[valuesById[19] = "Error_input_parse"] = 19;
|
6994
|
+
values[valuesById[20] = "Error_no_support_n2n"] = 20;
|
6995
|
+
values[valuesById[21] = "Error_signatures_count"] = 21;
|
6996
|
+
values[valuesById[22] = "Error_invalid_params"] = 22;
|
6997
|
+
values[valuesById[23] = "Error_invalid_requested_token_amount"] = 23;
|
6998
|
+
return values;
|
6999
|
+
})();
|
7000
|
+
|
7001
|
+
return Proto;
|
7002
|
+
})();
|
7003
|
+
|
7004
|
+
return Common;
|
7005
|
+
})();
|
7006
|
+
|
6357
7007
|
TW.Binance = (function() {
|
6358
7008
|
|
6359
7009
|
/**
|
@@ -13814,88 +14464,6 @@
|
|
13814
14464
|
return Binance;
|
13815
14465
|
})();
|
13816
14466
|
|
13817
|
-
TW.Common = (function() {
|
13818
|
-
|
13819
|
-
/**
|
13820
|
-
* Namespace Common.
|
13821
|
-
* @memberof TW
|
13822
|
-
* @namespace
|
13823
|
-
*/
|
13824
|
-
var Common = {};
|
13825
|
-
|
13826
|
-
Common.Proto = (function() {
|
13827
|
-
|
13828
|
-
/**
|
13829
|
-
* Namespace Proto.
|
13830
|
-
* @memberof TW.Common
|
13831
|
-
* @namespace
|
13832
|
-
*/
|
13833
|
-
var Proto = {};
|
13834
|
-
|
13835
|
-
/**
|
13836
|
-
* SigningError enum.
|
13837
|
-
* @name TW.Common.Proto.SigningError
|
13838
|
-
* @enum {number}
|
13839
|
-
* @property {number} OK=0 OK value
|
13840
|
-
* @property {number} Error_general=1 Error_general value
|
13841
|
-
* @property {number} Error_internal=2 Error_internal value
|
13842
|
-
* @property {number} Error_low_balance=3 Error_low_balance value
|
13843
|
-
* @property {number} Error_zero_amount_requested=4 Error_zero_amount_requested value
|
13844
|
-
* @property {number} Error_missing_private_key=5 Error_missing_private_key value
|
13845
|
-
* @property {number} Error_invalid_private_key=15 Error_invalid_private_key value
|
13846
|
-
* @property {number} Error_invalid_address=16 Error_invalid_address value
|
13847
|
-
* @property {number} Error_invalid_utxo=17 Error_invalid_utxo value
|
13848
|
-
* @property {number} Error_invalid_utxo_amount=18 Error_invalid_utxo_amount value
|
13849
|
-
* @property {number} Error_wrong_fee=6 Error_wrong_fee value
|
13850
|
-
* @property {number} Error_signing=7 Error_signing value
|
13851
|
-
* @property {number} Error_tx_too_big=8 Error_tx_too_big value
|
13852
|
-
* @property {number} Error_missing_input_utxos=9 Error_missing_input_utxos value
|
13853
|
-
* @property {number} Error_not_enough_utxos=10 Error_not_enough_utxos value
|
13854
|
-
* @property {number} Error_script_redeem=11 Error_script_redeem value
|
13855
|
-
* @property {number} Error_script_output=12 Error_script_output value
|
13856
|
-
* @property {number} Error_script_witness_program=13 Error_script_witness_program value
|
13857
|
-
* @property {number} Error_invalid_memo=14 Error_invalid_memo value
|
13858
|
-
* @property {number} Error_input_parse=19 Error_input_parse value
|
13859
|
-
* @property {number} Error_no_support_n2n=20 Error_no_support_n2n value
|
13860
|
-
* @property {number} Error_signatures_count=21 Error_signatures_count value
|
13861
|
-
* @property {number} Error_invalid_params=22 Error_invalid_params value
|
13862
|
-
* @property {number} Error_invalid_requested_token_amount=23 Error_invalid_requested_token_amount value
|
13863
|
-
*/
|
13864
|
-
Proto.SigningError = (function() {
|
13865
|
-
var valuesById = {}, values = Object.create(valuesById);
|
13866
|
-
values[valuesById[0] = "OK"] = 0;
|
13867
|
-
values[valuesById[1] = "Error_general"] = 1;
|
13868
|
-
values[valuesById[2] = "Error_internal"] = 2;
|
13869
|
-
values[valuesById[3] = "Error_low_balance"] = 3;
|
13870
|
-
values[valuesById[4] = "Error_zero_amount_requested"] = 4;
|
13871
|
-
values[valuesById[5] = "Error_missing_private_key"] = 5;
|
13872
|
-
values[valuesById[15] = "Error_invalid_private_key"] = 15;
|
13873
|
-
values[valuesById[16] = "Error_invalid_address"] = 16;
|
13874
|
-
values[valuesById[17] = "Error_invalid_utxo"] = 17;
|
13875
|
-
values[valuesById[18] = "Error_invalid_utxo_amount"] = 18;
|
13876
|
-
values[valuesById[6] = "Error_wrong_fee"] = 6;
|
13877
|
-
values[valuesById[7] = "Error_signing"] = 7;
|
13878
|
-
values[valuesById[8] = "Error_tx_too_big"] = 8;
|
13879
|
-
values[valuesById[9] = "Error_missing_input_utxos"] = 9;
|
13880
|
-
values[valuesById[10] = "Error_not_enough_utxos"] = 10;
|
13881
|
-
values[valuesById[11] = "Error_script_redeem"] = 11;
|
13882
|
-
values[valuesById[12] = "Error_script_output"] = 12;
|
13883
|
-
values[valuesById[13] = "Error_script_witness_program"] = 13;
|
13884
|
-
values[valuesById[14] = "Error_invalid_memo"] = 14;
|
13885
|
-
values[valuesById[19] = "Error_input_parse"] = 19;
|
13886
|
-
values[valuesById[20] = "Error_no_support_n2n"] = 20;
|
13887
|
-
values[valuesById[21] = "Error_signatures_count"] = 21;
|
13888
|
-
values[valuesById[22] = "Error_invalid_params"] = 22;
|
13889
|
-
values[valuesById[23] = "Error_invalid_requested_token_amount"] = 23;
|
13890
|
-
return values;
|
13891
|
-
})();
|
13892
|
-
|
13893
|
-
return Proto;
|
13894
|
-
})();
|
13895
|
-
|
13896
|
-
return Common;
|
13897
|
-
})();
|
13898
|
-
|
13899
14467
|
TW.Bitcoin = (function() {
|
13900
14468
|
|
13901
14469
|
/**
|
package/dist/lib/wallet-core.js
CHANGED
@@ -34,7 +34,7 @@ function Ua(){Qa++;g.monitorRunDependencies&&g.monitorRunDependencies(Qa);assert
|
|
34
34
|
function Va(){return G.startsWith("data:application/octet-stream;base64,")}function ma(a){return a.startsWith("file://")}function H(a){return function(){var b=g.asm;assert(Oa,"native function `"+a+"` called before runtime initialization");b[a]||assert(b[a],"exported native function `"+a+"` not found");return b[a].apply(null,arguments)}}var G;G="wallet-core.wasm";if(!Va()){var Wa=G;G=g.locateFile?g.locateFile(Wa,w):w+Wa}
|
35
35
|
function Xa(){var a=G;try{if(a==G&&qa)return new Uint8Array(qa);if(ka)return ka(a);throw"both async and sync fetching of the wasm failed";}catch(b){n(b)}}
|
36
36
|
function Ya(){if(!qa&&(ea||fa)){if("function"==typeof fetch&&!ma(G))return fetch(G,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+G+"'";return a.arrayBuffer()}).catch(function(){return Xa()});if(ja)return new Promise(function(a,b){ja(G,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return Xa()})}
|
37
|
-
var Za,$a,ab={
|
37
|
+
var Za,$a,ab={666660:()=>{if(void 0===g.ea)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.ea=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.ea=a}catch(e){throw"No secure random number generator found";}}},667382:()=>g.ea()};function bb(a){for(;0<a.length;)a.shift()(g)}
|
38
38
|
function va(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function pa(a){cb||(cb={});cb[a]||(cb[a]=1,v&&(a="warning: "+a),y(a))}var cb,db=0;
|
39
39
|
function eb(a){this.l=a-24;this.Sa=function(b){F[this.l+4>>2]=b};this.Ca=function(){return F[this.l+4>>2]};this.Ia=function(b){F[this.l+8>>2]=b};this.Ja=function(){E[this.l>>2]=0};this.Ha=function(){C[this.l+12>>0]=0};this.Ma=function(){C[this.l+13>>0]=0};this.Da=function(b,c){this.F(0);this.Sa(b);this.Ia(c);this.Ja();this.Ha();this.Ma()};this.F=function(b){F[this.l+16>>2]=b}}
|
40
40
|
var fb=0,gb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},hb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=gb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},ib=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},jb=
|
Binary file
|
@@ -90,6 +90,9 @@ export class AnyAddress {
|
|
90
90
|
data(): Uint8Array;
|
91
91
|
delete(): void;
|
92
92
|
}
|
93
|
+
export class Barz {
|
94
|
+
static getCounterfactualAddress(input: Uint8Array | Buffer): string;
|
95
|
+
}
|
93
96
|
export class Base32 {
|
94
97
|
static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
|
95
98
|
static decode(string: string): Uint8Array;
|
@@ -875,6 +878,7 @@ export interface WalletCore {
|
|
875
878
|
AESPaddingMode: typeof AESPaddingMode;
|
876
879
|
Account: typeof Account;
|
877
880
|
AnyAddress: typeof AnyAddress;
|
881
|
+
Barz: typeof Barz;
|
878
882
|
Base32: typeof Base32;
|
879
883
|
Base58: typeof Base58;
|
880
884
|
Base64: typeof Base64;
|