@trustwallet/wallet-core 4.2.0 → 4.2.1-hot-fix
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.
| @@ -1268,6 +1268,91 @@ export namespace TW { | |
| 1268 1268 | 
             
                            public toJSON(): { [k: string]: any };
         | 
| 1269 1269 | 
             
                        }
         | 
| 1270 1270 |  | 
| 1271 | 
            +
                        /** Properties of a FungibleAssetTransferMessage. */
         | 
| 1272 | 
            +
                        interface IFungibleAssetTransferMessage {
         | 
| 1273 | 
            +
             | 
| 1274 | 
            +
                            /** FungibleAssetTransferMessage metadataAddress */
         | 
| 1275 | 
            +
                            metadataAddress?: (string|null);
         | 
| 1276 | 
            +
             | 
| 1277 | 
            +
                            /** FungibleAssetTransferMessage to */
         | 
| 1278 | 
            +
                            to?: (string|null);
         | 
| 1279 | 
            +
             | 
| 1280 | 
            +
                            /** FungibleAssetTransferMessage amount */
         | 
| 1281 | 
            +
                            amount?: (Long|null);
         | 
| 1282 | 
            +
                        }
         | 
| 1283 | 
            +
             | 
| 1284 | 
            +
                        /** Represents a FungibleAssetTransferMessage. */
         | 
| 1285 | 
            +
                        class FungibleAssetTransferMessage implements IFungibleAssetTransferMessage {
         | 
| 1286 | 
            +
             | 
| 1287 | 
            +
                            /**
         | 
| 1288 | 
            +
                             * Constructs a new FungibleAssetTransferMessage.
         | 
| 1289 | 
            +
                             * @param [properties] Properties to set
         | 
| 1290 | 
            +
                             */
         | 
| 1291 | 
            +
                            constructor(properties?: TW.Aptos.Proto.IFungibleAssetTransferMessage);
         | 
| 1292 | 
            +
             | 
| 1293 | 
            +
                            /** FungibleAssetTransferMessage metadataAddress. */
         | 
| 1294 | 
            +
                            public metadataAddress: string;
         | 
| 1295 | 
            +
             | 
| 1296 | 
            +
                            /** FungibleAssetTransferMessage to. */
         | 
| 1297 | 
            +
                            public to: string;
         | 
| 1298 | 
            +
             | 
| 1299 | 
            +
                            /** FungibleAssetTransferMessage amount. */
         | 
| 1300 | 
            +
                            public amount: Long;
         | 
| 1301 | 
            +
             | 
| 1302 | 
            +
                            /**
         | 
| 1303 | 
            +
                             * Creates a new FungibleAssetTransferMessage instance using the specified properties.
         | 
| 1304 | 
            +
                             * @param [properties] Properties to set
         | 
| 1305 | 
            +
                             * @returns FungibleAssetTransferMessage instance
         | 
| 1306 | 
            +
                             */
         | 
| 1307 | 
            +
                            public static create(properties?: TW.Aptos.Proto.IFungibleAssetTransferMessage): TW.Aptos.Proto.FungibleAssetTransferMessage;
         | 
| 1308 | 
            +
             | 
| 1309 | 
            +
                            /**
         | 
| 1310 | 
            +
                             * Encodes the specified FungibleAssetTransferMessage message. Does not implicitly {@link TW.Aptos.Proto.FungibleAssetTransferMessage.verify|verify} messages.
         | 
| 1311 | 
            +
                             * @param message FungibleAssetTransferMessage message or plain object to encode
         | 
| 1312 | 
            +
                             * @param [writer] Writer to encode to
         | 
| 1313 | 
            +
                             * @returns Writer
         | 
| 1314 | 
            +
                             */
         | 
| 1315 | 
            +
                            public static encode(message: TW.Aptos.Proto.IFungibleAssetTransferMessage, writer?: $protobuf.Writer): $protobuf.Writer;
         | 
| 1316 | 
            +
             | 
| 1317 | 
            +
                            /**
         | 
| 1318 | 
            +
                             * Decodes a FungibleAssetTransferMessage message from the specified reader or buffer.
         | 
| 1319 | 
            +
                             * @param reader Reader or buffer to decode from
         | 
| 1320 | 
            +
                             * @param [length] Message length if known beforehand
         | 
| 1321 | 
            +
                             * @returns FungibleAssetTransferMessage
         | 
| 1322 | 
            +
                             * @throws {Error} If the payload is not a reader or valid buffer
         | 
| 1323 | 
            +
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
         | 
| 1324 | 
            +
                             */
         | 
| 1325 | 
            +
                            public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Aptos.Proto.FungibleAssetTransferMessage;
         | 
| 1326 | 
            +
             | 
| 1327 | 
            +
                            /**
         | 
| 1328 | 
            +
                             * Verifies a FungibleAssetTransferMessage message.
         | 
| 1329 | 
            +
                             * @param message Plain object to verify
         | 
| 1330 | 
            +
                             * @returns `null` if valid, otherwise the reason why it is not
         | 
| 1331 | 
            +
                             */
         | 
| 1332 | 
            +
                            public static verify(message: { [k: string]: any }): (string|null);
         | 
| 1333 | 
            +
             | 
| 1334 | 
            +
                            /**
         | 
| 1335 | 
            +
                             * Creates a FungibleAssetTransferMessage message from a plain object. Also converts values to their respective internal types.
         | 
| 1336 | 
            +
                             * @param object Plain object
         | 
| 1337 | 
            +
                             * @returns FungibleAssetTransferMessage
         | 
| 1338 | 
            +
                             */
         | 
| 1339 | 
            +
                            public static fromObject(object: { [k: string]: any }): TW.Aptos.Proto.FungibleAssetTransferMessage;
         | 
| 1340 | 
            +
             | 
| 1341 | 
            +
                            /**
         | 
| 1342 | 
            +
                             * Creates a plain object from a FungibleAssetTransferMessage message. Also converts values to other types if specified.
         | 
| 1343 | 
            +
                             * @param message FungibleAssetTransferMessage
         | 
| 1344 | 
            +
                             * @param [options] Conversion options
         | 
| 1345 | 
            +
                             * @returns Plain object
         | 
| 1346 | 
            +
                             */
         | 
| 1347 | 
            +
                            public static toObject(message: TW.Aptos.Proto.FungibleAssetTransferMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
         | 
| 1348 | 
            +
             | 
| 1349 | 
            +
                            /**
         | 
| 1350 | 
            +
                             * Converts this FungibleAssetTransferMessage to JSON.
         | 
| 1351 | 
            +
                             * @returns JSON object
         | 
| 1352 | 
            +
                             */
         | 
| 1353 | 
            +
                            public toJSON(): { [k: string]: any };
         | 
| 1354 | 
            +
                        }
         | 
| 1355 | 
            +
             | 
| 1271 1356 | 
             
                        /** Properties of a ManagedTokensRegisterMessage. */
         | 
| 1272 1357 | 
             
                        interface IManagedTokensRegisterMessage {
         | 
| 1273 1358 |  | 
| @@ -2159,6 +2244,12 @@ export namespace TW { | |
| 2159 2244 |  | 
| 2160 2245 | 
             
                            /** SigningInput tokenTransferCoins */
         | 
| 2161 2246 | 
             
                            tokenTransferCoins?: (TW.Aptos.Proto.ITokenTransferCoinsMessage|null);
         | 
| 2247 | 
            +
             | 
| 2248 | 
            +
                            /** SigningInput fungibleAssetTransfer */
         | 
| 2249 | 
            +
                            fungibleAssetTransfer?: (TW.Aptos.Proto.IFungibleAssetTransferMessage|null);
         | 
| 2250 | 
            +
             | 
| 2251 | 
            +
                            /** SigningInput abi */
         | 
| 2252 | 
            +
                            abi?: (string|null);
         | 
| 2162 2253 | 
             
                        }
         | 
| 2163 2254 |  | 
| 2164 2255 | 
             
                        /** Represents a SigningInput. */
         | 
| @@ -2215,8 +2306,14 @@ export namespace TW { | |
| 2215 2306 | 
             
                            /** SigningInput tokenTransferCoins. */
         | 
| 2216 2307 | 
             
                            public tokenTransferCoins?: (TW.Aptos.Proto.ITokenTransferCoinsMessage|null);
         | 
| 2217 2308 |  | 
| 2309 | 
            +
                            /** SigningInput fungibleAssetTransfer. */
         | 
| 2310 | 
            +
                            public fungibleAssetTransfer?: (TW.Aptos.Proto.IFungibleAssetTransferMessage|null);
         | 
| 2311 | 
            +
             | 
| 2312 | 
            +
                            /** SigningInput abi. */
         | 
| 2313 | 
            +
                            public abi: string;
         | 
| 2314 | 
            +
             | 
| 2218 2315 | 
             
                            /** SigningInput transactionPayload. */
         | 
| 2219 | 
            -
                            public transactionPayload?: ("transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"registerToken"|"liquidStakingMessage"|"tokenTransferCoins");
         | 
| 2316 | 
            +
                            public transactionPayload?: ("transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"registerToken"|"liquidStakingMessage"|"tokenTransferCoins"|"fungibleAssetTransfer");
         | 
| 2220 2317 |  | 
| 2221 2318 | 
             
                            /**
         | 
| 2222 2319 | 
             
                             * Creates a new SigningInput instance using the specified properties.
         | 
| @@ -3820,6 +3820,223 @@ | |
| 3820 3820 | 
             
                                return TokenTransferCoinsMessage;
         | 
| 3821 3821 | 
             
                            })();
         | 
| 3822 3822 |  | 
| 3823 | 
            +
                            Proto.FungibleAssetTransferMessage = (function() {
         | 
| 3824 | 
            +
                
         | 
| 3825 | 
            +
                                /**
         | 
| 3826 | 
            +
                                 * Properties of a FungibleAssetTransferMessage.
         | 
| 3827 | 
            +
                                 * @memberof TW.Aptos.Proto
         | 
| 3828 | 
            +
                                 * @interface IFungibleAssetTransferMessage
         | 
| 3829 | 
            +
                                 * @property {string|null} [metadataAddress] FungibleAssetTransferMessage metadataAddress
         | 
| 3830 | 
            +
                                 * @property {string|null} [to] FungibleAssetTransferMessage to
         | 
| 3831 | 
            +
                                 * @property {Long|null} [amount] FungibleAssetTransferMessage amount
         | 
| 3832 | 
            +
                                 */
         | 
| 3833 | 
            +
                
         | 
| 3834 | 
            +
                                /**
         | 
| 3835 | 
            +
                                 * Constructs a new FungibleAssetTransferMessage.
         | 
| 3836 | 
            +
                                 * @memberof TW.Aptos.Proto
         | 
| 3837 | 
            +
                                 * @classdesc Represents a FungibleAssetTransferMessage.
         | 
| 3838 | 
            +
                                 * @implements IFungibleAssetTransferMessage
         | 
| 3839 | 
            +
                                 * @constructor
         | 
| 3840 | 
            +
                                 * @param {TW.Aptos.Proto.IFungibleAssetTransferMessage=} [properties] Properties to set
         | 
| 3841 | 
            +
                                 */
         | 
| 3842 | 
            +
                                function FungibleAssetTransferMessage(properties) {
         | 
| 3843 | 
            +
                                    if (properties)
         | 
| 3844 | 
            +
                                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
         | 
| 3845 | 
            +
                                            if (properties[keys[i]] != null)
         | 
| 3846 | 
            +
                                                this[keys[i]] = properties[keys[i]];
         | 
| 3847 | 
            +
                                }
         | 
| 3848 | 
            +
                
         | 
| 3849 | 
            +
                                /**
         | 
| 3850 | 
            +
                                 * FungibleAssetTransferMessage metadataAddress.
         | 
| 3851 | 
            +
                                 * @member {string} metadataAddress
         | 
| 3852 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3853 | 
            +
                                 * @instance
         | 
| 3854 | 
            +
                                 */
         | 
| 3855 | 
            +
                                FungibleAssetTransferMessage.prototype.metadataAddress = "";
         | 
| 3856 | 
            +
                
         | 
| 3857 | 
            +
                                /**
         | 
| 3858 | 
            +
                                 * FungibleAssetTransferMessage to.
         | 
| 3859 | 
            +
                                 * @member {string} to
         | 
| 3860 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3861 | 
            +
                                 * @instance
         | 
| 3862 | 
            +
                                 */
         | 
| 3863 | 
            +
                                FungibleAssetTransferMessage.prototype.to = "";
         | 
| 3864 | 
            +
                
         | 
| 3865 | 
            +
                                /**
         | 
| 3866 | 
            +
                                 * FungibleAssetTransferMessage amount.
         | 
| 3867 | 
            +
                                 * @member {Long} amount
         | 
| 3868 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3869 | 
            +
                                 * @instance
         | 
| 3870 | 
            +
                                 */
         | 
| 3871 | 
            +
                                FungibleAssetTransferMessage.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
         | 
| 3872 | 
            +
                
         | 
| 3873 | 
            +
                                /**
         | 
| 3874 | 
            +
                                 * Creates a new FungibleAssetTransferMessage instance using the specified properties.
         | 
| 3875 | 
            +
                                 * @function create
         | 
| 3876 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3877 | 
            +
                                 * @static
         | 
| 3878 | 
            +
                                 * @param {TW.Aptos.Proto.IFungibleAssetTransferMessage=} [properties] Properties to set
         | 
| 3879 | 
            +
                                 * @returns {TW.Aptos.Proto.FungibleAssetTransferMessage} FungibleAssetTransferMessage instance
         | 
| 3880 | 
            +
                                 */
         | 
| 3881 | 
            +
                                FungibleAssetTransferMessage.create = function create(properties) {
         | 
| 3882 | 
            +
                                    return new FungibleAssetTransferMessage(properties);
         | 
| 3883 | 
            +
                                };
         | 
| 3884 | 
            +
                
         | 
| 3885 | 
            +
                                /**
         | 
| 3886 | 
            +
                                 * Encodes the specified FungibleAssetTransferMessage message. Does not implicitly {@link TW.Aptos.Proto.FungibleAssetTransferMessage.verify|verify} messages.
         | 
| 3887 | 
            +
                                 * @function encode
         | 
| 3888 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3889 | 
            +
                                 * @static
         | 
| 3890 | 
            +
                                 * @param {TW.Aptos.Proto.IFungibleAssetTransferMessage} message FungibleAssetTransferMessage message or plain object to encode
         | 
| 3891 | 
            +
                                 * @param {$protobuf.Writer} [writer] Writer to encode to
         | 
| 3892 | 
            +
                                 * @returns {$protobuf.Writer} Writer
         | 
| 3893 | 
            +
                                 */
         | 
| 3894 | 
            +
                                FungibleAssetTransferMessage.encode = function encode(message, writer) {
         | 
| 3895 | 
            +
                                    if (!writer)
         | 
| 3896 | 
            +
                                        writer = $Writer.create();
         | 
| 3897 | 
            +
                                    if (message.metadataAddress != null && Object.hasOwnProperty.call(message, "metadataAddress"))
         | 
| 3898 | 
            +
                                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.metadataAddress);
         | 
| 3899 | 
            +
                                    if (message.to != null && Object.hasOwnProperty.call(message, "to"))
         | 
| 3900 | 
            +
                                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.to);
         | 
| 3901 | 
            +
                                    if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
         | 
| 3902 | 
            +
                                        writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.amount);
         | 
| 3903 | 
            +
                                    return writer;
         | 
| 3904 | 
            +
                                };
         | 
| 3905 | 
            +
                
         | 
| 3906 | 
            +
                                /**
         | 
| 3907 | 
            +
                                 * Decodes a FungibleAssetTransferMessage message from the specified reader or buffer.
         | 
| 3908 | 
            +
                                 * @function decode
         | 
| 3909 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3910 | 
            +
                                 * @static
         | 
| 3911 | 
            +
                                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         | 
| 3912 | 
            +
                                 * @param {number} [length] Message length if known beforehand
         | 
| 3913 | 
            +
                                 * @returns {TW.Aptos.Proto.FungibleAssetTransferMessage} FungibleAssetTransferMessage
         | 
| 3914 | 
            +
                                 * @throws {Error} If the payload is not a reader or valid buffer
         | 
| 3915 | 
            +
                                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
         | 
| 3916 | 
            +
                                 */
         | 
| 3917 | 
            +
                                FungibleAssetTransferMessage.decode = function decode(reader, length) {
         | 
| 3918 | 
            +
                                    if (!(reader instanceof $Reader))
         | 
| 3919 | 
            +
                                        reader = $Reader.create(reader);
         | 
| 3920 | 
            +
                                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.TW.Aptos.Proto.FungibleAssetTransferMessage();
         | 
| 3921 | 
            +
                                    while (reader.pos < end) {
         | 
| 3922 | 
            +
                                        var tag = reader.uint32();
         | 
| 3923 | 
            +
                                        switch (tag >>> 3) {
         | 
| 3924 | 
            +
                                        case 1:
         | 
| 3925 | 
            +
                                            message.metadataAddress = reader.string();
         | 
| 3926 | 
            +
                                            break;
         | 
| 3927 | 
            +
                                        case 2:
         | 
| 3928 | 
            +
                                            message.to = reader.string();
         | 
| 3929 | 
            +
                                            break;
         | 
| 3930 | 
            +
                                        case 3:
         | 
| 3931 | 
            +
                                            message.amount = reader.uint64();
         | 
| 3932 | 
            +
                                            break;
         | 
| 3933 | 
            +
                                        default:
         | 
| 3934 | 
            +
                                            reader.skipType(tag & 7);
         | 
| 3935 | 
            +
                                            break;
         | 
| 3936 | 
            +
                                        }
         | 
| 3937 | 
            +
                                    }
         | 
| 3938 | 
            +
                                    return message;
         | 
| 3939 | 
            +
                                };
         | 
| 3940 | 
            +
                
         | 
| 3941 | 
            +
                                /**
         | 
| 3942 | 
            +
                                 * Verifies a FungibleAssetTransferMessage message.
         | 
| 3943 | 
            +
                                 * @function verify
         | 
| 3944 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3945 | 
            +
                                 * @static
         | 
| 3946 | 
            +
                                 * @param {Object.<string,*>} message Plain object to verify
         | 
| 3947 | 
            +
                                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
         | 
| 3948 | 
            +
                                 */
         | 
| 3949 | 
            +
                                FungibleAssetTransferMessage.verify = function verify(message) {
         | 
| 3950 | 
            +
                                    if (typeof message !== "object" || message === null)
         | 
| 3951 | 
            +
                                        return "object expected";
         | 
| 3952 | 
            +
                                    if (message.metadataAddress != null && message.hasOwnProperty("metadataAddress"))
         | 
| 3953 | 
            +
                                        if (!$util.isString(message.metadataAddress))
         | 
| 3954 | 
            +
                                            return "metadataAddress: string expected";
         | 
| 3955 | 
            +
                                    if (message.to != null && message.hasOwnProperty("to"))
         | 
| 3956 | 
            +
                                        if (!$util.isString(message.to))
         | 
| 3957 | 
            +
                                            return "to: string expected";
         | 
| 3958 | 
            +
                                    if (message.amount != null && message.hasOwnProperty("amount"))
         | 
| 3959 | 
            +
                                        if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
         | 
| 3960 | 
            +
                                            return "amount: integer|Long expected";
         | 
| 3961 | 
            +
                                    return null;
         | 
| 3962 | 
            +
                                };
         | 
| 3963 | 
            +
                
         | 
| 3964 | 
            +
                                /**
         | 
| 3965 | 
            +
                                 * Creates a FungibleAssetTransferMessage message from a plain object. Also converts values to their respective internal types.
         | 
| 3966 | 
            +
                                 * @function fromObject
         | 
| 3967 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3968 | 
            +
                                 * @static
         | 
| 3969 | 
            +
                                 * @param {Object.<string,*>} object Plain object
         | 
| 3970 | 
            +
                                 * @returns {TW.Aptos.Proto.FungibleAssetTransferMessage} FungibleAssetTransferMessage
         | 
| 3971 | 
            +
                                 */
         | 
| 3972 | 
            +
                                FungibleAssetTransferMessage.fromObject = function fromObject(object) {
         | 
| 3973 | 
            +
                                    if (object instanceof $root.TW.Aptos.Proto.FungibleAssetTransferMessage)
         | 
| 3974 | 
            +
                                        return object;
         | 
| 3975 | 
            +
                                    var message = new $root.TW.Aptos.Proto.FungibleAssetTransferMessage();
         | 
| 3976 | 
            +
                                    if (object.metadataAddress != null)
         | 
| 3977 | 
            +
                                        message.metadataAddress = String(object.metadataAddress);
         | 
| 3978 | 
            +
                                    if (object.to != null)
         | 
| 3979 | 
            +
                                        message.to = String(object.to);
         | 
| 3980 | 
            +
                                    if (object.amount != null)
         | 
| 3981 | 
            +
                                        if ($util.Long)
         | 
| 3982 | 
            +
                                            (message.amount = $util.Long.fromValue(object.amount)).unsigned = true;
         | 
| 3983 | 
            +
                                        else if (typeof object.amount === "string")
         | 
| 3984 | 
            +
                                            message.amount = parseInt(object.amount, 10);
         | 
| 3985 | 
            +
                                        else if (typeof object.amount === "number")
         | 
| 3986 | 
            +
                                            message.amount = object.amount;
         | 
| 3987 | 
            +
                                        else if (typeof object.amount === "object")
         | 
| 3988 | 
            +
                                            message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true);
         | 
| 3989 | 
            +
                                    return message;
         | 
| 3990 | 
            +
                                };
         | 
| 3991 | 
            +
                
         | 
| 3992 | 
            +
                                /**
         | 
| 3993 | 
            +
                                 * Creates a plain object from a FungibleAssetTransferMessage message. Also converts values to other types if specified.
         | 
| 3994 | 
            +
                                 * @function toObject
         | 
| 3995 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 3996 | 
            +
                                 * @static
         | 
| 3997 | 
            +
                                 * @param {TW.Aptos.Proto.FungibleAssetTransferMessage} message FungibleAssetTransferMessage
         | 
| 3998 | 
            +
                                 * @param {$protobuf.IConversionOptions} [options] Conversion options
         | 
| 3999 | 
            +
                                 * @returns {Object.<string,*>} Plain object
         | 
| 4000 | 
            +
                                 */
         | 
| 4001 | 
            +
                                FungibleAssetTransferMessage.toObject = function toObject(message, options) {
         | 
| 4002 | 
            +
                                    if (!options)
         | 
| 4003 | 
            +
                                        options = {};
         | 
| 4004 | 
            +
                                    var object = {};
         | 
| 4005 | 
            +
                                    if (options.defaults) {
         | 
| 4006 | 
            +
                                        object.metadataAddress = "";
         | 
| 4007 | 
            +
                                        object.to = "";
         | 
| 4008 | 
            +
                                        if ($util.Long) {
         | 
| 4009 | 
            +
                                            var long = new $util.Long(0, 0, true);
         | 
| 4010 | 
            +
                                            object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
         | 
| 4011 | 
            +
                                        } else
         | 
| 4012 | 
            +
                                            object.amount = options.longs === String ? "0" : 0;
         | 
| 4013 | 
            +
                                    }
         | 
| 4014 | 
            +
                                    if (message.metadataAddress != null && message.hasOwnProperty("metadataAddress"))
         | 
| 4015 | 
            +
                                        object.metadataAddress = message.metadataAddress;
         | 
| 4016 | 
            +
                                    if (message.to != null && message.hasOwnProperty("to"))
         | 
| 4017 | 
            +
                                        object.to = message.to;
         | 
| 4018 | 
            +
                                    if (message.amount != null && message.hasOwnProperty("amount"))
         | 
| 4019 | 
            +
                                        if (typeof message.amount === "number")
         | 
| 4020 | 
            +
                                            object.amount = options.longs === String ? String(message.amount) : message.amount;
         | 
| 4021 | 
            +
                                        else
         | 
| 4022 | 
            +
                                            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;
         | 
| 4023 | 
            +
                                    return object;
         | 
| 4024 | 
            +
                                };
         | 
| 4025 | 
            +
                
         | 
| 4026 | 
            +
                                /**
         | 
| 4027 | 
            +
                                 * Converts this FungibleAssetTransferMessage to JSON.
         | 
| 4028 | 
            +
                                 * @function toJSON
         | 
| 4029 | 
            +
                                 * @memberof TW.Aptos.Proto.FungibleAssetTransferMessage
         | 
| 4030 | 
            +
                                 * @instance
         | 
| 4031 | 
            +
                                 * @returns {Object.<string,*>} JSON object
         | 
| 4032 | 
            +
                                 */
         | 
| 4033 | 
            +
                                FungibleAssetTransferMessage.prototype.toJSON = function toJSON() {
         | 
| 4034 | 
            +
                                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
         | 
| 4035 | 
            +
                                };
         | 
| 4036 | 
            +
                
         | 
| 4037 | 
            +
                                return FungibleAssetTransferMessage;
         | 
| 4038 | 
            +
                            })();
         | 
| 4039 | 
            +
                
         | 
| 3823 4040 | 
             
                            Proto.ManagedTokensRegisterMessage = (function() {
         | 
| 3824 4041 |  | 
| 3825 4042 | 
             
                                /**
         | 
| @@ -6020,6 +6237,8 @@ | |
| 6020 6237 | 
             
                                 * @property {TW.Aptos.Proto.IManagedTokensRegisterMessage|null} [registerToken] SigningInput registerToken
         | 
| 6021 6238 | 
             
                                 * @property {TW.Aptos.Proto.ILiquidStaking|null} [liquidStakingMessage] SigningInput liquidStakingMessage
         | 
| 6022 6239 | 
             
                                 * @property {TW.Aptos.Proto.ITokenTransferCoinsMessage|null} [tokenTransferCoins] SigningInput tokenTransferCoins
         | 
| 6240 | 
            +
                                 * @property {TW.Aptos.Proto.IFungibleAssetTransferMessage|null} [fungibleAssetTransfer] SigningInput fungibleAssetTransfer
         | 
| 6241 | 
            +
                                 * @property {string|null} [abi] SigningInput abi
         | 
| 6023 6242 | 
             
                                 */
         | 
| 6024 6243 |  | 
| 6025 6244 | 
             
                                /**
         | 
| @@ -6157,17 +6376,33 @@ | |
| 6157 6376 | 
             
                                 */
         | 
| 6158 6377 | 
             
                                SigningInput.prototype.tokenTransferCoins = null;
         | 
| 6159 6378 |  | 
| 6379 | 
            +
                                /**
         | 
| 6380 | 
            +
                                 * SigningInput fungibleAssetTransfer.
         | 
| 6381 | 
            +
                                 * @member {TW.Aptos.Proto.IFungibleAssetTransferMessage|null|undefined} fungibleAssetTransfer
         | 
| 6382 | 
            +
                                 * @memberof TW.Aptos.Proto.SigningInput
         | 
| 6383 | 
            +
                                 * @instance
         | 
| 6384 | 
            +
                                 */
         | 
| 6385 | 
            +
                                SigningInput.prototype.fungibleAssetTransfer = null;
         | 
| 6386 | 
            +
                
         | 
| 6387 | 
            +
                                /**
         | 
| 6388 | 
            +
                                 * SigningInput abi.
         | 
| 6389 | 
            +
                                 * @member {string} abi
         | 
| 6390 | 
            +
                                 * @memberof TW.Aptos.Proto.SigningInput
         | 
| 6391 | 
            +
                                 * @instance
         | 
| 6392 | 
            +
                                 */
         | 
| 6393 | 
            +
                                SigningInput.prototype.abi = "";
         | 
| 6394 | 
            +
                
         | 
| 6160 6395 | 
             
                                // OneOf field names bound to virtual getters and setters
         | 
| 6161 6396 | 
             
                                var $oneOfFields;
         | 
| 6162 6397 |  | 
| 6163 6398 | 
             
                                /**
         | 
| 6164 6399 | 
             
                                 * SigningInput transactionPayload.
         | 
| 6165 | 
            -
                                 * @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"registerToken"|"liquidStakingMessage"|"tokenTransferCoins"|undefined} transactionPayload
         | 
| 6400 | 
            +
                                 * @member {"transfer"|"tokenTransfer"|"createAccount"|"nftMessage"|"registerToken"|"liquidStakingMessage"|"tokenTransferCoins"|"fungibleAssetTransfer"|undefined} transactionPayload
         | 
| 6166 6401 | 
             
                                 * @memberof TW.Aptos.Proto.SigningInput
         | 
| 6167 6402 | 
             
                                 * @instance
         | 
| 6168 6403 | 
             
                                 */
         | 
| 6169 6404 | 
             
                                Object.defineProperty(SigningInput.prototype, "transactionPayload", {
         | 
| 6170 | 
            -
                                    get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage", "registerToken", "liquidStakingMessage", "tokenTransferCoins"]),
         | 
| 6405 | 
            +
                                    get: $util.oneOfGetter($oneOfFields = ["transfer", "tokenTransfer", "createAccount", "nftMessage", "registerToken", "liquidStakingMessage", "tokenTransferCoins", "fungibleAssetTransfer"]),
         | 
| 6171 6406 | 
             
                                    set: $util.oneOfSetter($oneOfFields)
         | 
| 6172 6407 | 
             
                                });
         | 
| 6173 6408 |  | 
| @@ -6225,6 +6460,10 @@ | |
| 6225 6460 | 
             
                                        $root.TW.Aptos.Proto.LiquidStaking.encode(message.liquidStakingMessage, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
         | 
| 6226 6461 | 
             
                                    if (message.tokenTransferCoins != null && Object.hasOwnProperty.call(message, "tokenTransferCoins"))
         | 
| 6227 6462 | 
             
                                        $root.TW.Aptos.Proto.TokenTransferCoinsMessage.encode(message.tokenTransferCoins, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
         | 
| 6463 | 
            +
                                    if (message.fungibleAssetTransfer != null && Object.hasOwnProperty.call(message, "fungibleAssetTransfer"))
         | 
| 6464 | 
            +
                                        $root.TW.Aptos.Proto.FungibleAssetTransferMessage.encode(message.fungibleAssetTransfer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
         | 
| 6465 | 
            +
                                    if (message.abi != null && Object.hasOwnProperty.call(message, "abi"))
         | 
| 6466 | 
            +
                                        writer.uint32(/* id 21, wireType 2 =*/170).string(message.abi);
         | 
| 6228 6467 | 
             
                                    return writer;
         | 
| 6229 6468 | 
             
                                };
         | 
| 6230 6469 |  | 
| @@ -6291,6 +6530,12 @@ | |
| 6291 6530 | 
             
                                        case 15:
         | 
| 6292 6531 | 
             
                                            message.tokenTransferCoins = $root.TW.Aptos.Proto.TokenTransferCoinsMessage.decode(reader, reader.uint32());
         | 
| 6293 6532 | 
             
                                            break;
         | 
| 6533 | 
            +
                                        case 16:
         | 
| 6534 | 
            +
                                            message.fungibleAssetTransfer = $root.TW.Aptos.Proto.FungibleAssetTransferMessage.decode(reader, reader.uint32());
         | 
| 6535 | 
            +
                                            break;
         | 
| 6536 | 
            +
                                        case 21:
         | 
| 6537 | 
            +
                                            message.abi = reader.string();
         | 
| 6538 | 
            +
                                            break;
         | 
| 6294 6539 | 
             
                                        default:
         | 
| 6295 6540 | 
             
                                            reader.skipType(tag & 7);
         | 
| 6296 6541 | 
             
                                            break;
         | 
| @@ -6403,6 +6648,19 @@ | |
| 6403 6648 | 
             
                                                return "tokenTransferCoins." + error;
         | 
| 6404 6649 | 
             
                                        }
         | 
| 6405 6650 | 
             
                                    }
         | 
| 6651 | 
            +
                                    if (message.fungibleAssetTransfer != null && message.hasOwnProperty("fungibleAssetTransfer")) {
         | 
| 6652 | 
            +
                                        if (properties.transactionPayload === 1)
         | 
| 6653 | 
            +
                                            return "transactionPayload: multiple values";
         | 
| 6654 | 
            +
                                        properties.transactionPayload = 1;
         | 
| 6655 | 
            +
                                        {
         | 
| 6656 | 
            +
                                            var error = $root.TW.Aptos.Proto.FungibleAssetTransferMessage.verify(message.fungibleAssetTransfer);
         | 
| 6657 | 
            +
                                            if (error)
         | 
| 6658 | 
            +
                                                return "fungibleAssetTransfer." + error;
         | 
| 6659 | 
            +
                                        }
         | 
| 6660 | 
            +
                                    }
         | 
| 6661 | 
            +
                                    if (message.abi != null && message.hasOwnProperty("abi"))
         | 
| 6662 | 
            +
                                        if (!$util.isString(message.abi))
         | 
| 6663 | 
            +
                                            return "abi: string expected";
         | 
| 6406 6664 | 
             
                                    return null;
         | 
| 6407 6665 | 
             
                                };
         | 
| 6408 6666 |  | 
| @@ -6500,6 +6758,13 @@ | |
| 6500 6758 | 
             
                                            throw TypeError(".TW.Aptos.Proto.SigningInput.tokenTransferCoins: object expected");
         | 
| 6501 6759 | 
             
                                        message.tokenTransferCoins = $root.TW.Aptos.Proto.TokenTransferCoinsMessage.fromObject(object.tokenTransferCoins);
         | 
| 6502 6760 | 
             
                                    }
         | 
| 6761 | 
            +
                                    if (object.fungibleAssetTransfer != null) {
         | 
| 6762 | 
            +
                                        if (typeof object.fungibleAssetTransfer !== "object")
         | 
| 6763 | 
            +
                                            throw TypeError(".TW.Aptos.Proto.SigningInput.fungibleAssetTransfer: object expected");
         | 
| 6764 | 
            +
                                        message.fungibleAssetTransfer = $root.TW.Aptos.Proto.FungibleAssetTransferMessage.fromObject(object.fungibleAssetTransfer);
         | 
| 6765 | 
            +
                                    }
         | 
| 6766 | 
            +
                                    if (object.abi != null)
         | 
| 6767 | 
            +
                                        message.abi = String(object.abi);
         | 
| 6503 6768 | 
             
                                    return message;
         | 
| 6504 6769 | 
             
                                };
         | 
| 6505 6770 |  | 
| @@ -6547,6 +6812,7 @@ | |
| 6547 6812 | 
             
                                                object.privateKey = $util.newBuffer(object.privateKey);
         | 
| 6548 6813 | 
             
                                        }
         | 
| 6549 6814 | 
             
                                        object.anyEncoded = "";
         | 
| 6815 | 
            +
                                        object.abi = "";
         | 
| 6550 6816 | 
             
                                    }
         | 
| 6551 6817 | 
             
                                    if (message.sender != null && message.hasOwnProperty("sender"))
         | 
| 6552 6818 | 
             
                                        object.sender = message.sender;
         | 
| @@ -6611,6 +6877,13 @@ | |
| 6611 6877 | 
             
                                        if (options.oneofs)
         | 
| 6612 6878 | 
             
                                            object.transactionPayload = "tokenTransferCoins";
         | 
| 6613 6879 | 
             
                                    }
         | 
| 6880 | 
            +
                                    if (message.fungibleAssetTransfer != null && message.hasOwnProperty("fungibleAssetTransfer")) {
         | 
| 6881 | 
            +
                                        object.fungibleAssetTransfer = $root.TW.Aptos.Proto.FungibleAssetTransferMessage.toObject(message.fungibleAssetTransfer, options);
         | 
| 6882 | 
            +
                                        if (options.oneofs)
         | 
| 6883 | 
            +
                                            object.transactionPayload = "fungibleAssetTransfer";
         | 
| 6884 | 
            +
                                    }
         | 
| 6885 | 
            +
                                    if (message.abi != null && message.hasOwnProperty("abi"))
         | 
| 6886 | 
            +
                                        object.abi = message.abi;
         | 
| 6614 6887 | 
             
                                    return object;
         | 
| 6615 6888 | 
             
                                };
         | 
| 6616 6889 |  | 
    
        package/dist/lib/wallet-core.js
    CHANGED
    
    | @@ -36,7 +36,7 @@ function $a(a,b){var c=M;return sa||"function"!=typeof WebAssembly.instantiateSt | |
| 36 36 | 
             
            function z(a,b){Object.getOwnPropertyDescriptor(g,a)||Object.defineProperty(g,a,{configurable:!0,get:function(){n("Module."+a+" has been replaced with plain "+b+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}
         | 
| 37 37 | 
             
            function cb(a){return"FS_createPath"===a||"FS_createDataFile"===a||"FS_createPreloadedFile"===a||"FS_unlink"===a||"addRunDependency"===a||"FS_createLazyFile"===a||"FS_createDevice"===a||"removeRunDependency"===a}(function(a,b){"undefined"!==typeof globalThis&&Object.defineProperty(globalThis,a,{configurable:!0,get:function(){ya("`"+a+"` is not longer defined by emscripten. "+b)}})})("buffer","Please use HEAP8.buffer or wasmMemory.buffer");
         | 
| 38 38 | 
             
            function db(a){Object.getOwnPropertyDescriptor(g,a)||Object.defineProperty(g,a,{configurable:!0,get:function(){var b="'"+a+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";cb(a)&&(b+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you");n(b)}})}
         | 
| 39 | 
            -
            var eb={ | 
| 39 | 
            +
            var eb={2096980:()=>{if(void 0===g.fa)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.fa=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.fa=a}catch(e){throw"No secure random number generator found";}}},2097702:()=>g.fa()};
         | 
| 40 40 | 
             
            function qa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function fb(a){for(;0<a.length;)a.shift()(g)}function za(a){assert("number"===typeof a);return"0x"+a.toString(16).padStart(8,"0")}function ya(a){gb||(gb={});gb[a]||(gb[a]=1,w&&(a="warning: "+a),y(a))}var gb,hb=[];function ib(a){var b=hb[a];b||(a>=hb.length&&(hb.length=a+1),hb[a]=b=Ha.get(a));assert(Ha.get(a)==b,"JavaScript-side Wasm function table mirror is out of date!");return b}
         | 
| 41 41 | 
             
            function jb(a){this.l=a-24;this.Oa=function(b){G[this.l+4>>2]=b};this.Ja=function(b){G[this.l+8>>2]=b};this.Ka=function(){F[this.l>>2]=0};this.Ea=function(){D[this.l+12>>0]=0};this.La=function(){D[this.l+13>>0]=0};this.I=function(b,c){this.Da();this.Oa(b);this.Ja(c);this.Ka();this.Ea();this.La()};this.Da=function(){G[this.l+16>>2]=0}}
         | 
| 42 42 | 
             
            var kb=0,lb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},mb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=lb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},nb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},ob=
         | 
| Binary file |