@@ -46,8 +46,7 @@ export class AccountMetadataTransaction extends Transaction {
4646 * @param targetAddress - target account address.
4747 * @param scopedMetadataKey - Metadata key scoped to source, target and type.
4848 * @param valueSizeDelta - Change in value size in bytes.
49- * @param value - String value with UTF-8 encoding
50- * Difference between the previous value and new value.
49+ * @param value - Difference between the previous value and new value.
5150 * You can calculate value as xor(previous-value, new-value).
5251 * If there is no previous value, use directly the new value.
5352 * @param maxFee - (Optional) Max fee defined by the sender
@@ -60,7 +59,7 @@ export class AccountMetadataTransaction extends Transaction {
6059 targetAddress : UnresolvedAddress ,
6160 scopedMetadataKey : UInt64 ,
6261 valueSizeDelta : number ,
63- value : string ,
62+ value : Uint8Array ,
6463 networkType : NetworkType ,
6564 maxFee : UInt64 = new UInt64 ( [ 0 , 0 ] ) ,
6665 signature ?: string ,
@@ -111,10 +110,10 @@ export class AccountMetadataTransaction extends Transaction {
111110 */
112111 public readonly valueSizeDelta : number ,
113112 /**
114- * String value with UTF-8 encoding.
113+ * xor of previous and the new value
115114 * Difference between the previous value and new value.
116115 */
117- public readonly value : string ,
116+ public readonly value : Uint8Array ,
118117 signature ?: string ,
119118 signer ?: PublicAccount ,
120119 transactionInfo ?: TransactionInfo ,
@@ -142,7 +141,7 @@ export class AccountMetadataTransaction extends Transaction {
142141 UnresolvedMapping . toUnresolvedAddress ( Convert . uint8ToHex ( builder . getTargetAddress ( ) . unresolvedAddress ) ) ,
143142 new UInt64 ( builder . getScopedMetadataKey ( ) ) ,
144143 builder . getValueSizeDelta ( ) ,
145- Convert . uint8ToUtf8 ( builder . getValue ( ) ) ,
144+ builder . getValue ( ) ,
146145 networkType ,
147146 isEmbedded ? new UInt64 ( [ 0 , 0 ] ) : new UInt64 ( ( builder as AccountMetadataTransactionBuilder ) . fee . amount ) ,
148147 signature ,
@@ -167,7 +166,7 @@ export class AccountMetadataTransaction extends Transaction {
167166 new UnresolvedAddressDto ( this . targetAddress . encodeUnresolvedAddress ( this . networkType ) ) ,
168167 this . scopedMetadataKey . toDTO ( ) ,
169168 this . valueSizeDelta ,
170- Convert . utf8ToUint8 ( this . value ) ,
169+ this . value ,
171170 ) ;
172171 return transactionBuilder ;
173172 }
@@ -185,7 +184,7 @@ export class AccountMetadataTransaction extends Transaction {
185184 new UnresolvedAddressDto ( this . targetAddress . encodeUnresolvedAddress ( this . networkType ) ) ,
186185 this . scopedMetadataKey . toDTO ( ) ,
187186 this . valueSizeDelta ,
188- Convert . utf8ToUint8 ( this . value ) ,
187+ this . value ,
189188 ) ;
190189 }
191190
0 commit comments