@@ -51,8 +51,7 @@ export class MosaicMetadataTransaction extends Transaction {
5151 * @param scopedMetadataKey - Metadata key scoped to source, target and type.
5252 * @param targetMosaicId - Target unresolved mosaic identifier.
5353 * @param valueSizeDelta - Change in value size in bytes.
54- * @param value - String value with UTF-8 encoding
55- * Difference between the previous value and new value.
54+ * @param value - Difference between the previous value and new value.
5655 * You can calculate value as xor(previous-value, new-value).
5756 * If there is no previous value, use directly the new value.
5857 * @param maxFee - (Optional) Max fee defined by the sender
@@ -66,7 +65,7 @@ export class MosaicMetadataTransaction extends Transaction {
6665 scopedMetadataKey : UInt64 ,
6766 targetMosaicId : UnresolvedMosaicId ,
6867 valueSizeDelta : number ,
69- value : string ,
68+ value : Uint8Array ,
7069 networkType : NetworkType ,
7170 maxFee : UInt64 = new UInt64 ( [ 0 , 0 ] ) ,
7271 signature ?: string ,
@@ -123,10 +122,10 @@ export class MosaicMetadataTransaction extends Transaction {
123122 */
124123 public readonly valueSizeDelta : number ,
125124 /**
126- * String value with UTF-8 encoding.
125+ * xor of previous and the new value
127126 * Difference between the previous value and new value.
128127 */
129- public readonly value : string ,
128+ public readonly value : Uint8Array ,
130129 signature ?: string ,
131130 signer ?: PublicAccount ,
132131 transactionInfo ?: TransactionInfo ,
@@ -155,7 +154,7 @@ export class MosaicMetadataTransaction extends Transaction {
155154 new UInt64 ( builder . getScopedMetadataKey ( ) ) ,
156155 UnresolvedMapping . toUnresolvedMosaic ( new UInt64 ( builder . getTargetMosaicId ( ) . unresolvedMosaicId ) . toHex ( ) ) ,
157156 builder . getValueSizeDelta ( ) ,
158- Convert . uint8ToUtf8 ( builder . getValue ( ) ) ,
157+ builder . getValue ( ) ,
159158 networkType ,
160159 isEmbedded ? new UInt64 ( [ 0 , 0 ] ) : new UInt64 ( ( builder as MosaicMetadataTransactionBuilder ) . fee . amount ) ,
161160 signature ,
@@ -181,7 +180,7 @@ export class MosaicMetadataTransaction extends Transaction {
181180 this . scopedMetadataKey . toDTO ( ) ,
182181 new UnresolvedMosaicIdDto ( this . targetMosaicId . id . toDTO ( ) ) ,
183182 this . valueSizeDelta ,
184- Convert . utf8ToUint8 ( this . value ) ,
183+ this . value ,
185184 ) ;
186185 return transactionBuilder ;
187186 }
@@ -200,7 +199,7 @@ export class MosaicMetadataTransaction extends Transaction {
200199 this . scopedMetadataKey . toDTO ( ) ,
201200 new UnresolvedMosaicIdDto ( this . targetMosaicId . id . toDTO ( ) ) ,
202201 this . valueSizeDelta ,
203- Convert . utf8ToUint8 ( this . value ) ,
202+ this . value ,
204203 ) ;
205204 }
206205
0 commit comments