@trustwallet/wallet-core 3.0.5 → 3.0.6

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.
@@ -3262,6 +3262,1075 @@
3262
3262
  return CreateAccountMessage;
3263
3263
  })();
3264
3264
 
3265
+ Proto.OfferNftMessage = (function() {
3266
+
3267
+ /**
3268
+ * Properties of an OfferNftMessage.
3269
+ * @memberof TW.Aptos.Proto
3270
+ * @interface IOfferNftMessage
3271
+ * @property {string|null} [receiver] OfferNftMessage receiver
3272
+ * @property {string|null} [creator] OfferNftMessage creator
3273
+ * @property {string|null} [collectionName] OfferNftMessage collectionName
3274
+ * @property {string|null} [name] OfferNftMessage name
3275
+ * @property {Long|null} [propertyVersion] OfferNftMessage propertyVersion
3276
+ * @property {Long|null} [amount] OfferNftMessage amount
3277
+ */
3278
+
3279
+ /**
3280
+ * Constructs a new OfferNftMessage.
3281
+ * @memberof TW.Aptos.Proto
3282
+ * @classdesc Represents an OfferNftMessage.
3283
+ * @implements IOfferNftMessage
3284
+ * @constructor
3285
+ * @param {TW.Aptos.Proto.IOfferNftMessage=} [properties] Properties to set
3286
+ */
3287
+ function OfferNftMessage(properties) {
3288
+ if (properties)
3289
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3290
+ if (properties[keys[i]] != null)
3291
+ this[keys[i]] = properties[keys[i]];
3292
+ }
3293
+
3294
+ /**
3295
+ * OfferNftMessage receiver.
3296
+ * @member {string} receiver
3297
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3298
+ * @instance
3299
+ */
3300
+ OfferNftMessage.prototype.receiver = "";
3301
+
3302
+ /**
3303
+ * OfferNftMessage creator.
3304
+ * @member {string} creator
3305
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3306
+ * @instance
3307
+ */
3308
+ OfferNftMessage.prototype.creator = "";
3309
+
3310
+ /**
3311
+ * OfferNftMessage collectionName.
3312
+ * @member {string} collectionName
3313
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3314
+ * @instance
3315
+ */
3316
+ OfferNftMessage.prototype.collectionName = "";
3317
+
3318
+ /**
3319
+ * OfferNftMessage name.
3320
+ * @member {string} name
3321
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3322
+ * @instance
3323
+ */
3324
+ OfferNftMessage.prototype.name = "";
3325
+
3326
+ /**
3327
+ * OfferNftMessage propertyVersion.
3328
+ * @member {Long} propertyVersion
3329
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3330
+ * @instance
3331
+ */
3332
+ OfferNftMessage.prototype.propertyVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3333
+
3334
+ /**
3335
+ * OfferNftMessage amount.
3336
+ * @member {Long} amount
3337
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3338
+ * @instance
3339
+ */
3340
+ OfferNftMessage.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3341
+
3342
+ /**
3343
+ * Creates a new OfferNftMessage instance using the specified properties.
3344
+ * @function create
3345
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3346
+ * @static
3347
+ * @param {TW.Aptos.Proto.IOfferNftMessage=} [properties] Properties to set
3348
+ * @returns {TW.Aptos.Proto.OfferNftMessage} OfferNftMessage instance
3349
+ */
3350
+ OfferNftMessage.create = function create(properties) {
3351
+ return new OfferNftMessage(properties);
3352
+ };
3353
+
3354
+ /**
3355
+ * Encodes the specified OfferNftMessage message. Does not implicitly {@link TW.Aptos.Proto.OfferNftMessage.verify|verify} messages.
3356
+ * @function encode
3357
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3358
+ * @static
3359
+ * @param {TW.Aptos.Proto.IOfferNftMessage} message OfferNftMessage message or plain object to encode
3360
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3361
+ * @returns {$protobuf.Writer} Writer
3362
+ */
3363
+ OfferNftMessage.encode = function encode(message, writer) {
3364
+ if (!writer)
3365
+ writer = $Writer.create();
3366
+ if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver"))
3367
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.receiver);
3368
+ if (message.creator != null && Object.hasOwnProperty.call(message, "creator"))
3369
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.creator);
3370
+ if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName"))
3371
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionName);
3372
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
3373
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
3374
+ if (message.propertyVersion != null && Object.hasOwnProperty.call(message, "propertyVersion"))
3375
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.propertyVersion);
3376
+ if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
3377
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.amount);
3378
+ return writer;
3379
+ };
3380
+
3381
+ /**
3382
+ * Decodes an OfferNftMessage message from the specified reader or buffer.
3383
+ * @function decode
3384
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3385
+ * @static
3386
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3387
+ * @param {number} [length] Message length if known beforehand
3388
+ * @returns {TW.Aptos.Proto.OfferNftMessage} OfferNftMessage
3389
+ * @throws {Error} If the payload is not a reader or valid buffer
3390
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3391
+ */
3392
+ OfferNftMessage.decode = function decode(reader, length) {
3393
+ if (!(reader instanceof $Reader))
3394
+ reader = $Reader.create(reader);
3395
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.OfferNftMessage();
3396
+ while (reader.pos < end) {
3397
+ var tag = reader.uint32();
3398
+ switch (tag >>> 3) {
3399
+ case 1:
3400
+ message.receiver = reader.string();
3401
+ break;
3402
+ case 2:
3403
+ message.creator = reader.string();
3404
+ break;
3405
+ case 3:
3406
+ message.collectionName = reader.string();
3407
+ break;
3408
+ case 4:
3409
+ message.name = reader.string();
3410
+ break;
3411
+ case 5:
3412
+ message.propertyVersion = reader.uint64();
3413
+ break;
3414
+ case 6:
3415
+ message.amount = reader.uint64();
3416
+ break;
3417
+ default:
3418
+ reader.skipType(tag & 7);
3419
+ break;
3420
+ }
3421
+ }
3422
+ return message;
3423
+ };
3424
+
3425
+ /**
3426
+ * Verifies an OfferNftMessage message.
3427
+ * @function verify
3428
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3429
+ * @static
3430
+ * @param {Object.<string,*>} message Plain object to verify
3431
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3432
+ */
3433
+ OfferNftMessage.verify = function verify(message) {
3434
+ if (typeof message !== "object" || message === null)
3435
+ return "object expected";
3436
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
3437
+ if (!$util.isString(message.receiver))
3438
+ return "receiver: string expected";
3439
+ if (message.creator != null && message.hasOwnProperty("creator"))
3440
+ if (!$util.isString(message.creator))
3441
+ return "creator: string expected";
3442
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3443
+ if (!$util.isString(message.collectionName))
3444
+ return "collectionName: string expected";
3445
+ if (message.name != null && message.hasOwnProperty("name"))
3446
+ if (!$util.isString(message.name))
3447
+ return "name: string expected";
3448
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3449
+ if (!$util.isInteger(message.propertyVersion) && !(message.propertyVersion && $util.isInteger(message.propertyVersion.low) && $util.isInteger(message.propertyVersion.high)))
3450
+ return "propertyVersion: integer|Long expected";
3451
+ if (message.amount != null && message.hasOwnProperty("amount"))
3452
+ if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
3453
+ return "amount: integer|Long expected";
3454
+ return null;
3455
+ };
3456
+
3457
+ /**
3458
+ * Creates an OfferNftMessage message from a plain object. Also converts values to their respective internal types.
3459
+ * @function fromObject
3460
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3461
+ * @static
3462
+ * @param {Object.<string,*>} object Plain object
3463
+ * @returns {TW.Aptos.Proto.OfferNftMessage} OfferNftMessage
3464
+ */
3465
+ OfferNftMessage.fromObject = function fromObject(object) {
3466
+ if (object instanceof $root.TW.Aptos.Proto.OfferNftMessage)
3467
+ return object;
3468
+ var message = new $root.TW.Aptos.Proto.OfferNftMessage();
3469
+ if (object.receiver != null)
3470
+ message.receiver = String(object.receiver);
3471
+ if (object.creator != null)
3472
+ message.creator = String(object.creator);
3473
+ if (object.collectionName != null)
3474
+ message.collectionName = String(object.collectionName);
3475
+ if (object.name != null)
3476
+ message.name = String(object.name);
3477
+ if (object.propertyVersion != null)
3478
+ if ($util.Long)
3479
+ (message.propertyVersion = $util.Long.fromValue(object.propertyVersion)).unsigned = true;
3480
+ else if (typeof object.propertyVersion === "string")
3481
+ message.propertyVersion = parseInt(object.propertyVersion, 10);
3482
+ else if (typeof object.propertyVersion === "number")
3483
+ message.propertyVersion = object.propertyVersion;
3484
+ else if (typeof object.propertyVersion === "object")
3485
+ message.propertyVersion = new $util.LongBits(object.propertyVersion.low >>> 0, object.propertyVersion.high >>> 0).toNumber(true);
3486
+ if (object.amount != null)
3487
+ if ($util.Long)
3488
+ (message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
3489
+ else if (typeof object.amount === "string")
3490
+ message.amount = parseInt(object.amount, 10);
3491
+ else if (typeof object.amount === "number")
3492
+ message.amount = object.amount;
3493
+ else if (typeof object.amount === "object")
3494
+ message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
3495
+ return message;
3496
+ };
3497
+
3498
+ /**
3499
+ * Creates a plain object from an OfferNftMessage message. Also converts values to other types if specified.
3500
+ * @function toObject
3501
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3502
+ * @static
3503
+ * @param {TW.Aptos.Proto.OfferNftMessage} message OfferNftMessage
3504
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3505
+ * @returns {Object.<string,*>} Plain object
3506
+ */
3507
+ OfferNftMessage.toObject = function toObject(message, options) {
3508
+ if (!options)
3509
+ options = {};
3510
+ var object = {};
3511
+ if (options.defaults) {
3512
+ object.receiver = "";
3513
+ object.creator = "";
3514
+ object.collectionName = "";
3515
+ object.name = "";
3516
+ if ($util.Long) {
3517
+ var long = new $util.Long(0, 0, true);
3518
+ object.propertyVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3519
+ } else
3520
+ object.propertyVersion = options.longs === String ? "0" : 0;
3521
+ if ($util.Long) {
3522
+ var long = new $util.Long(0, 0, true);
3523
+ object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3524
+ } else
3525
+ object.amount = options.longs === String ? "0" : 0;
3526
+ }
3527
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
3528
+ object.receiver = message.receiver;
3529
+ if (message.creator != null && message.hasOwnProperty("creator"))
3530
+ object.creator = message.creator;
3531
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3532
+ object.collectionName = message.collectionName;
3533
+ if (message.name != null && message.hasOwnProperty("name"))
3534
+ object.name = message.name;
3535
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3536
+ if (typeof message.propertyVersion === "number")
3537
+ object.propertyVersion = options.longs === String ? String(message.propertyVersion) : message.propertyVersion;
3538
+ else
3539
+ object.propertyVersion = options.longs === String ? $util.Long.prototype.toString.call(message.propertyVersion) : options.longs === Number ? new $util.LongBits(message.propertyVersion.low >>> 0, message.propertyVersion.high >>> 0).toNumber(true) : message.propertyVersion;
3540
+ if (message.amount != null && message.hasOwnProperty("amount"))
3541
+ if (typeof message.amount === "number")
3542
+ object.amount = options.longs === String ? String(message.amount) : message.amount;
3543
+ else
3544
+ object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount;
3545
+ return object;
3546
+ };
3547
+
3548
+ /**
3549
+ * Converts this OfferNftMessage to JSON.
3550
+ * @function toJSON
3551
+ * @memberof TW.Aptos.Proto.OfferNftMessage
3552
+ * @instance
3553
+ * @returns {Object.<string,*>} JSON object
3554
+ */
3555
+ OfferNftMessage.prototype.toJSON = function toJSON() {
3556
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3557
+ };
3558
+
3559
+ return OfferNftMessage;
3560
+ })();
3561
+
3562
+ Proto.CancelOfferNftMessage = (function() {
3563
+
3564
+ /**
3565
+ * Properties of a CancelOfferNftMessage.
3566
+ * @memberof TW.Aptos.Proto
3567
+ * @interface ICancelOfferNftMessage
3568
+ * @property {string|null} [receiver] CancelOfferNftMessage receiver
3569
+ * @property {string|null} [creator] CancelOfferNftMessage creator
3570
+ * @property {string|null} [collectionName] CancelOfferNftMessage collectionName
3571
+ * @property {string|null} [name] CancelOfferNftMessage name
3572
+ * @property {Long|null} [propertyVersion] CancelOfferNftMessage propertyVersion
3573
+ */
3574
+
3575
+ /**
3576
+ * Constructs a new CancelOfferNftMessage.
3577
+ * @memberof TW.Aptos.Proto
3578
+ * @classdesc Represents a CancelOfferNftMessage.
3579
+ * @implements ICancelOfferNftMessage
3580
+ * @constructor
3581
+ * @param {TW.Aptos.Proto.ICancelOfferNftMessage=} [properties] Properties to set
3582
+ */
3583
+ function CancelOfferNftMessage(properties) {
3584
+ if (properties)
3585
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3586
+ if (properties[keys[i]] != null)
3587
+ this[keys[i]] = properties[keys[i]];
3588
+ }
3589
+
3590
+ /**
3591
+ * CancelOfferNftMessage receiver.
3592
+ * @member {string} receiver
3593
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3594
+ * @instance
3595
+ */
3596
+ CancelOfferNftMessage.prototype.receiver = "";
3597
+
3598
+ /**
3599
+ * CancelOfferNftMessage creator.
3600
+ * @member {string} creator
3601
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3602
+ * @instance
3603
+ */
3604
+ CancelOfferNftMessage.prototype.creator = "";
3605
+
3606
+ /**
3607
+ * CancelOfferNftMessage collectionName.
3608
+ * @member {string} collectionName
3609
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3610
+ * @instance
3611
+ */
3612
+ CancelOfferNftMessage.prototype.collectionName = "";
3613
+
3614
+ /**
3615
+ * CancelOfferNftMessage name.
3616
+ * @member {string} name
3617
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3618
+ * @instance
3619
+ */
3620
+ CancelOfferNftMessage.prototype.name = "";
3621
+
3622
+ /**
3623
+ * CancelOfferNftMessage propertyVersion.
3624
+ * @member {Long} propertyVersion
3625
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3626
+ * @instance
3627
+ */
3628
+ CancelOfferNftMessage.prototype.propertyVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3629
+
3630
+ /**
3631
+ * Creates a new CancelOfferNftMessage instance using the specified properties.
3632
+ * @function create
3633
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3634
+ * @static
3635
+ * @param {TW.Aptos.Proto.ICancelOfferNftMessage=} [properties] Properties to set
3636
+ * @returns {TW.Aptos.Proto.CancelOfferNftMessage} CancelOfferNftMessage instance
3637
+ */
3638
+ CancelOfferNftMessage.create = function create(properties) {
3639
+ return new CancelOfferNftMessage(properties);
3640
+ };
3641
+
3642
+ /**
3643
+ * Encodes the specified CancelOfferNftMessage message. Does not implicitly {@link TW.Aptos.Proto.CancelOfferNftMessage.verify|verify} messages.
3644
+ * @function encode
3645
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3646
+ * @static
3647
+ * @param {TW.Aptos.Proto.ICancelOfferNftMessage} message CancelOfferNftMessage message or plain object to encode
3648
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3649
+ * @returns {$protobuf.Writer} Writer
3650
+ */
3651
+ CancelOfferNftMessage.encode = function encode(message, writer) {
3652
+ if (!writer)
3653
+ writer = $Writer.create();
3654
+ if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver"))
3655
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.receiver);
3656
+ if (message.creator != null && Object.hasOwnProperty.call(message, "creator"))
3657
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.creator);
3658
+ if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName"))
3659
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionName);
3660
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
3661
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
3662
+ if (message.propertyVersion != null && Object.hasOwnProperty.call(message, "propertyVersion"))
3663
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.propertyVersion);
3664
+ return writer;
3665
+ };
3666
+
3667
+ /**
3668
+ * Decodes a CancelOfferNftMessage message from the specified reader or buffer.
3669
+ * @function decode
3670
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3671
+ * @static
3672
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3673
+ * @param {number} [length] Message length if known beforehand
3674
+ * @returns {TW.Aptos.Proto.CancelOfferNftMessage} CancelOfferNftMessage
3675
+ * @throws {Error} If the payload is not a reader or valid buffer
3676
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3677
+ */
3678
+ CancelOfferNftMessage.decode = function decode(reader, length) {
3679
+ if (!(reader instanceof $Reader))
3680
+ reader = $Reader.create(reader);
3681
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.CancelOfferNftMessage();
3682
+ while (reader.pos < end) {
3683
+ var tag = reader.uint32();
3684
+ switch (tag >>> 3) {
3685
+ case 1:
3686
+ message.receiver = reader.string();
3687
+ break;
3688
+ case 2:
3689
+ message.creator = reader.string();
3690
+ break;
3691
+ case 3:
3692
+ message.collectionName = reader.string();
3693
+ break;
3694
+ case 4:
3695
+ message.name = reader.string();
3696
+ break;
3697
+ case 5:
3698
+ message.propertyVersion = reader.uint64();
3699
+ break;
3700
+ default:
3701
+ reader.skipType(tag & 7);
3702
+ break;
3703
+ }
3704
+ }
3705
+ return message;
3706
+ };
3707
+
3708
+ /**
3709
+ * Verifies a CancelOfferNftMessage message.
3710
+ * @function verify
3711
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3712
+ * @static
3713
+ * @param {Object.<string,*>} message Plain object to verify
3714
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3715
+ */
3716
+ CancelOfferNftMessage.verify = function verify(message) {
3717
+ if (typeof message !== "object" || message === null)
3718
+ return "object expected";
3719
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
3720
+ if (!$util.isString(message.receiver))
3721
+ return "receiver: string expected";
3722
+ if (message.creator != null && message.hasOwnProperty("creator"))
3723
+ if (!$util.isString(message.creator))
3724
+ return "creator: string expected";
3725
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3726
+ if (!$util.isString(message.collectionName))
3727
+ return "collectionName: string expected";
3728
+ if (message.name != null && message.hasOwnProperty("name"))
3729
+ if (!$util.isString(message.name))
3730
+ return "name: string expected";
3731
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3732
+ if (!$util.isInteger(message.propertyVersion) && !(message.propertyVersion && $util.isInteger(message.propertyVersion.low) && $util.isInteger(message.propertyVersion.high)))
3733
+ return "propertyVersion: integer|Long expected";
3734
+ return null;
3735
+ };
3736
+
3737
+ /**
3738
+ * Creates a CancelOfferNftMessage message from a plain object. Also converts values to their respective internal types.
3739
+ * @function fromObject
3740
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3741
+ * @static
3742
+ * @param {Object.<string,*>} object Plain object
3743
+ * @returns {TW.Aptos.Proto.CancelOfferNftMessage} CancelOfferNftMessage
3744
+ */
3745
+ CancelOfferNftMessage.fromObject = function fromObject(object) {
3746
+ if (object instanceof $root.TW.Aptos.Proto.CancelOfferNftMessage)
3747
+ return object;
3748
+ var message = new $root.TW.Aptos.Proto.CancelOfferNftMessage();
3749
+ if (object.receiver != null)
3750
+ message.receiver = String(object.receiver);
3751
+ if (object.creator != null)
3752
+ message.creator = String(object.creator);
3753
+ if (object.collectionName != null)
3754
+ message.collectionName = String(object.collectionName);
3755
+ if (object.name != null)
3756
+ message.name = String(object.name);
3757
+ if (object.propertyVersion != null)
3758
+ if ($util.Long)
3759
+ (message.propertyVersion = $util.Long.fromValue(object.propertyVersion)).unsigned = true;
3760
+ else if (typeof object.propertyVersion === "string")
3761
+ message.propertyVersion = parseInt(object.propertyVersion, 10);
3762
+ else if (typeof object.propertyVersion === "number")
3763
+ message.propertyVersion = object.propertyVersion;
3764
+ else if (typeof object.propertyVersion === "object")
3765
+ message.propertyVersion = new $util.LongBits(object.propertyVersion.low >>> 0, object.propertyVersion.high >>> 0).toNumber(true);
3766
+ return message;
3767
+ };
3768
+
3769
+ /**
3770
+ * Creates a plain object from a CancelOfferNftMessage message. Also converts values to other types if specified.
3771
+ * @function toObject
3772
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3773
+ * @static
3774
+ * @param {TW.Aptos.Proto.CancelOfferNftMessage} message CancelOfferNftMessage
3775
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3776
+ * @returns {Object.<string,*>} Plain object
3777
+ */
3778
+ CancelOfferNftMessage.toObject = function toObject(message, options) {
3779
+ if (!options)
3780
+ options = {};
3781
+ var object = {};
3782
+ if (options.defaults) {
3783
+ object.receiver = "";
3784
+ object.creator = "";
3785
+ object.collectionName = "";
3786
+ object.name = "";
3787
+ if ($util.Long) {
3788
+ var long = new $util.Long(0, 0, true);
3789
+ object.propertyVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3790
+ } else
3791
+ object.propertyVersion = options.longs === String ? "0" : 0;
3792
+ }
3793
+ if (message.receiver != null && message.hasOwnProperty("receiver"))
3794
+ object.receiver = message.receiver;
3795
+ if (message.creator != null && message.hasOwnProperty("creator"))
3796
+ object.creator = message.creator;
3797
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3798
+ object.collectionName = message.collectionName;
3799
+ if (message.name != null && message.hasOwnProperty("name"))
3800
+ object.name = message.name;
3801
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3802
+ if (typeof message.propertyVersion === "number")
3803
+ object.propertyVersion = options.longs === String ? String(message.propertyVersion) : message.propertyVersion;
3804
+ else
3805
+ object.propertyVersion = options.longs === String ? $util.Long.prototype.toString.call(message.propertyVersion) : options.longs === Number ? new $util.LongBits(message.propertyVersion.low >>> 0, message.propertyVersion.high >>> 0).toNumber(true) : message.propertyVersion;
3806
+ return object;
3807
+ };
3808
+
3809
+ /**
3810
+ * Converts this CancelOfferNftMessage to JSON.
3811
+ * @function toJSON
3812
+ * @memberof TW.Aptos.Proto.CancelOfferNftMessage
3813
+ * @instance
3814
+ * @returns {Object.<string,*>} JSON object
3815
+ */
3816
+ CancelOfferNftMessage.prototype.toJSON = function toJSON() {
3817
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3818
+ };
3819
+
3820
+ return CancelOfferNftMessage;
3821
+ })();
3822
+
3823
+ Proto.ClaimNftMessage = (function() {
3824
+
3825
+ /**
3826
+ * Properties of a ClaimNftMessage.
3827
+ * @memberof TW.Aptos.Proto
3828
+ * @interface IClaimNftMessage
3829
+ * @property {string|null} [sender] ClaimNftMessage sender
3830
+ * @property {string|null} [creator] ClaimNftMessage creator
3831
+ * @property {string|null} [collectionName] ClaimNftMessage collectionName
3832
+ * @property {string|null} [name] ClaimNftMessage name
3833
+ * @property {Long|null} [propertyVersion] ClaimNftMessage propertyVersion
3834
+ */
3835
+
3836
+ /**
3837
+ * Constructs a new ClaimNftMessage.
3838
+ * @memberof TW.Aptos.Proto
3839
+ * @classdesc Represents a ClaimNftMessage.
3840
+ * @implements IClaimNftMessage
3841
+ * @constructor
3842
+ * @param {TW.Aptos.Proto.IClaimNftMessage=} [properties] Properties to set
3843
+ */
3844
+ function ClaimNftMessage(properties) {
3845
+ if (properties)
3846
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3847
+ if (properties[keys[i]] != null)
3848
+ this[keys[i]] = properties[keys[i]];
3849
+ }
3850
+
3851
+ /**
3852
+ * ClaimNftMessage sender.
3853
+ * @member {string} sender
3854
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3855
+ * @instance
3856
+ */
3857
+ ClaimNftMessage.prototype.sender = "";
3858
+
3859
+ /**
3860
+ * ClaimNftMessage creator.
3861
+ * @member {string} creator
3862
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3863
+ * @instance
3864
+ */
3865
+ ClaimNftMessage.prototype.creator = "";
3866
+
3867
+ /**
3868
+ * ClaimNftMessage collectionName.
3869
+ * @member {string} collectionName
3870
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3871
+ * @instance
3872
+ */
3873
+ ClaimNftMessage.prototype.collectionName = "";
3874
+
3875
+ /**
3876
+ * ClaimNftMessage name.
3877
+ * @member {string} name
3878
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3879
+ * @instance
3880
+ */
3881
+ ClaimNftMessage.prototype.name = "";
3882
+
3883
+ /**
3884
+ * ClaimNftMessage propertyVersion.
3885
+ * @member {Long} propertyVersion
3886
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3887
+ * @instance
3888
+ */
3889
+ ClaimNftMessage.prototype.propertyVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
3890
+
3891
+ /**
3892
+ * Creates a new ClaimNftMessage instance using the specified properties.
3893
+ * @function create
3894
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3895
+ * @static
3896
+ * @param {TW.Aptos.Proto.IClaimNftMessage=} [properties] Properties to set
3897
+ * @returns {TW.Aptos.Proto.ClaimNftMessage} ClaimNftMessage instance
3898
+ */
3899
+ ClaimNftMessage.create = function create(properties) {
3900
+ return new ClaimNftMessage(properties);
3901
+ };
3902
+
3903
+ /**
3904
+ * Encodes the specified ClaimNftMessage message. Does not implicitly {@link TW.Aptos.Proto.ClaimNftMessage.verify|verify} messages.
3905
+ * @function encode
3906
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3907
+ * @static
3908
+ * @param {TW.Aptos.Proto.IClaimNftMessage} message ClaimNftMessage message or plain object to encode
3909
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3910
+ * @returns {$protobuf.Writer} Writer
3911
+ */
3912
+ ClaimNftMessage.encode = function encode(message, writer) {
3913
+ if (!writer)
3914
+ writer = $Writer.create();
3915
+ if (message.sender != null && Object.hasOwnProperty.call(message, "sender"))
3916
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender);
3917
+ if (message.creator != null && Object.hasOwnProperty.call(message, "creator"))
3918
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.creator);
3919
+ if (message.collectionName != null && Object.hasOwnProperty.call(message, "collectionName"))
3920
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.collectionName);
3921
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
3922
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
3923
+ if (message.propertyVersion != null && Object.hasOwnProperty.call(message, "propertyVersion"))
3924
+ writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.propertyVersion);
3925
+ return writer;
3926
+ };
3927
+
3928
+ /**
3929
+ * Decodes a ClaimNftMessage message from the specified reader or buffer.
3930
+ * @function decode
3931
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3932
+ * @static
3933
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3934
+ * @param {number} [length] Message length if known beforehand
3935
+ * @returns {TW.Aptos.Proto.ClaimNftMessage} ClaimNftMessage
3936
+ * @throws {Error} If the payload is not a reader or valid buffer
3937
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3938
+ */
3939
+ ClaimNftMessage.decode = function decode(reader, length) {
3940
+ if (!(reader instanceof $Reader))
3941
+ reader = $Reader.create(reader);
3942
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.ClaimNftMessage();
3943
+ while (reader.pos < end) {
3944
+ var tag = reader.uint32();
3945
+ switch (tag >>> 3) {
3946
+ case 1:
3947
+ message.sender = reader.string();
3948
+ break;
3949
+ case 2:
3950
+ message.creator = reader.string();
3951
+ break;
3952
+ case 3:
3953
+ message.collectionName = reader.string();
3954
+ break;
3955
+ case 4:
3956
+ message.name = reader.string();
3957
+ break;
3958
+ case 5:
3959
+ message.propertyVersion = reader.uint64();
3960
+ break;
3961
+ default:
3962
+ reader.skipType(tag & 7);
3963
+ break;
3964
+ }
3965
+ }
3966
+ return message;
3967
+ };
3968
+
3969
+ /**
3970
+ * Verifies a ClaimNftMessage message.
3971
+ * @function verify
3972
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
3973
+ * @static
3974
+ * @param {Object.<string,*>} message Plain object to verify
3975
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3976
+ */
3977
+ ClaimNftMessage.verify = function verify(message) {
3978
+ if (typeof message !== "object" || message === null)
3979
+ return "object expected";
3980
+ if (message.sender != null && message.hasOwnProperty("sender"))
3981
+ if (!$util.isString(message.sender))
3982
+ return "sender: string expected";
3983
+ if (message.creator != null && message.hasOwnProperty("creator"))
3984
+ if (!$util.isString(message.creator))
3985
+ return "creator: string expected";
3986
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
3987
+ if (!$util.isString(message.collectionName))
3988
+ return "collectionName: string expected";
3989
+ if (message.name != null && message.hasOwnProperty("name"))
3990
+ if (!$util.isString(message.name))
3991
+ return "name: string expected";
3992
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
3993
+ if (!$util.isInteger(message.propertyVersion) && !(message.propertyVersion && $util.isInteger(message.propertyVersion.low) && $util.isInteger(message.propertyVersion.high)))
3994
+ return "propertyVersion: integer|Long expected";
3995
+ return null;
3996
+ };
3997
+
3998
+ /**
3999
+ * Creates a ClaimNftMessage message from a plain object. Also converts values to their respective internal types.
4000
+ * @function fromObject
4001
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
4002
+ * @static
4003
+ * @param {Object.<string,*>} object Plain object
4004
+ * @returns {TW.Aptos.Proto.ClaimNftMessage} ClaimNftMessage
4005
+ */
4006
+ ClaimNftMessage.fromObject = function fromObject(object) {
4007
+ if (object instanceof $root.TW.Aptos.Proto.ClaimNftMessage)
4008
+ return object;
4009
+ var message = new $root.TW.Aptos.Proto.ClaimNftMessage();
4010
+ if (object.sender != null)
4011
+ message.sender = String(object.sender);
4012
+ if (object.creator != null)
4013
+ message.creator = String(object.creator);
4014
+ if (object.collectionName != null)
4015
+ message.collectionName = String(object.collectionName);
4016
+ if (object.name != null)
4017
+ message.name = String(object.name);
4018
+ if (object.propertyVersion != null)
4019
+ if ($util.Long)
4020
+ (message.propertyVersion = $util.Long.fromValue(object.propertyVersion)).unsigned = true;
4021
+ else if (typeof object.propertyVersion === "string")
4022
+ message.propertyVersion = parseInt(object.propertyVersion, 10);
4023
+ else if (typeof object.propertyVersion === "number")
4024
+ message.propertyVersion = object.propertyVersion;
4025
+ else if (typeof object.propertyVersion === "object")
4026
+ message.propertyVersion = new $util.LongBits(object.propertyVersion.low >>> 0, object.propertyVersion.high >>> 0).toNumber(true);
4027
+ return message;
4028
+ };
4029
+
4030
+ /**
4031
+ * Creates a plain object from a ClaimNftMessage message. Also converts values to other types if specified.
4032
+ * @function toObject
4033
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
4034
+ * @static
4035
+ * @param {TW.Aptos.Proto.ClaimNftMessage} message ClaimNftMessage
4036
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4037
+ * @returns {Object.<string,*>} Plain object
4038
+ */
4039
+ ClaimNftMessage.toObject = function toObject(message, options) {
4040
+ if (!options)
4041
+ options = {};
4042
+ var object = {};
4043
+ if (options.defaults) {
4044
+ object.sender = "";
4045
+ object.creator = "";
4046
+ object.collectionName = "";
4047
+ object.name = "";
4048
+ if ($util.Long) {
4049
+ var long = new $util.Long(0, 0, true);
4050
+ object.propertyVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4051
+ } else
4052
+ object.propertyVersion = options.longs === String ? "0" : 0;
4053
+ }
4054
+ if (message.sender != null && message.hasOwnProperty("sender"))
4055
+ object.sender = message.sender;
4056
+ if (message.creator != null && message.hasOwnProperty("creator"))
4057
+ object.creator = message.creator;
4058
+ if (message.collectionName != null && message.hasOwnProperty("collectionName"))
4059
+ object.collectionName = message.collectionName;
4060
+ if (message.name != null && message.hasOwnProperty("name"))
4061
+ object.name = message.name;
4062
+ if (message.propertyVersion != null && message.hasOwnProperty("propertyVersion"))
4063
+ if (typeof message.propertyVersion === "number")
4064
+ object.propertyVersion = options.longs === String ? String(message.propertyVersion) : message.propertyVersion;
4065
+ else
4066
+ object.propertyVersion = options.longs === String ? $util.Long.prototype.toString.call(message.propertyVersion) : options.longs === Number ? new $util.LongBits(message.propertyVersion.low >>> 0, message.propertyVersion.high >>> 0).toNumber(true) : message.propertyVersion;
4067
+ return object;
4068
+ };
4069
+
4070
+ /**
4071
+ * Converts this ClaimNftMessage to JSON.
4072
+ * @function toJSON
4073
+ * @memberof TW.Aptos.Proto.ClaimNftMessage
4074
+ * @instance
4075
+ * @returns {Object.<string,*>} JSON object
4076
+ */
4077
+ ClaimNftMessage.prototype.toJSON = function toJSON() {
4078
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4079
+ };
4080
+
4081
+ return ClaimNftMessage;
4082
+ })();
4083
+
4084
+ Proto.NftMessage = (function() {
4085
+
4086
+ /**
4087
+ * Properties of a NftMessage.
4088
+ * @memberof TW.Aptos.Proto
4089
+ * @interface INftMessage
4090
+ * @property {TW.Aptos.Proto.IOfferNftMessage|null} [offerNft] NftMessage offerNft
4091
+ * @property {TW.Aptos.Proto.ICancelOfferNftMessage|null} [cancelOfferNft] NftMessage cancelOfferNft
4092
+ * @property {TW.Aptos.Proto.IClaimNftMessage|null} [claimNft] NftMessage claimNft
4093
+ */
4094
+
4095
+ /**
4096
+ * Constructs a new NftMessage.
4097
+ * @memberof TW.Aptos.Proto
4098
+ * @classdesc Represents a NftMessage.
4099
+ * @implements INftMessage
4100
+ * @constructor
4101
+ * @param {TW.Aptos.Proto.INftMessage=} [properties] Properties to set
4102
+ */
4103
+ function NftMessage(properties) {
4104
+ if (properties)
4105
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4106
+ if (properties[keys[i]] != null)
4107
+ this[keys[i]] = properties[keys[i]];
4108
+ }
4109
+
4110
+ /**
4111
+ * NftMessage offerNft.
4112
+ * @member {TW.Aptos.Proto.IOfferNftMessage|null|undefined} offerNft
4113
+ * @memberof TW.Aptos.Proto.NftMessage
4114
+ * @instance
4115
+ */
4116
+ NftMessage.prototype.offerNft = null;
4117
+
4118
+ /**
4119
+ * NftMessage cancelOfferNft.
4120
+ * @member {TW.Aptos.Proto.ICancelOfferNftMessage|null|undefined} cancelOfferNft
4121
+ * @memberof TW.Aptos.Proto.NftMessage
4122
+ * @instance
4123
+ */
4124
+ NftMessage.prototype.cancelOfferNft = null;
4125
+
4126
+ /**
4127
+ * NftMessage claimNft.
4128
+ * @member {TW.Aptos.Proto.IClaimNftMessage|null|undefined} claimNft
4129
+ * @memberof TW.Aptos.Proto.NftMessage
4130
+ * @instance
4131
+ */
4132
+ NftMessage.prototype.claimNft = null;
4133
+
4134
+ // OneOf field names bound to virtual getters and setters
4135
+ var $oneOfFields;
4136
+
4137
+ /**
4138
+ * NftMessage nftTransactionPayload.
4139
+ * @member {"offerNft"|"cancelOfferNft"|"claimNft"|undefined} nftTransactionPayload
4140
+ * @memberof TW.Aptos.Proto.NftMessage
4141
+ * @instance
4142
+ */
4143
+ Object.defineProperty(NftMessage.prototype, "nftTransactionPayload", {
4144
+ get: $util.oneOfGetter($oneOfFields = ["offerNft", "cancelOfferNft", "claimNft"]),
4145
+ set: $util.oneOfSetter($oneOfFields)
4146
+ });
4147
+
4148
+ /**
4149
+ * Creates a new NftMessage instance using the specified properties.
4150
+ * @function create
4151
+ * @memberof TW.Aptos.Proto.NftMessage
4152
+ * @static
4153
+ * @param {TW.Aptos.Proto.INftMessage=} [properties] Properties to set
4154
+ * @returns {TW.Aptos.Proto.NftMessage} NftMessage instance
4155
+ */
4156
+ NftMessage.create = function create(properties) {
4157
+ return new NftMessage(properties);
4158
+ };
4159
+
4160
+ /**
4161
+ * Encodes the specified NftMessage message. Does not implicitly {@link TW.Aptos.Proto.NftMessage.verify|verify} messages.
4162
+ * @function encode
4163
+ * @memberof TW.Aptos.Proto.NftMessage
4164
+ * @static
4165
+ * @param {TW.Aptos.Proto.INftMessage} message NftMessage message or plain object to encode
4166
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4167
+ * @returns {$protobuf.Writer} Writer
4168
+ */
4169
+ NftMessage.encode = function encode(message, writer) {
4170
+ if (!writer)
4171
+ writer = $Writer.create();
4172
+ if (message.offerNft != null && Object.hasOwnProperty.call(message, "offerNft"))
4173
+ $root.TW.Aptos.Proto.OfferNftMessage.encode(message.offerNft, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
4174
+ if (message.cancelOfferNft != null && Object.hasOwnProperty.call(message, "cancelOfferNft"))
4175
+ $root.TW.Aptos.Proto.CancelOfferNftMessage.encode(message.cancelOfferNft, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4176
+ if (message.claimNft != null && Object.hasOwnProperty.call(message, "claimNft"))
4177
+ $root.TW.Aptos.Proto.ClaimNftMessage.encode(message.claimNft, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
4178
+ return writer;
4179
+ };
4180
+
4181
+ /**
4182
+ * Decodes a NftMessage message from the specified reader or buffer.
4183
+ * @function decode
4184
+ * @memberof TW.Aptos.Proto.NftMessage
4185
+ * @static
4186
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4187
+ * @param {number} [length] Message length if known beforehand
4188
+ * @returns {TW.Aptos.Proto.NftMessage} NftMessage
4189
+ * @throws {Error} If the payload is not a reader or valid buffer
4190
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4191
+ */
4192
+ NftMessage.decode = function decode(reader, length) {
4193
+ if (!(reader instanceof $Reader))
4194
+ reader = $Reader.create(reader);
4195
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.NftMessage();
4196
+ while (reader.pos < end) {
4197
+ var tag = reader.uint32();
4198
+ switch (tag >>> 3) {
4199
+ case 1:
4200
+ message.offerNft = $root.TW.Aptos.Proto.OfferNftMessage.decode(reader, reader.uint32());
4201
+ break;
4202
+ case 2:
4203
+ message.cancelOfferNft = $root.TW.Aptos.Proto.CancelOfferNftMessage.decode(reader, reader.uint32());
4204
+ break;
4205
+ case 3:
4206
+ message.claimNft = $root.TW.Aptos.Proto.ClaimNftMessage.decode(reader, reader.uint32());
4207
+ break;
4208
+ default:
4209
+ reader.skipType(tag & 7);
4210
+ break;
4211
+ }
4212
+ }
4213
+ return message;
4214
+ };
4215
+
4216
+ /**
4217
+ * Verifies a NftMessage message.
4218
+ * @function verify
4219
+ * @memberof TW.Aptos.Proto.NftMessage
4220
+ * @static
4221
+ * @param {Object.<string,*>} message Plain object to verify
4222
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4223
+ */
4224
+ NftMessage.verify = function verify(message) {
4225
+ if (typeof message !== "object" || message === null)
4226
+ return "object expected";
4227
+ var properties = {};
4228
+ if (message.offerNft != null && message.hasOwnProperty("offerNft")) {
4229
+ properties.nftTransactionPayload = 1;
4230
+ {
4231
+ var error = $root.TW.Aptos.Proto.OfferNftMessage.verify(message.offerNft);
4232
+ if (error)
4233
+ return "offerNft." + error;
4234
+ }
4235
+ }
4236
+ if (message.cancelOfferNft != null && message.hasOwnProperty("cancelOfferNft")) {
4237
+ if (properties.nftTransactionPayload === 1)
4238
+ return "nftTransactionPayload: multiple values";
4239
+ properties.nftTransactionPayload = 1;
4240
+ {
4241
+ var error = $root.TW.Aptos.Proto.CancelOfferNftMessage.verify(message.cancelOfferNft);
4242
+ if (error)
4243
+ return "cancelOfferNft." + error;
4244
+ }
4245
+ }
4246
+ if (message.claimNft != null && message.hasOwnProperty("claimNft")) {
4247
+ if (properties.nftTransactionPayload === 1)
4248
+ return "nftTransactionPayload: multiple values";
4249
+ properties.nftTransactionPayload = 1;
4250
+ {
4251
+ var error = $root.TW.Aptos.Proto.ClaimNftMessage.verify(message.claimNft);
4252
+ if (error)
4253
+ return "claimNft." + error;
4254
+ }
4255
+ }
4256
+ return null;
4257
+ };
4258
+
4259
+ /**
4260
+ * Creates a NftMessage message from a plain object. Also converts values to their respective internal types.
4261
+ * @function fromObject
4262
+ * @memberof TW.Aptos.Proto.NftMessage
4263
+ * @static
4264
+ * @param {Object.<string,*>} object Plain object
4265
+ * @returns {TW.Aptos.Proto.NftMessage} NftMessage
4266
+ */
4267
+ NftMessage.fromObject = function fromObject(object) {
4268
+ if (object instanceof $root.TW.Aptos.Proto.NftMessage)
4269
+ return object;
4270
+ var message = new $root.TW.Aptos.Proto.NftMessage();
4271
+ if (object.offerNft != null) {
4272
+ if (typeof object.offerNft !== "object")
4273
+ throw TypeError(".TW.Aptos.Proto.NftMessage.offerNft: object expected");
4274
+ message.offerNft = $root.TW.Aptos.Proto.OfferNftMessage.fromObject(object.offerNft);
4275
+ }
4276
+ if (object.cancelOfferNft != null) {
4277
+ if (typeof object.cancelOfferNft !== "object")
4278
+ throw TypeError(".TW.Aptos.Proto.NftMessage.cancelOfferNft: object expected");
4279
+ message.cancelOfferNft = $root.TW.Aptos.Proto.CancelOfferNftMessage.fromObject(object.cancelOfferNft);
4280
+ }
4281
+ if (object.claimNft != null) {
4282
+ if (typeof object.claimNft !== "object")
4283
+ throw TypeError(".TW.Aptos.Proto.NftMessage.claimNft: object expected");
4284
+ message.claimNft = $root.TW.Aptos.Proto.ClaimNftMessage.fromObject(object.claimNft);
4285
+ }
4286
+ return message;
4287
+ };
4288
+
4289
+ /**
4290
+ * Creates a plain object from a NftMessage message. Also converts values to other types if specified.
4291
+ * @function toObject
4292
+ * @memberof TW.Aptos.Proto.NftMessage
4293
+ * @static
4294
+ * @param {TW.Aptos.Proto.NftMessage} message NftMessage
4295
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4296
+ * @returns {Object.<string,*>} Plain object
4297
+ */
4298
+ NftMessage.toObject = function toObject(message, options) {
4299
+ if (!options)
4300
+ options = {};
4301
+ var object = {};
4302
+ if (message.offerNft != null && message.hasOwnProperty("offerNft")) {
4303
+ object.offerNft = $root.TW.Aptos.Proto.OfferNftMessage.toObject(message.offerNft, options);
4304
+ if (options.oneofs)
4305
+ object.nftTransactionPayload = "offerNft";
4306
+ }
4307
+ if (message.cancelOfferNft != null && message.hasOwnProperty("cancelOfferNft")) {
4308
+ object.cancelOfferNft = $root.TW.Aptos.Proto.CancelOfferNftMessage.toObject(message.cancelOfferNft, options);
4309
+ if (options.oneofs)
4310
+ object.nftTransactionPayload = "cancelOfferNft";
4311
+ }
4312
+ if (message.claimNft != null && message.hasOwnProperty("claimNft")) {
4313
+ object.claimNft = $root.TW.Aptos.Proto.ClaimNftMessage.toObject(message.claimNft, options);
4314
+ if (options.oneofs)
4315
+ object.nftTransactionPayload = "claimNft";
4316
+ }
4317
+ return object;
4318
+ };
4319
+
4320
+ /**
4321
+ * Converts this NftMessage to JSON.
4322
+ * @function toJSON
4323
+ * @memberof TW.Aptos.Proto.NftMessage
4324
+ * @instance
4325
+ * @returns {Object.<string,*>} JSON object
4326
+ */
4327
+ NftMessage.prototype.toJSON = function toJSON() {
4328
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4329
+ };
4330
+
4331
+ return NftMessage;
4332
+ })();
4333
+
3265
4334
  Proto.SigningInput = (function() {
3266
4335
 
3267
4336
  /**
@@ -3273,6 +4342,7 @@
3273
4342
  * @property {TW.Aptos.Proto.ITransferMessage|null} [transfer] SigningInput transfer
3274
4343
  * @property {TW.Aptos.Proto.ITokenTransferMessage|null} [tokenTransfer] SigningInput tokenTransfer
3275
4344
  * @property {TW.Aptos.Proto.ICreateAccountMessage|null} [createAccount] SigningInput createAccount
4345
+ * @property {TW.Aptos.Proto.INftMessage|null} [nftMessage] SigningInput nftMessage
3276
4346
  * @property {Long|null} [maxGasAmount] SigningInput maxGasAmount
3277
4347
  * @property {Long|null} [gasUnitPrice] SigningInput gasUnitPrice
3278
4348
  * @property {Long|null} [expirationTimestampSecs] SigningInput expirationTimestampSecs
@@ -3336,6 +4406,14 @@
3336
4406
  */
3337
4407
  SigningInput.prototype.createAccount = null;
3338
4408
 
4409
+ /**
4410
+ * SigningInput nftMessage.
4411
+ * @member {TW.Aptos.Proto.INftMessage|null|undefined} nftMessage
4412
+ * @memberof TW.Aptos.Proto.SigningInput
4413
+ * @instance
4414
+ */
4415
+ SigningInput.prototype.nftMessage = null;
4416
+
3339
4417
  /**
3340
4418
  * SigningInput maxGasAmount.
3341
4419
  * @member {Long} maxGasAmount
@@ -3389,12 +4467,12 @@
3389
4467
 
3390
4468
  /**
3391
4469
  * SigningInput transactionPayload.
3392
- * @member {"transfer"|"tokenTransfer"|"createAccount"|undefined} transactionPayload
4470
+ * @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|undefined} transactionPayload
3393
4471
  * @memberof TW.Aptos.Proto.SigningInput
3394
4472
  * @instance
3395
4473
  */
3396
4474
  Object.defineProperty(SigningInput.prototype, "transactionPayload", {
3397
- get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount"]),
4475
+ get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage"]),
3398
4476
  set: $util.oneOfSetter($oneOfFields)
3399
4477
  });
3400
4478
 
@@ -3432,18 +4510,20 @@
3432
4510
  $root.TW.Aptos.Proto.TokenTransferMessage.encode(message.tokenTransfer, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
3433
4511
  if (message.createAccount != null && Object.hasOwnProperty.call(message, "createAccount"))
3434
4512
  $root.TW.Aptos.Proto.CreateAccountMessage.encode(message.createAccount, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
4513
+ if (message.nftMessage != null && Object.hasOwnProperty.call(message, "nftMessage"))
4514
+ $root.TW.Aptos.Proto.NftMessage.encode(message.nftMessage, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
3435
4515
  if (message.maxGasAmount != null && Object.hasOwnProperty.call(message, "maxGasAmount"))
3436
- writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.maxGasAmount);
4516
+ writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.maxGasAmount);
3437
4517
  if (message.gasUnitPrice != null && Object.hasOwnProperty.call(message, "gasUnitPrice"))
3438
- writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.gasUnitPrice);
4518
+ writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.gasUnitPrice);
3439
4519
  if (message.expirationTimestampSecs != null && Object.hasOwnProperty.call(message, "expirationTimestampSecs"))
3440
- writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.expirationTimestampSecs);
4520
+ writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.expirationTimestampSecs);
3441
4521
  if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId"))
3442
- writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.chainId);
4522
+ writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.chainId);
3443
4523
  if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey"))
3444
- writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.privateKey);
4524
+ writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.privateKey);
3445
4525
  if (message.anyEncoded != null && Object.hasOwnProperty.call(message, "anyEncoded"))
3446
- writer.uint32(/* id 11, wireType 2 =*/90).string(message.anyEncoded);
4526
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.anyEncoded);
3447
4527
  return writer;
3448
4528
  };
3449
4529
 
@@ -3481,21 +4561,24 @@
3481
4561
  message.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.decode(reader, reader.uint32());
3482
4562
  break;
3483
4563
  case 6:
3484
- message.maxGasAmount = reader.uint64();
4564
+ message.nftMessage = $root.TW.Aptos.Proto.NftMessage.decode(reader, reader.uint32());
3485
4565
  break;
3486
4566
  case 7:
3487
- message.gasUnitPrice = reader.uint64();
4567
+ message.maxGasAmount = reader.uint64();
3488
4568
  break;
3489
4569
  case 8:
3490
- message.expirationTimestampSecs = reader.uint64();
4570
+ message.gasUnitPrice = reader.uint64();
3491
4571
  break;
3492
4572
  case 9:
3493
- message.chainId = reader.uint32();
4573
+ message.expirationTimestampSecs = reader.uint64();
3494
4574
  break;
3495
4575
  case 10:
3496
- message.privateKey = reader.bytes();
4576
+ message.chainId = reader.uint32();
3497
4577
  break;
3498
4578
  case 11:
4579
+ message.privateKey = reader.bytes();
4580
+ break;
4581
+ case 12:
3499
4582
  message.anyEncoded = reader.string();
3500
4583
  break;
3501
4584
  default:
@@ -3552,6 +4635,16 @@
3552
4635
  return "createAccount." + error;
3553
4636
  }
3554
4637
  }
4638
+ if (message.nftMessage != null && message.hasOwnProperty("nftMessage")) {
4639
+ if (properties.transactionPayload === 1)
4640
+ return "transactionPayload: multiple values";
4641
+ properties.transactionPayload = 1;
4642
+ {
4643
+ var error = $root.TW.Aptos.Proto.NftMessage.verify(message.nftMessage);
4644
+ if (error)
4645
+ return "nftMessage." + error;
4646
+ }
4647
+ }
3555
4648
  if (message.maxGasAmount != null && message.hasOwnProperty("maxGasAmount"))
3556
4649
  if (!$util.isInteger(message.maxGasAmount) && !(message.maxGasAmount && $util.isInteger(message.maxGasAmount.low) && $util.isInteger(message.maxGasAmount.high)))
3557
4650
  return "maxGasAmount: integer|Long expected";
@@ -3611,6 +4704,11 @@
3611
4704
  throw TypeError(".TW.Aptos.Proto.SigningInput.createAccount: object expected");
3612
4705
  message.createAccount = $root.TW.Aptos.Proto.CreateAccountMessage.fromObject(object.createAccount);
3613
4706
  }
4707
+ if (object.nftMessage != null) {
4708
+ if (typeof object.nftMessage !== "object")
4709
+ throw TypeError(".TW.Aptos.Proto.SigningInput.nftMessage: object expected");
4710
+ message.nftMessage = $root.TW.Aptos.Proto.NftMessage.fromObject(object.nftMessage);
4711
+ }
3614
4712
  if (object.maxGasAmount != null)
3615
4713
  if ($util.Long)
3616
4714
  (message.maxGasAmount = $util.Long.fromValue(object.maxGasAmount)).unsigned = true;
@@ -3717,6 +4815,11 @@
3717
4815
  if (options.oneofs)
3718
4816
  object.transactionPayload = "createAccount";
3719
4817
  }
4818
+ if (message.nftMessage != null && message.hasOwnProperty("nftMessage")) {
4819
+ object.nftMessage = $root.TW.Aptos.Proto.NftMessage.toObject(message.nftMessage, options);
4820
+ if (options.oneofs)
4821
+ object.transactionPayload = "nftMessage";
4822
+ }
3720
4823
  if (message.maxGasAmount != null && message.hasOwnProperty("maxGasAmount"))
3721
4824
  if (typeof message.maxGasAmount === "number")
3722
4825
  object.maxGasAmount = options.longs === String ? String(message.maxGasAmount) : message.maxGasAmount;