@trustwallet/wallet-core 3.0.3 → 3.0.4
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.
- package/dist/generated/core_proto.d.ts +358 -0
- package/dist/generated/core_proto.js +991 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/keystore/default-impl.d.ts +19 -0
- package/dist/src/keystore/default-impl.js +127 -0
- package/dist/src/keystore/extension-storage.d.ts +12 -0
- package/dist/src/keystore/extension-storage.js +74 -0
- package/dist/src/keystore/fs-storage.d.ts +10 -0
- package/dist/src/keystore/fs-storage.js +39 -0
- package/dist/src/keystore/index.d.ts +4 -0
- package/dist/src/keystore/index.js +29 -0
- package/dist/src/keystore/types.d.ts +47 -0
- package/dist/src/keystore/types.js +24 -0
- package/dist/{wallet-core.d.ts → src/wallet-core.d.ts} +23 -0
- package/package.json +4 -2
@@ -14725,6 +14725,817 @@
|
|
14725
14725
|
return Transfer;
|
14726
14726
|
})();
|
14727
14727
|
|
14728
|
+
Proto.RegisterStakingKey = (function() {
|
14729
|
+
|
14730
|
+
/**
|
14731
|
+
* Properties of a RegisterStakingKey.
|
14732
|
+
* @memberof TW.Cardano.Proto
|
14733
|
+
* @interface IRegisterStakingKey
|
14734
|
+
* @property {string|null} [stakingAddress] RegisterStakingKey stakingAddress
|
14735
|
+
* @property {Long|null} [depositAmount] RegisterStakingKey depositAmount
|
14736
|
+
*/
|
14737
|
+
|
14738
|
+
/**
|
14739
|
+
* Constructs a new RegisterStakingKey.
|
14740
|
+
* @memberof TW.Cardano.Proto
|
14741
|
+
* @classdesc Represents a RegisterStakingKey.
|
14742
|
+
* @implements IRegisterStakingKey
|
14743
|
+
* @constructor
|
14744
|
+
* @param {TW.Cardano.Proto.IRegisterStakingKey=} [properties] Properties to set
|
14745
|
+
*/
|
14746
|
+
function RegisterStakingKey(properties) {
|
14747
|
+
if (properties)
|
14748
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
14749
|
+
if (properties[keys[i]] != null)
|
14750
|
+
this[keys[i]] = properties[keys[i]];
|
14751
|
+
}
|
14752
|
+
|
14753
|
+
/**
|
14754
|
+
* RegisterStakingKey stakingAddress.
|
14755
|
+
* @member {string} stakingAddress
|
14756
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14757
|
+
* @instance
|
14758
|
+
*/
|
14759
|
+
RegisterStakingKey.prototype.stakingAddress = "";
|
14760
|
+
|
14761
|
+
/**
|
14762
|
+
* RegisterStakingKey depositAmount.
|
14763
|
+
* @member {Long} depositAmount
|
14764
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14765
|
+
* @instance
|
14766
|
+
*/
|
14767
|
+
RegisterStakingKey.prototype.depositAmount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
14768
|
+
|
14769
|
+
/**
|
14770
|
+
* Creates a new RegisterStakingKey instance using the specified properties.
|
14771
|
+
* @function create
|
14772
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14773
|
+
* @static
|
14774
|
+
* @param {TW.Cardano.Proto.IRegisterStakingKey=} [properties] Properties to set
|
14775
|
+
* @returns {TW.Cardano.Proto.RegisterStakingKey} RegisterStakingKey instance
|
14776
|
+
*/
|
14777
|
+
RegisterStakingKey.create = function create(properties) {
|
14778
|
+
return new RegisterStakingKey(properties);
|
14779
|
+
};
|
14780
|
+
|
14781
|
+
/**
|
14782
|
+
* Encodes the specified RegisterStakingKey message. Does not implicitly {@link TW.Cardano.Proto.RegisterStakingKey.verify|verify} messages.
|
14783
|
+
* @function encode
|
14784
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14785
|
+
* @static
|
14786
|
+
* @param {TW.Cardano.Proto.IRegisterStakingKey} message RegisterStakingKey message or plain object to encode
|
14787
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
14788
|
+
* @returns {$protobuf.Writer} Writer
|
14789
|
+
*/
|
14790
|
+
RegisterStakingKey.encode = function encode(message, writer) {
|
14791
|
+
if (!writer)
|
14792
|
+
writer = $Writer.create();
|
14793
|
+
if (message.stakingAddress != null && Object.hasOwnProperty.call(message, "stakingAddress"))
|
14794
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.stakingAddress);
|
14795
|
+
if (message.depositAmount != null && Object.hasOwnProperty.call(message, "depositAmount"))
|
14796
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.depositAmount);
|
14797
|
+
return writer;
|
14798
|
+
};
|
14799
|
+
|
14800
|
+
/**
|
14801
|
+
* Decodes a RegisterStakingKey message from the specified reader or buffer.
|
14802
|
+
* @function decode
|
14803
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14804
|
+
* @static
|
14805
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
14806
|
+
* @param {number} [length] Message length if known beforehand
|
14807
|
+
* @returns {TW.Cardano.Proto.RegisterStakingKey} RegisterStakingKey
|
14808
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
14809
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
14810
|
+
*/
|
14811
|
+
RegisterStakingKey.decode = function decode(reader, length) {
|
14812
|
+
if (!(reader instanceof $Reader))
|
14813
|
+
reader = $Reader.create(reader);
|
14814
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Cardano.Proto.RegisterStakingKey();
|
14815
|
+
while (reader.pos < end) {
|
14816
|
+
var tag = reader.uint32();
|
14817
|
+
switch (tag >>> 3) {
|
14818
|
+
case 1:
|
14819
|
+
message.stakingAddress = reader.string();
|
14820
|
+
break;
|
14821
|
+
case 2:
|
14822
|
+
message.depositAmount = reader.uint64();
|
14823
|
+
break;
|
14824
|
+
default:
|
14825
|
+
reader.skipType(tag & 7);
|
14826
|
+
break;
|
14827
|
+
}
|
14828
|
+
}
|
14829
|
+
return message;
|
14830
|
+
};
|
14831
|
+
|
14832
|
+
/**
|
14833
|
+
* Verifies a RegisterStakingKey message.
|
14834
|
+
* @function verify
|
14835
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14836
|
+
* @static
|
14837
|
+
* @param {Object.<string,*>} message Plain object to verify
|
14838
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
14839
|
+
*/
|
14840
|
+
RegisterStakingKey.verify = function verify(message) {
|
14841
|
+
if (typeof message !== "object" || message === null)
|
14842
|
+
return "object expected";
|
14843
|
+
if (message.stakingAddress != null && message.hasOwnProperty("stakingAddress"))
|
14844
|
+
if (!$util.isString(message.stakingAddress))
|
14845
|
+
return "stakingAddress: string expected";
|
14846
|
+
if (message.depositAmount != null && message.hasOwnProperty("depositAmount"))
|
14847
|
+
if (!$util.isInteger(message.depositAmount) && !(message.depositAmount && $util.isInteger(message.depositAmount.low) && $util.isInteger(message.depositAmount.high)))
|
14848
|
+
return "depositAmount: integer|Long expected";
|
14849
|
+
return null;
|
14850
|
+
};
|
14851
|
+
|
14852
|
+
/**
|
14853
|
+
* Creates a RegisterStakingKey message from a plain object. Also converts values to their respective internal types.
|
14854
|
+
* @function fromObject
|
14855
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14856
|
+
* @static
|
14857
|
+
* @param {Object.<string,*>} object Plain object
|
14858
|
+
* @returns {TW.Cardano.Proto.RegisterStakingKey} RegisterStakingKey
|
14859
|
+
*/
|
14860
|
+
RegisterStakingKey.fromObject = function fromObject(object) {
|
14861
|
+
if (object instanceof $root.TW.Cardano.Proto.RegisterStakingKey)
|
14862
|
+
return object;
|
14863
|
+
var message = new $root.TW.Cardano.Proto.RegisterStakingKey();
|
14864
|
+
if (object.stakingAddress != null)
|
14865
|
+
message.stakingAddress = String(object.stakingAddress);
|
14866
|
+
if (object.depositAmount != null)
|
14867
|
+
if ($util.Long)
|
14868
|
+
(message.depositAmount = $util.Long.fromValue(object.depositAmount)).unsigned = true;
|
14869
|
+
else if (typeof object.depositAmount === "string")
|
14870
|
+
message.depositAmount = parseInt(object.depositAmount, 10);
|
14871
|
+
else if (typeof object.depositAmount === "number")
|
14872
|
+
message.depositAmount = object.depositAmount;
|
14873
|
+
else if (typeof object.depositAmount === "object")
|
14874
|
+
message.depositAmount = new $util.LongBits(object.depositAmount.low >>> 0, object.depositAmount.high >>> 0).toNumber(true);
|
14875
|
+
return message;
|
14876
|
+
};
|
14877
|
+
|
14878
|
+
/**
|
14879
|
+
* Creates a plain object from a RegisterStakingKey message. Also converts values to other types if specified.
|
14880
|
+
* @function toObject
|
14881
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14882
|
+
* @static
|
14883
|
+
* @param {TW.Cardano.Proto.RegisterStakingKey} message RegisterStakingKey
|
14884
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
14885
|
+
* @returns {Object.<string,*>} Plain object
|
14886
|
+
*/
|
14887
|
+
RegisterStakingKey.toObject = function toObject(message, options) {
|
14888
|
+
if (!options)
|
14889
|
+
options = {};
|
14890
|
+
var object = {};
|
14891
|
+
if (options.defaults) {
|
14892
|
+
object.stakingAddress = "";
|
14893
|
+
if ($util.Long) {
|
14894
|
+
var long = new $util.Long(0, 0, true);
|
14895
|
+
object.depositAmount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
14896
|
+
} else
|
14897
|
+
object.depositAmount = options.longs === String ? "0" : 0;
|
14898
|
+
}
|
14899
|
+
if (message.stakingAddress != null && message.hasOwnProperty("stakingAddress"))
|
14900
|
+
object.stakingAddress = message.stakingAddress;
|
14901
|
+
if (message.depositAmount != null && message.hasOwnProperty("depositAmount"))
|
14902
|
+
if (typeof message.depositAmount === "number")
|
14903
|
+
object.depositAmount = options.longs === String ? String(message.depositAmount) : message.depositAmount;
|
14904
|
+
else
|
14905
|
+
object.depositAmount = options.longs === String ? $util.Long.prototype.toString.call(message.depositAmount) : options.longs === Number ? new $util.LongBits(message.depositAmount.low >>> 0, message.depositAmount.high >>> 0).toNumber(true) : message.depositAmount;
|
14906
|
+
return object;
|
14907
|
+
};
|
14908
|
+
|
14909
|
+
/**
|
14910
|
+
* Converts this RegisterStakingKey to JSON.
|
14911
|
+
* @function toJSON
|
14912
|
+
* @memberof TW.Cardano.Proto.RegisterStakingKey
|
14913
|
+
* @instance
|
14914
|
+
* @returns {Object.<string,*>} JSON object
|
14915
|
+
*/
|
14916
|
+
RegisterStakingKey.prototype.toJSON = function toJSON() {
|
14917
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
14918
|
+
};
|
14919
|
+
|
14920
|
+
return RegisterStakingKey;
|
14921
|
+
})();
|
14922
|
+
|
14923
|
+
Proto.DeregisterStakingKey = (function() {
|
14924
|
+
|
14925
|
+
/**
|
14926
|
+
* Properties of a DeregisterStakingKey.
|
14927
|
+
* @memberof TW.Cardano.Proto
|
14928
|
+
* @interface IDeregisterStakingKey
|
14929
|
+
* @property {string|null} [stakingAddress] DeregisterStakingKey stakingAddress
|
14930
|
+
* @property {Long|null} [undepositAmount] DeregisterStakingKey undepositAmount
|
14931
|
+
*/
|
14932
|
+
|
14933
|
+
/**
|
14934
|
+
* Constructs a new DeregisterStakingKey.
|
14935
|
+
* @memberof TW.Cardano.Proto
|
14936
|
+
* @classdesc Represents a DeregisterStakingKey.
|
14937
|
+
* @implements IDeregisterStakingKey
|
14938
|
+
* @constructor
|
14939
|
+
* @param {TW.Cardano.Proto.IDeregisterStakingKey=} [properties] Properties to set
|
14940
|
+
*/
|
14941
|
+
function DeregisterStakingKey(properties) {
|
14942
|
+
if (properties)
|
14943
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
14944
|
+
if (properties[keys[i]] != null)
|
14945
|
+
this[keys[i]] = properties[keys[i]];
|
14946
|
+
}
|
14947
|
+
|
14948
|
+
/**
|
14949
|
+
* DeregisterStakingKey stakingAddress.
|
14950
|
+
* @member {string} stakingAddress
|
14951
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
14952
|
+
* @instance
|
14953
|
+
*/
|
14954
|
+
DeregisterStakingKey.prototype.stakingAddress = "";
|
14955
|
+
|
14956
|
+
/**
|
14957
|
+
* DeregisterStakingKey undepositAmount.
|
14958
|
+
* @member {Long} undepositAmount
|
14959
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
14960
|
+
* @instance
|
14961
|
+
*/
|
14962
|
+
DeregisterStakingKey.prototype.undepositAmount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
14963
|
+
|
14964
|
+
/**
|
14965
|
+
* Creates a new DeregisterStakingKey instance using the specified properties.
|
14966
|
+
* @function create
|
14967
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
14968
|
+
* @static
|
14969
|
+
* @param {TW.Cardano.Proto.IDeregisterStakingKey=} [properties] Properties to set
|
14970
|
+
* @returns {TW.Cardano.Proto.DeregisterStakingKey} DeregisterStakingKey instance
|
14971
|
+
*/
|
14972
|
+
DeregisterStakingKey.create = function create(properties) {
|
14973
|
+
return new DeregisterStakingKey(properties);
|
14974
|
+
};
|
14975
|
+
|
14976
|
+
/**
|
14977
|
+
* Encodes the specified DeregisterStakingKey message. Does not implicitly {@link TW.Cardano.Proto.DeregisterStakingKey.verify|verify} messages.
|
14978
|
+
* @function encode
|
14979
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
14980
|
+
* @static
|
14981
|
+
* @param {TW.Cardano.Proto.IDeregisterStakingKey} message DeregisterStakingKey message or plain object to encode
|
14982
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
14983
|
+
* @returns {$protobuf.Writer} Writer
|
14984
|
+
*/
|
14985
|
+
DeregisterStakingKey.encode = function encode(message, writer) {
|
14986
|
+
if (!writer)
|
14987
|
+
writer = $Writer.create();
|
14988
|
+
if (message.stakingAddress != null && Object.hasOwnProperty.call(message, "stakingAddress"))
|
14989
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.stakingAddress);
|
14990
|
+
if (message.undepositAmount != null && Object.hasOwnProperty.call(message, "undepositAmount"))
|
14991
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.undepositAmount);
|
14992
|
+
return writer;
|
14993
|
+
};
|
14994
|
+
|
14995
|
+
/**
|
14996
|
+
* Decodes a DeregisterStakingKey message from the specified reader or buffer.
|
14997
|
+
* @function decode
|
14998
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
14999
|
+
* @static
|
15000
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15001
|
+
* @param {number} [length] Message length if known beforehand
|
15002
|
+
* @returns {TW.Cardano.Proto.DeregisterStakingKey} DeregisterStakingKey
|
15003
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
15004
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15005
|
+
*/
|
15006
|
+
DeregisterStakingKey.decode = function decode(reader, length) {
|
15007
|
+
if (!(reader instanceof $Reader))
|
15008
|
+
reader = $Reader.create(reader);
|
15009
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Cardano.Proto.DeregisterStakingKey();
|
15010
|
+
while (reader.pos < end) {
|
15011
|
+
var tag = reader.uint32();
|
15012
|
+
switch (tag >>> 3) {
|
15013
|
+
case 1:
|
15014
|
+
message.stakingAddress = reader.string();
|
15015
|
+
break;
|
15016
|
+
case 2:
|
15017
|
+
message.undepositAmount = reader.uint64();
|
15018
|
+
break;
|
15019
|
+
default:
|
15020
|
+
reader.skipType(tag & 7);
|
15021
|
+
break;
|
15022
|
+
}
|
15023
|
+
}
|
15024
|
+
return message;
|
15025
|
+
};
|
15026
|
+
|
15027
|
+
/**
|
15028
|
+
* Verifies a DeregisterStakingKey message.
|
15029
|
+
* @function verify
|
15030
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
15031
|
+
* @static
|
15032
|
+
* @param {Object.<string,*>} message Plain object to verify
|
15033
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
15034
|
+
*/
|
15035
|
+
DeregisterStakingKey.verify = function verify(message) {
|
15036
|
+
if (typeof message !== "object" || message === null)
|
15037
|
+
return "object expected";
|
15038
|
+
if (message.stakingAddress != null && message.hasOwnProperty("stakingAddress"))
|
15039
|
+
if (!$util.isString(message.stakingAddress))
|
15040
|
+
return "stakingAddress: string expected";
|
15041
|
+
if (message.undepositAmount != null && message.hasOwnProperty("undepositAmount"))
|
15042
|
+
if (!$util.isInteger(message.undepositAmount) && !(message.undepositAmount && $util.isInteger(message.undepositAmount.low) && $util.isInteger(message.undepositAmount.high)))
|
15043
|
+
return "undepositAmount: integer|Long expected";
|
15044
|
+
return null;
|
15045
|
+
};
|
15046
|
+
|
15047
|
+
/**
|
15048
|
+
* Creates a DeregisterStakingKey message from a plain object. Also converts values to their respective internal types.
|
15049
|
+
* @function fromObject
|
15050
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
15051
|
+
* @static
|
15052
|
+
* @param {Object.<string,*>} object Plain object
|
15053
|
+
* @returns {TW.Cardano.Proto.DeregisterStakingKey} DeregisterStakingKey
|
15054
|
+
*/
|
15055
|
+
DeregisterStakingKey.fromObject = function fromObject(object) {
|
15056
|
+
if (object instanceof $root.TW.Cardano.Proto.DeregisterStakingKey)
|
15057
|
+
return object;
|
15058
|
+
var message = new $root.TW.Cardano.Proto.DeregisterStakingKey();
|
15059
|
+
if (object.stakingAddress != null)
|
15060
|
+
message.stakingAddress = String(object.stakingAddress);
|
15061
|
+
if (object.undepositAmount != null)
|
15062
|
+
if ($util.Long)
|
15063
|
+
(message.undepositAmount = $util.Long.fromValue(object.undepositAmount)).unsigned = true;
|
15064
|
+
else if (typeof object.undepositAmount === "string")
|
15065
|
+
message.undepositAmount = parseInt(object.undepositAmount, 10);
|
15066
|
+
else if (typeof object.undepositAmount === "number")
|
15067
|
+
message.undepositAmount = object.undepositAmount;
|
15068
|
+
else if (typeof object.undepositAmount === "object")
|
15069
|
+
message.undepositAmount = new $util.LongBits(object.undepositAmount.low >>> 0, object.undepositAmount.high >>> 0).toNumber(true);
|
15070
|
+
return message;
|
15071
|
+
};
|
15072
|
+
|
15073
|
+
/**
|
15074
|
+
* Creates a plain object from a DeregisterStakingKey message. Also converts values to other types if specified.
|
15075
|
+
* @function toObject
|
15076
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
15077
|
+
* @static
|
15078
|
+
* @param {TW.Cardano.Proto.DeregisterStakingKey} message DeregisterStakingKey
|
15079
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
15080
|
+
* @returns {Object.<string,*>} Plain object
|
15081
|
+
*/
|
15082
|
+
DeregisterStakingKey.toObject = function toObject(message, options) {
|
15083
|
+
if (!options)
|
15084
|
+
options = {};
|
15085
|
+
var object = {};
|
15086
|
+
if (options.defaults) {
|
15087
|
+
object.stakingAddress = "";
|
15088
|
+
if ($util.Long) {
|
15089
|
+
var long = new $util.Long(0, 0, true);
|
15090
|
+
object.undepositAmount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
15091
|
+
} else
|
15092
|
+
object.undepositAmount = options.longs === String ? "0" : 0;
|
15093
|
+
}
|
15094
|
+
if (message.stakingAddress != null && message.hasOwnProperty("stakingAddress"))
|
15095
|
+
object.stakingAddress = message.stakingAddress;
|
15096
|
+
if (message.undepositAmount != null && message.hasOwnProperty("undepositAmount"))
|
15097
|
+
if (typeof message.undepositAmount === "number")
|
15098
|
+
object.undepositAmount = options.longs === String ? String(message.undepositAmount) : message.undepositAmount;
|
15099
|
+
else
|
15100
|
+
object.undepositAmount = options.longs === String ? $util.Long.prototype.toString.call(message.undepositAmount) : options.longs === Number ? new $util.LongBits(message.undepositAmount.low >>> 0, message.undepositAmount.high >>> 0).toNumber(true) : message.undepositAmount;
|
15101
|
+
return object;
|
15102
|
+
};
|
15103
|
+
|
15104
|
+
/**
|
15105
|
+
* Converts this DeregisterStakingKey to JSON.
|
15106
|
+
* @function toJSON
|
15107
|
+
* @memberof TW.Cardano.Proto.DeregisterStakingKey
|
15108
|
+
* @instance
|
15109
|
+
* @returns {Object.<string,*>} JSON object
|
15110
|
+
*/
|
15111
|
+
DeregisterStakingKey.prototype.toJSON = function toJSON() {
|
15112
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
15113
|
+
};
|
15114
|
+
|
15115
|
+
return DeregisterStakingKey;
|
15116
|
+
})();
|
15117
|
+
|
15118
|
+
Proto.Delegate = (function() {
|
15119
|
+
|
15120
|
+
/**
|
15121
|
+
* Properties of a Delegate.
|
15122
|
+
* @memberof TW.Cardano.Proto
|
15123
|
+
* @interface IDelegate
|
15124
|
+
* @property {string|null} [stakingAddress] Delegate stakingAddress
|
15125
|
+
* @property {Uint8Array|null} [poolId] Delegate poolId
|
15126
|
+
* @property {Long|null} [depositAmount] Delegate depositAmount
|
15127
|
+
*/
|
15128
|
+
|
15129
|
+
/**
|
15130
|
+
* Constructs a new Delegate.
|
15131
|
+
* @memberof TW.Cardano.Proto
|
15132
|
+
* @classdesc Represents a Delegate.
|
15133
|
+
* @implements IDelegate
|
15134
|
+
* @constructor
|
15135
|
+
* @param {TW.Cardano.Proto.IDelegate=} [properties] Properties to set
|
15136
|
+
*/
|
15137
|
+
function Delegate(properties) {
|
15138
|
+
if (properties)
|
15139
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
15140
|
+
if (properties[keys[i]] != null)
|
15141
|
+
this[keys[i]] = properties[keys[i]];
|
15142
|
+
}
|
15143
|
+
|
15144
|
+
/**
|
15145
|
+
* Delegate stakingAddress.
|
15146
|
+
* @member {string} stakingAddress
|
15147
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15148
|
+
* @instance
|
15149
|
+
*/
|
15150
|
+
Delegate.prototype.stakingAddress = "";
|
15151
|
+
|
15152
|
+
/**
|
15153
|
+
* Delegate poolId.
|
15154
|
+
* @member {Uint8Array} poolId
|
15155
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15156
|
+
* @instance
|
15157
|
+
*/
|
15158
|
+
Delegate.prototype.poolId = $util.newBuffer([]);
|
15159
|
+
|
15160
|
+
/**
|
15161
|
+
* Delegate depositAmount.
|
15162
|
+
* @member {Long} depositAmount
|
15163
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15164
|
+
* @instance
|
15165
|
+
*/
|
15166
|
+
Delegate.prototype.depositAmount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
15167
|
+
|
15168
|
+
/**
|
15169
|
+
* Creates a new Delegate instance using the specified properties.
|
15170
|
+
* @function create
|
15171
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15172
|
+
* @static
|
15173
|
+
* @param {TW.Cardano.Proto.IDelegate=} [properties] Properties to set
|
15174
|
+
* @returns {TW.Cardano.Proto.Delegate} Delegate instance
|
15175
|
+
*/
|
15176
|
+
Delegate.create = function create(properties) {
|
15177
|
+
return new Delegate(properties);
|
15178
|
+
};
|
15179
|
+
|
15180
|
+
/**
|
15181
|
+
* Encodes the specified Delegate message. Does not implicitly {@link TW.Cardano.Proto.Delegate.verify|verify} messages.
|
15182
|
+
* @function encode
|
15183
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15184
|
+
* @static
|
15185
|
+
* @param {TW.Cardano.Proto.IDelegate} message Delegate message or plain object to encode
|
15186
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
15187
|
+
* @returns {$protobuf.Writer} Writer
|
15188
|
+
*/
|
15189
|
+
Delegate.encode = function encode(message, writer) {
|
15190
|
+
if (!writer)
|
15191
|
+
writer = $Writer.create();
|
15192
|
+
if (message.stakingAddress != null && Object.hasOwnProperty.call(message, "stakingAddress"))
|
15193
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.stakingAddress);
|
15194
|
+
if (message.poolId != null && Object.hasOwnProperty.call(message, "poolId"))
|
15195
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.poolId);
|
15196
|
+
if (message.depositAmount != null && Object.hasOwnProperty.call(message, "depositAmount"))
|
15197
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.depositAmount);
|
15198
|
+
return writer;
|
15199
|
+
};
|
15200
|
+
|
15201
|
+
/**
|
15202
|
+
* Decodes a Delegate message from the specified reader or buffer.
|
15203
|
+
* @function decode
|
15204
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15205
|
+
* @static
|
15206
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15207
|
+
* @param {number} [length] Message length if known beforehand
|
15208
|
+
* @returns {TW.Cardano.Proto.Delegate} Delegate
|
15209
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
15210
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15211
|
+
*/
|
15212
|
+
Delegate.decode = function decode(reader, length) {
|
15213
|
+
if (!(reader instanceof $Reader))
|
15214
|
+
reader = $Reader.create(reader);
|
15215
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Cardano.Proto.Delegate();
|
15216
|
+
while (reader.pos < end) {
|
15217
|
+
var tag = reader.uint32();
|
15218
|
+
switch (tag >>> 3) {
|
15219
|
+
case 1:
|
15220
|
+
message.stakingAddress = reader.string();
|
15221
|
+
break;
|
15222
|
+
case 2:
|
15223
|
+
message.poolId = reader.bytes();
|
15224
|
+
break;
|
15225
|
+
case 3:
|
15226
|
+
message.depositAmount = reader.uint64();
|
15227
|
+
break;
|
15228
|
+
default:
|
15229
|
+
reader.skipType(tag & 7);
|
15230
|
+
break;
|
15231
|
+
}
|
15232
|
+
}
|
15233
|
+
return message;
|
15234
|
+
};
|
15235
|
+
|
15236
|
+
/**
|
15237
|
+
* Verifies a Delegate message.
|
15238
|
+
* @function verify
|
15239
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15240
|
+
* @static
|
15241
|
+
* @param {Object.<string,*>} message Plain object to verify
|
15242
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
15243
|
+
*/
|
15244
|
+
Delegate.verify = function verify(message) {
|
15245
|
+
if (typeof message !== "object" || message === null)
|
15246
|
+
return "object expected";
|
15247
|
+
if (message.stakingAddress != null && message.hasOwnProperty("stakingAddress"))
|
15248
|
+
if (!$util.isString(message.stakingAddress))
|
15249
|
+
return "stakingAddress: string expected";
|
15250
|
+
if (message.poolId != null && message.hasOwnProperty("poolId"))
|
15251
|
+
if (!(message.poolId && typeof message.poolId.length === "number" || $util.isString(message.poolId)))
|
15252
|
+
return "poolId: buffer expected";
|
15253
|
+
if (message.depositAmount != null && message.hasOwnProperty("depositAmount"))
|
15254
|
+
if (!$util.isInteger(message.depositAmount) && !(message.depositAmount && $util.isInteger(message.depositAmount.low) && $util.isInteger(message.depositAmount.high)))
|
15255
|
+
return "depositAmount: integer|Long expected";
|
15256
|
+
return null;
|
15257
|
+
};
|
15258
|
+
|
15259
|
+
/**
|
15260
|
+
* Creates a Delegate message from a plain object. Also converts values to their respective internal types.
|
15261
|
+
* @function fromObject
|
15262
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15263
|
+
* @static
|
15264
|
+
* @param {Object.<string,*>} object Plain object
|
15265
|
+
* @returns {TW.Cardano.Proto.Delegate} Delegate
|
15266
|
+
*/
|
15267
|
+
Delegate.fromObject = function fromObject(object) {
|
15268
|
+
if (object instanceof $root.TW.Cardano.Proto.Delegate)
|
15269
|
+
return object;
|
15270
|
+
var message = new $root.TW.Cardano.Proto.Delegate();
|
15271
|
+
if (object.stakingAddress != null)
|
15272
|
+
message.stakingAddress = String(object.stakingAddress);
|
15273
|
+
if (object.poolId != null)
|
15274
|
+
if (typeof object.poolId === "string")
|
15275
|
+
$util.base64.decode(object.poolId, message.poolId = $util.newBuffer($util.base64.length(object.poolId)), 0);
|
15276
|
+
else if (object.poolId.length)
|
15277
|
+
message.poolId = object.poolId;
|
15278
|
+
if (object.depositAmount != null)
|
15279
|
+
if ($util.Long)
|
15280
|
+
(message.depositAmount = $util.Long.fromValue(object.depositAmount)).unsigned = true;
|
15281
|
+
else if (typeof object.depositAmount === "string")
|
15282
|
+
message.depositAmount = parseInt(object.depositAmount, 10);
|
15283
|
+
else if (typeof object.depositAmount === "number")
|
15284
|
+
message.depositAmount = object.depositAmount;
|
15285
|
+
else if (typeof object.depositAmount === "object")
|
15286
|
+
message.depositAmount = new $util.LongBits(object.depositAmount.low >>> 0, object.depositAmount.high >>> 0).toNumber(true);
|
15287
|
+
return message;
|
15288
|
+
};
|
15289
|
+
|
15290
|
+
/**
|
15291
|
+
* Creates a plain object from a Delegate message. Also converts values to other types if specified.
|
15292
|
+
* @function toObject
|
15293
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15294
|
+
* @static
|
15295
|
+
* @param {TW.Cardano.Proto.Delegate} message Delegate
|
15296
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
15297
|
+
* @returns {Object.<string,*>} Plain object
|
15298
|
+
*/
|
15299
|
+
Delegate.toObject = function toObject(message, options) {
|
15300
|
+
if (!options)
|
15301
|
+
options = {};
|
15302
|
+
var object = {};
|
15303
|
+
if (options.defaults) {
|
15304
|
+
object.stakingAddress = "";
|
15305
|
+
if (options.bytes === String)
|
15306
|
+
object.poolId = "";
|
15307
|
+
else {
|
15308
|
+
object.poolId = [];
|
15309
|
+
if (options.bytes !== Array)
|
15310
|
+
object.poolId = $util.newBuffer(object.poolId);
|
15311
|
+
}
|
15312
|
+
if ($util.Long) {
|
15313
|
+
var long = new $util.Long(0, 0, true);
|
15314
|
+
object.depositAmount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
15315
|
+
} else
|
15316
|
+
object.depositAmount = options.longs === String ? "0" : 0;
|
15317
|
+
}
|
15318
|
+
if (message.stakingAddress != null && message.hasOwnProperty("stakingAddress"))
|
15319
|
+
object.stakingAddress = message.stakingAddress;
|
15320
|
+
if (message.poolId != null && message.hasOwnProperty("poolId"))
|
15321
|
+
object.poolId = options.bytes === String ? $util.base64.encode(message.poolId, 0, message.poolId.length) : options.bytes === Array ? Array.prototype.slice.call(message.poolId) : message.poolId;
|
15322
|
+
if (message.depositAmount != null && message.hasOwnProperty("depositAmount"))
|
15323
|
+
if (typeof message.depositAmount === "number")
|
15324
|
+
object.depositAmount = options.longs === String ? String(message.depositAmount) : message.depositAmount;
|
15325
|
+
else
|
15326
|
+
object.depositAmount = options.longs === String ? $util.Long.prototype.toString.call(message.depositAmount) : options.longs === Number ? new $util.LongBits(message.depositAmount.low >>> 0, message.depositAmount.high >>> 0).toNumber(true) : message.depositAmount;
|
15327
|
+
return object;
|
15328
|
+
};
|
15329
|
+
|
15330
|
+
/**
|
15331
|
+
* Converts this Delegate to JSON.
|
15332
|
+
* @function toJSON
|
15333
|
+
* @memberof TW.Cardano.Proto.Delegate
|
15334
|
+
* @instance
|
15335
|
+
* @returns {Object.<string,*>} JSON object
|
15336
|
+
*/
|
15337
|
+
Delegate.prototype.toJSON = function toJSON() {
|
15338
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
15339
|
+
};
|
15340
|
+
|
15341
|
+
return Delegate;
|
15342
|
+
})();
|
15343
|
+
|
15344
|
+
Proto.Withdraw = (function() {
|
15345
|
+
|
15346
|
+
/**
|
15347
|
+
* Properties of a Withdraw.
|
15348
|
+
* @memberof TW.Cardano.Proto
|
15349
|
+
* @interface IWithdraw
|
15350
|
+
* @property {string|null} [stakingAddress] Withdraw stakingAddress
|
15351
|
+
* @property {Long|null} [withdrawAmount] Withdraw withdrawAmount
|
15352
|
+
*/
|
15353
|
+
|
15354
|
+
/**
|
15355
|
+
* Constructs a new Withdraw.
|
15356
|
+
* @memberof TW.Cardano.Proto
|
15357
|
+
* @classdesc Represents a Withdraw.
|
15358
|
+
* @implements IWithdraw
|
15359
|
+
* @constructor
|
15360
|
+
* @param {TW.Cardano.Proto.IWithdraw=} [properties] Properties to set
|
15361
|
+
*/
|
15362
|
+
function Withdraw(properties) {
|
15363
|
+
if (properties)
|
15364
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
15365
|
+
if (properties[keys[i]] != null)
|
15366
|
+
this[keys[i]] = properties[keys[i]];
|
15367
|
+
}
|
15368
|
+
|
15369
|
+
/**
|
15370
|
+
* Withdraw stakingAddress.
|
15371
|
+
* @member {string} stakingAddress
|
15372
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15373
|
+
* @instance
|
15374
|
+
*/
|
15375
|
+
Withdraw.prototype.stakingAddress = "";
|
15376
|
+
|
15377
|
+
/**
|
15378
|
+
* Withdraw withdrawAmount.
|
15379
|
+
* @member {Long} withdrawAmount
|
15380
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15381
|
+
* @instance
|
15382
|
+
*/
|
15383
|
+
Withdraw.prototype.withdrawAmount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
15384
|
+
|
15385
|
+
/**
|
15386
|
+
* Creates a new Withdraw instance using the specified properties.
|
15387
|
+
* @function create
|
15388
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15389
|
+
* @static
|
15390
|
+
* @param {TW.Cardano.Proto.IWithdraw=} [properties] Properties to set
|
15391
|
+
* @returns {TW.Cardano.Proto.Withdraw} Withdraw instance
|
15392
|
+
*/
|
15393
|
+
Withdraw.create = function create(properties) {
|
15394
|
+
return new Withdraw(properties);
|
15395
|
+
};
|
15396
|
+
|
15397
|
+
/**
|
15398
|
+
* Encodes the specified Withdraw message. Does not implicitly {@link TW.Cardano.Proto.Withdraw.verify|verify} messages.
|
15399
|
+
* @function encode
|
15400
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15401
|
+
* @static
|
15402
|
+
* @param {TW.Cardano.Proto.IWithdraw} message Withdraw message or plain object to encode
|
15403
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
15404
|
+
* @returns {$protobuf.Writer} Writer
|
15405
|
+
*/
|
15406
|
+
Withdraw.encode = function encode(message, writer) {
|
15407
|
+
if (!writer)
|
15408
|
+
writer = $Writer.create();
|
15409
|
+
if (message.stakingAddress != null && Object.hasOwnProperty.call(message, "stakingAddress"))
|
15410
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.stakingAddress);
|
15411
|
+
if (message.withdrawAmount != null && Object.hasOwnProperty.call(message, "withdrawAmount"))
|
15412
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.withdrawAmount);
|
15413
|
+
return writer;
|
15414
|
+
};
|
15415
|
+
|
15416
|
+
/**
|
15417
|
+
* Decodes a Withdraw message from the specified reader or buffer.
|
15418
|
+
* @function decode
|
15419
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15420
|
+
* @static
|
15421
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15422
|
+
* @param {number} [length] Message length if known beforehand
|
15423
|
+
* @returns {TW.Cardano.Proto.Withdraw} Withdraw
|
15424
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
15425
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15426
|
+
*/
|
15427
|
+
Withdraw.decode = function decode(reader, length) {
|
15428
|
+
if (!(reader instanceof $Reader))
|
15429
|
+
reader = $Reader.create(reader);
|
15430
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Cardano.Proto.Withdraw();
|
15431
|
+
while (reader.pos < end) {
|
15432
|
+
var tag = reader.uint32();
|
15433
|
+
switch (tag >>> 3) {
|
15434
|
+
case 1:
|
15435
|
+
message.stakingAddress = reader.string();
|
15436
|
+
break;
|
15437
|
+
case 2:
|
15438
|
+
message.withdrawAmount = reader.uint64();
|
15439
|
+
break;
|
15440
|
+
default:
|
15441
|
+
reader.skipType(tag & 7);
|
15442
|
+
break;
|
15443
|
+
}
|
15444
|
+
}
|
15445
|
+
return message;
|
15446
|
+
};
|
15447
|
+
|
15448
|
+
/**
|
15449
|
+
* Verifies a Withdraw message.
|
15450
|
+
* @function verify
|
15451
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15452
|
+
* @static
|
15453
|
+
* @param {Object.<string,*>} message Plain object to verify
|
15454
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
15455
|
+
*/
|
15456
|
+
Withdraw.verify = function verify(message) {
|
15457
|
+
if (typeof message !== "object" || message === null)
|
15458
|
+
return "object expected";
|
15459
|
+
if (message.stakingAddress != null && message.hasOwnProperty("stakingAddress"))
|
15460
|
+
if (!$util.isString(message.stakingAddress))
|
15461
|
+
return "stakingAddress: string expected";
|
15462
|
+
if (message.withdrawAmount != null && message.hasOwnProperty("withdrawAmount"))
|
15463
|
+
if (!$util.isInteger(message.withdrawAmount) && !(message.withdrawAmount && $util.isInteger(message.withdrawAmount.low) && $util.isInteger(message.withdrawAmount.high)))
|
15464
|
+
return "withdrawAmount: integer|Long expected";
|
15465
|
+
return null;
|
15466
|
+
};
|
15467
|
+
|
15468
|
+
/**
|
15469
|
+
* Creates a Withdraw message from a plain object. Also converts values to their respective internal types.
|
15470
|
+
* @function fromObject
|
15471
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15472
|
+
* @static
|
15473
|
+
* @param {Object.<string,*>} object Plain object
|
15474
|
+
* @returns {TW.Cardano.Proto.Withdraw} Withdraw
|
15475
|
+
*/
|
15476
|
+
Withdraw.fromObject = function fromObject(object) {
|
15477
|
+
if (object instanceof $root.TW.Cardano.Proto.Withdraw)
|
15478
|
+
return object;
|
15479
|
+
var message = new $root.TW.Cardano.Proto.Withdraw();
|
15480
|
+
if (object.stakingAddress != null)
|
15481
|
+
message.stakingAddress = String(object.stakingAddress);
|
15482
|
+
if (object.withdrawAmount != null)
|
15483
|
+
if ($util.Long)
|
15484
|
+
(message.withdrawAmount = $util.Long.fromValue(object.withdrawAmount)).unsigned = true;
|
15485
|
+
else if (typeof object.withdrawAmount === "string")
|
15486
|
+
message.withdrawAmount = parseInt(object.withdrawAmount, 10);
|
15487
|
+
else if (typeof object.withdrawAmount === "number")
|
15488
|
+
message.withdrawAmount = object.withdrawAmount;
|
15489
|
+
else if (typeof object.withdrawAmount === "object")
|
15490
|
+
message.withdrawAmount = new $util.LongBits(object.withdrawAmount.low >>> 0, object.withdrawAmount.high >>> 0).toNumber(true);
|
15491
|
+
return message;
|
15492
|
+
};
|
15493
|
+
|
15494
|
+
/**
|
15495
|
+
* Creates a plain object from a Withdraw message. Also converts values to other types if specified.
|
15496
|
+
* @function toObject
|
15497
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15498
|
+
* @static
|
15499
|
+
* @param {TW.Cardano.Proto.Withdraw} message Withdraw
|
15500
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
15501
|
+
* @returns {Object.<string,*>} Plain object
|
15502
|
+
*/
|
15503
|
+
Withdraw.toObject = function toObject(message, options) {
|
15504
|
+
if (!options)
|
15505
|
+
options = {};
|
15506
|
+
var object = {};
|
15507
|
+
if (options.defaults) {
|
15508
|
+
object.stakingAddress = "";
|
15509
|
+
if ($util.Long) {
|
15510
|
+
var long = new $util.Long(0, 0, true);
|
15511
|
+
object.withdrawAmount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
15512
|
+
} else
|
15513
|
+
object.withdrawAmount = options.longs === String ? "0" : 0;
|
15514
|
+
}
|
15515
|
+
if (message.stakingAddress != null && message.hasOwnProperty("stakingAddress"))
|
15516
|
+
object.stakingAddress = message.stakingAddress;
|
15517
|
+
if (message.withdrawAmount != null && message.hasOwnProperty("withdrawAmount"))
|
15518
|
+
if (typeof message.withdrawAmount === "number")
|
15519
|
+
object.withdrawAmount = options.longs === String ? String(message.withdrawAmount) : message.withdrawAmount;
|
15520
|
+
else
|
15521
|
+
object.withdrawAmount = options.longs === String ? $util.Long.prototype.toString.call(message.withdrawAmount) : options.longs === Number ? new $util.LongBits(message.withdrawAmount.low >>> 0, message.withdrawAmount.high >>> 0).toNumber(true) : message.withdrawAmount;
|
15522
|
+
return object;
|
15523
|
+
};
|
15524
|
+
|
15525
|
+
/**
|
15526
|
+
* Converts this Withdraw to JSON.
|
15527
|
+
* @function toJSON
|
15528
|
+
* @memberof TW.Cardano.Proto.Withdraw
|
15529
|
+
* @instance
|
15530
|
+
* @returns {Object.<string,*>} JSON object
|
15531
|
+
*/
|
15532
|
+
Withdraw.prototype.toJSON = function toJSON() {
|
15533
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
15534
|
+
};
|
15535
|
+
|
15536
|
+
return Withdraw;
|
15537
|
+
})();
|
15538
|
+
|
14728
15539
|
Proto.TransactionPlan = (function() {
|
14729
15540
|
|
14730
15541
|
/**
|
@@ -14735,6 +15546,8 @@
|
|
14735
15546
|
* @property {Long|null} [amount] TransactionPlan amount
|
14736
15547
|
* @property {Long|null} [fee] TransactionPlan fee
|
14737
15548
|
* @property {Long|null} [change] TransactionPlan change
|
15549
|
+
* @property {Long|null} [deposit] TransactionPlan deposit
|
15550
|
+
* @property {Long|null} [undeposit] TransactionPlan undeposit
|
14738
15551
|
* @property {Array.<TW.Cardano.Proto.ITokenAmount>|null} [availableTokens] TransactionPlan availableTokens
|
14739
15552
|
* @property {Array.<TW.Cardano.Proto.ITokenAmount>|null} [outputTokens] TransactionPlan outputTokens
|
14740
15553
|
* @property {Array.<TW.Cardano.Proto.ITokenAmount>|null} [changeTokens] TransactionPlan changeTokens
|
@@ -14793,6 +15606,22 @@
|
|
14793
15606
|
*/
|
14794
15607
|
TransactionPlan.prototype.change = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
14795
15608
|
|
15609
|
+
/**
|
15610
|
+
* TransactionPlan deposit.
|
15611
|
+
* @member {Long} deposit
|
15612
|
+
* @memberof TW.Cardano.Proto.TransactionPlan
|
15613
|
+
* @instance
|
15614
|
+
*/
|
15615
|
+
TransactionPlan.prototype.deposit = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
15616
|
+
|
15617
|
+
/**
|
15618
|
+
* TransactionPlan undeposit.
|
15619
|
+
* @member {Long} undeposit
|
15620
|
+
* @memberof TW.Cardano.Proto.TransactionPlan
|
15621
|
+
* @instance
|
15622
|
+
*/
|
15623
|
+
TransactionPlan.prototype.undeposit = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
15624
|
+
|
14796
15625
|
/**
|
14797
15626
|
* TransactionPlan availableTokens.
|
14798
15627
|
* @member {Array.<TW.Cardano.Proto.ITokenAmount>} availableTokens
|
@@ -14879,6 +15708,10 @@
|
|
14879
15708
|
$root.TW.Cardano.Proto.TxInput.encode(message.utxos[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
14880
15709
|
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
14881
15710
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.error);
|
15711
|
+
if (message.deposit != null && Object.hasOwnProperty.call(message, "deposit"))
|
15712
|
+
writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.deposit);
|
15713
|
+
if (message.undeposit != null && Object.hasOwnProperty.call(message, "undeposit"))
|
15714
|
+
writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.undeposit);
|
14882
15715
|
return writer;
|
14883
15716
|
};
|
14884
15717
|
|
@@ -14912,6 +15745,12 @@
|
|
14912
15745
|
case 4:
|
14913
15746
|
message.change = reader.uint64();
|
14914
15747
|
break;
|
15748
|
+
case 10:
|
15749
|
+
message.deposit = reader.uint64();
|
15750
|
+
break;
|
15751
|
+
case 11:
|
15752
|
+
message.undeposit = reader.uint64();
|
15753
|
+
break;
|
14915
15754
|
case 5:
|
14916
15755
|
if (!(message.availableTokens && message.availableTokens.length))
|
14917
15756
|
message.availableTokens = [];
|
@@ -14966,6 +15805,12 @@
|
|
14966
15805
|
if (message.change != null && message.hasOwnProperty("change"))
|
14967
15806
|
if (!$util.isInteger(message.change) && !(message.change && $util.isInteger(message.change.low) && $util.isInteger(message.change.high)))
|
14968
15807
|
return "change: integer|Long expected";
|
15808
|
+
if (message.deposit != null && message.hasOwnProperty("deposit"))
|
15809
|
+
if (!$util.isInteger(message.deposit) && !(message.deposit && $util.isInteger(message.deposit.low) && $util.isInteger(message.deposit.high)))
|
15810
|
+
return "deposit: integer|Long expected";
|
15811
|
+
if (message.undeposit != null && message.hasOwnProperty("undeposit"))
|
15812
|
+
if (!$util.isInteger(message.undeposit) && !(message.undeposit && $util.isInteger(message.undeposit.low) && $util.isInteger(message.undeposit.high)))
|
15813
|
+
return "undeposit: integer|Long expected";
|
14969
15814
|
if (message.availableTokens != null && message.hasOwnProperty("availableTokens")) {
|
14970
15815
|
if (!Array.isArray(message.availableTokens))
|
14971
15816
|
return "availableTokens: array expected";
|
@@ -15083,6 +15928,24 @@
|
|
15083
15928
|
message.change = object.change;
|
15084
15929
|
else if (typeof object.change === "object")
|
15085
15930
|
message.change = new $util.LongBits(object.change.low >>> 0, object.change.high >>> 0).toNumber(true);
|
15931
|
+
if (object.deposit != null)
|
15932
|
+
if ($util.Long)
|
15933
|
+
(message.deposit = $util.Long.fromValue(object.deposit)).unsigned = true;
|
15934
|
+
else if (typeof object.deposit === "string")
|
15935
|
+
message.deposit = parseInt(object.deposit, 10);
|
15936
|
+
else if (typeof object.deposit === "number")
|
15937
|
+
message.deposit = object.deposit;
|
15938
|
+
else if (typeof object.deposit === "object")
|
15939
|
+
message.deposit = new $util.LongBits(object.deposit.low >>> 0, object.deposit.high >>> 0).toNumber(true);
|
15940
|
+
if (object.undeposit != null)
|
15941
|
+
if ($util.Long)
|
15942
|
+
(message.undeposit = $util.Long.fromValue(object.undeposit)).unsigned = true;
|
15943
|
+
else if (typeof object.undeposit === "string")
|
15944
|
+
message.undeposit = parseInt(object.undeposit, 10);
|
15945
|
+
else if (typeof object.undeposit === "number")
|
15946
|
+
message.undeposit = object.undeposit;
|
15947
|
+
else if (typeof object.undeposit === "object")
|
15948
|
+
message.undeposit = new $util.LongBits(object.undeposit.low >>> 0, object.undeposit.high >>> 0).toNumber(true);
|
15086
15949
|
if (object.availableTokens) {
|
15087
15950
|
if (!Array.isArray(object.availableTokens))
|
15088
15951
|
throw TypeError(".TW.Cardano.Proto.TransactionPlan.availableTokens: array expected");
|
@@ -15265,6 +16128,16 @@
|
|
15265
16128
|
} else
|
15266
16129
|
object.change = options.longs === String ? "0" : 0;
|
15267
16130
|
object.error = options.enums === String ? "OK" : 0;
|
16131
|
+
if ($util.Long) {
|
16132
|
+
var long = new $util.Long(0, 0, true);
|
16133
|
+
object.deposit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
16134
|
+
} else
|
16135
|
+
object.deposit = options.longs === String ? "0" : 0;
|
16136
|
+
if ($util.Long) {
|
16137
|
+
var long = new $util.Long(0, 0, true);
|
16138
|
+
object.undeposit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
16139
|
+
} else
|
16140
|
+
object.undeposit = options.longs === String ? "0" : 0;
|
15268
16141
|
}
|
15269
16142
|
if (message.availableAmount != null && message.hasOwnProperty("availableAmount"))
|
15270
16143
|
if (typeof message.availableAmount === "number")
|
@@ -15308,6 +16181,16 @@
|
|
15308
16181
|
}
|
15309
16182
|
if (message.error != null && message.hasOwnProperty("error"))
|
15310
16183
|
object.error = options.enums === String ? $root.TW.Common.Proto.SigningError[message.error] : message.error;
|
16184
|
+
if (message.deposit != null && message.hasOwnProperty("deposit"))
|
16185
|
+
if (typeof message.deposit === "number")
|
16186
|
+
object.deposit = options.longs === String ? String(message.deposit) : message.deposit;
|
16187
|
+
else
|
16188
|
+
object.deposit = options.longs === String ? $util.Long.prototype.toString.call(message.deposit) : options.longs === Number ? new $util.LongBits(message.deposit.low >>> 0, message.deposit.high >>> 0).toNumber(true) : message.deposit;
|
16189
|
+
if (message.undeposit != null && message.hasOwnProperty("undeposit"))
|
16190
|
+
if (typeof message.undeposit === "number")
|
16191
|
+
object.undeposit = options.longs === String ? String(message.undeposit) : message.undeposit;
|
16192
|
+
else
|
16193
|
+
object.undeposit = options.longs === String ? $util.Long.prototype.toString.call(message.undeposit) : options.longs === Number ? new $util.LongBits(message.undeposit.low >>> 0, message.undeposit.high >>> 0).toNumber(true) : message.undeposit;
|
15311
16194
|
return object;
|
15312
16195
|
};
|
15313
16196
|
|
@@ -15334,6 +16217,10 @@
|
|
15334
16217
|
* @property {Array.<TW.Cardano.Proto.ITxInput>|null} [utxos] SigningInput utxos
|
15335
16218
|
* @property {Array.<Uint8Array>|null} [privateKey] SigningInput privateKey
|
15336
16219
|
* @property {TW.Cardano.Proto.ITransfer|null} [transferMessage] SigningInput transferMessage
|
16220
|
+
* @property {TW.Cardano.Proto.IRegisterStakingKey|null} [registerStakingKey] SigningInput registerStakingKey
|
16221
|
+
* @property {TW.Cardano.Proto.IDelegate|null} [delegate] SigningInput delegate
|
16222
|
+
* @property {TW.Cardano.Proto.IWithdraw|null} [withdraw] SigningInput withdraw
|
16223
|
+
* @property {TW.Cardano.Proto.IDeregisterStakingKey|null} [deregisterStakingKey] SigningInput deregisterStakingKey
|
15337
16224
|
* @property {Long|null} [ttl] SigningInput ttl
|
15338
16225
|
* @property {TW.Cardano.Proto.ITransactionPlan|null} [plan] SigningInput plan
|
15339
16226
|
*/
|
@@ -15379,6 +16266,38 @@
|
|
15379
16266
|
*/
|
15380
16267
|
SigningInput.prototype.transferMessage = null;
|
15381
16268
|
|
16269
|
+
/**
|
16270
|
+
* SigningInput registerStakingKey.
|
16271
|
+
* @member {TW.Cardano.Proto.IRegisterStakingKey|null|undefined} registerStakingKey
|
16272
|
+
* @memberof TW.Cardano.Proto.SigningInput
|
16273
|
+
* @instance
|
16274
|
+
*/
|
16275
|
+
SigningInput.prototype.registerStakingKey = null;
|
16276
|
+
|
16277
|
+
/**
|
16278
|
+
* SigningInput delegate.
|
16279
|
+
* @member {TW.Cardano.Proto.IDelegate|null|undefined} delegate
|
16280
|
+
* @memberof TW.Cardano.Proto.SigningInput
|
16281
|
+
* @instance
|
16282
|
+
*/
|
16283
|
+
SigningInput.prototype.delegate = null;
|
16284
|
+
|
16285
|
+
/**
|
16286
|
+
* SigningInput withdraw.
|
16287
|
+
* @member {TW.Cardano.Proto.IWithdraw|null|undefined} withdraw
|
16288
|
+
* @memberof TW.Cardano.Proto.SigningInput
|
16289
|
+
* @instance
|
16290
|
+
*/
|
16291
|
+
SigningInput.prototype.withdraw = null;
|
16292
|
+
|
16293
|
+
/**
|
16294
|
+
* SigningInput deregisterStakingKey.
|
16295
|
+
* @member {TW.Cardano.Proto.IDeregisterStakingKey|null|undefined} deregisterStakingKey
|
16296
|
+
* @memberof TW.Cardano.Proto.SigningInput
|
16297
|
+
* @instance
|
16298
|
+
*/
|
16299
|
+
SigningInput.prototype.deregisterStakingKey = null;
|
16300
|
+
|
15382
16301
|
/**
|
15383
16302
|
* SigningInput ttl.
|
15384
16303
|
* @member {Long} ttl
|
@@ -15431,6 +16350,14 @@
|
|
15431
16350
|
writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.ttl);
|
15432
16351
|
if (message.plan != null && Object.hasOwnProperty.call(message, "plan"))
|
15433
16352
|
$root.TW.Cardano.Proto.TransactionPlan.encode(message.plan, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
16353
|
+
if (message.registerStakingKey != null && Object.hasOwnProperty.call(message, "registerStakingKey"))
|
16354
|
+
$root.TW.Cardano.Proto.RegisterStakingKey.encode(message.registerStakingKey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
16355
|
+
if (message.delegate != null && Object.hasOwnProperty.call(message, "delegate"))
|
16356
|
+
$root.TW.Cardano.Proto.Delegate.encode(message.delegate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
16357
|
+
if (message.withdraw != null && Object.hasOwnProperty.call(message, "withdraw"))
|
16358
|
+
$root.TW.Cardano.Proto.Withdraw.encode(message.withdraw, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
16359
|
+
if (message.deregisterStakingKey != null && Object.hasOwnProperty.call(message, "deregisterStakingKey"))
|
16360
|
+
$root.TW.Cardano.Proto.DeregisterStakingKey.encode(message.deregisterStakingKey, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
15434
16361
|
return writer;
|
15435
16362
|
};
|
15436
16363
|
|
@@ -15465,6 +16392,18 @@
|
|
15465
16392
|
case 3:
|
15466
16393
|
message.transferMessage = $root.TW.Cardano.Proto.Transfer.decode(reader, reader.uint32());
|
15467
16394
|
break;
|
16395
|
+
case 6:
|
16396
|
+
message.registerStakingKey = $root.TW.Cardano.Proto.RegisterStakingKey.decode(reader, reader.uint32());
|
16397
|
+
break;
|
16398
|
+
case 7:
|
16399
|
+
message.delegate = $root.TW.Cardano.Proto.Delegate.decode(reader, reader.uint32());
|
16400
|
+
break;
|
16401
|
+
case 8:
|
16402
|
+
message.withdraw = $root.TW.Cardano.Proto.Withdraw.decode(reader, reader.uint32());
|
16403
|
+
break;
|
16404
|
+
case 9:
|
16405
|
+
message.deregisterStakingKey = $root.TW.Cardano.Proto.DeregisterStakingKey.decode(reader, reader.uint32());
|
16406
|
+
break;
|
15468
16407
|
case 4:
|
15469
16408
|
message.ttl = reader.uint64();
|
15470
16409
|
break;
|
@@ -15511,6 +16450,26 @@
|
|
15511
16450
|
if (error)
|
15512
16451
|
return "transferMessage." + error;
|
15513
16452
|
}
|
16453
|
+
if (message.registerStakingKey != null && message.hasOwnProperty("registerStakingKey")) {
|
16454
|
+
var error = $root.TW.Cardano.Proto.RegisterStakingKey.verify(message.registerStakingKey);
|
16455
|
+
if (error)
|
16456
|
+
return "registerStakingKey." + error;
|
16457
|
+
}
|
16458
|
+
if (message.delegate != null && message.hasOwnProperty("delegate")) {
|
16459
|
+
var error = $root.TW.Cardano.Proto.Delegate.verify(message.delegate);
|
16460
|
+
if (error)
|
16461
|
+
return "delegate." + error;
|
16462
|
+
}
|
16463
|
+
if (message.withdraw != null && message.hasOwnProperty("withdraw")) {
|
16464
|
+
var error = $root.TW.Cardano.Proto.Withdraw.verify(message.withdraw);
|
16465
|
+
if (error)
|
16466
|
+
return "withdraw." + error;
|
16467
|
+
}
|
16468
|
+
if (message.deregisterStakingKey != null && message.hasOwnProperty("deregisterStakingKey")) {
|
16469
|
+
var error = $root.TW.Cardano.Proto.DeregisterStakingKey.verify(message.deregisterStakingKey);
|
16470
|
+
if (error)
|
16471
|
+
return "deregisterStakingKey." + error;
|
16472
|
+
}
|
15514
16473
|
if (message.ttl != null && message.hasOwnProperty("ttl"))
|
15515
16474
|
if (!$util.isInteger(message.ttl) && !(message.ttl && $util.isInteger(message.ttl.low) && $util.isInteger(message.ttl.high)))
|
15516
16475
|
return "ttl: integer|Long expected";
|
@@ -15559,6 +16518,26 @@
|
|
15559
16518
|
throw TypeError(".TW.Cardano.Proto.SigningInput.transferMessage: object expected");
|
15560
16519
|
message.transferMessage = $root.TW.Cardano.Proto.Transfer.fromObject(object.transferMessage);
|
15561
16520
|
}
|
16521
|
+
if (object.registerStakingKey != null) {
|
16522
|
+
if (typeof object.registerStakingKey !== "object")
|
16523
|
+
throw TypeError(".TW.Cardano.Proto.SigningInput.registerStakingKey: object expected");
|
16524
|
+
message.registerStakingKey = $root.TW.Cardano.Proto.RegisterStakingKey.fromObject(object.registerStakingKey);
|
16525
|
+
}
|
16526
|
+
if (object.delegate != null) {
|
16527
|
+
if (typeof object.delegate !== "object")
|
16528
|
+
throw TypeError(".TW.Cardano.Proto.SigningInput.delegate: object expected");
|
16529
|
+
message.delegate = $root.TW.Cardano.Proto.Delegate.fromObject(object.delegate);
|
16530
|
+
}
|
16531
|
+
if (object.withdraw != null) {
|
16532
|
+
if (typeof object.withdraw !== "object")
|
16533
|
+
throw TypeError(".TW.Cardano.Proto.SigningInput.withdraw: object expected");
|
16534
|
+
message.withdraw = $root.TW.Cardano.Proto.Withdraw.fromObject(object.withdraw);
|
16535
|
+
}
|
16536
|
+
if (object.deregisterStakingKey != null) {
|
16537
|
+
if (typeof object.deregisterStakingKey !== "object")
|
16538
|
+
throw TypeError(".TW.Cardano.Proto.SigningInput.deregisterStakingKey: object expected");
|
16539
|
+
message.deregisterStakingKey = $root.TW.Cardano.Proto.DeregisterStakingKey.fromObject(object.deregisterStakingKey);
|
16540
|
+
}
|
15562
16541
|
if (object.ttl != null)
|
15563
16542
|
if ($util.Long)
|
15564
16543
|
(message.ttl = $util.Long.fromValue(object.ttl)).unsigned = true;
|
@@ -15601,6 +16580,10 @@
|
|
15601
16580
|
} else
|
15602
16581
|
object.ttl = options.longs === String ? "0" : 0;
|
15603
16582
|
object.plan = null;
|
16583
|
+
object.registerStakingKey = null;
|
16584
|
+
object.delegate = null;
|
16585
|
+
object.withdraw = null;
|
16586
|
+
object.deregisterStakingKey = null;
|
15604
16587
|
}
|
15605
16588
|
if (message.utxos && message.utxos.length) {
|
15606
16589
|
object.utxos = [];
|
@@ -15621,6 +16604,14 @@
|
|
15621
16604
|
object.ttl = options.longs === String ? $util.Long.prototype.toString.call(message.ttl) : options.longs === Number ? new $util.LongBits(message.ttl.low >>> 0, message.ttl.high >>> 0).toNumber(true) : message.ttl;
|
15622
16605
|
if (message.plan != null && message.hasOwnProperty("plan"))
|
15623
16606
|
object.plan = $root.TW.Cardano.Proto.TransactionPlan.toObject(message.plan, options);
|
16607
|
+
if (message.registerStakingKey != null && message.hasOwnProperty("registerStakingKey"))
|
16608
|
+
object.registerStakingKey = $root.TW.Cardano.Proto.RegisterStakingKey.toObject(message.registerStakingKey, options);
|
16609
|
+
if (message.delegate != null && message.hasOwnProperty("delegate"))
|
16610
|
+
object.delegate = $root.TW.Cardano.Proto.Delegate.toObject(message.delegate, options);
|
16611
|
+
if (message.withdraw != null && message.hasOwnProperty("withdraw"))
|
16612
|
+
object.withdraw = $root.TW.Cardano.Proto.Withdraw.toObject(message.withdraw, options);
|
16613
|
+
if (message.deregisterStakingKey != null && message.hasOwnProperty("deregisterStakingKey"))
|
16614
|
+
object.deregisterStakingKey = $root.TW.Cardano.Proto.DeregisterStakingKey.toObject(message.deregisterStakingKey, options);
|
15624
16615
|
return object;
|
15625
16616
|
};
|
15626
16617
|
|