File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ impl AssetIdentifier {
120
120
self . 0 . as_bytes ( ) . to_vec ( )
121
121
}
122
122
123
+ #[ wasm_bindgen( getter) ]
124
+ pub fn native ( ) -> Self {
125
+ Self ( ironfish:: assets:: asset_identifier:: NATIVE_ASSET )
126
+ }
127
+
123
128
#[ wasm_bindgen( getter, js_name = assetGenerator) ]
124
129
pub fn asset_generator ( & self ) -> ExtendedPoint {
125
130
self . 0 . asset_generator ( ) . into ( )
@@ -208,5 +213,15 @@ mod tests {
208
213
let id = AssetIdentifier :: deserialize ( & serialization[ ..] ) . unwrap ( ) ;
209
214
assert_eq ! ( id. serialize( ) , serialization) ;
210
215
}
216
+
217
+ #[ test]
218
+ #[ wasm_bindgen_test]
219
+ fn native ( ) {
220
+ let id = AssetIdentifier :: native ( ) ;
221
+ assert_eq ! (
222
+ id. serialize( ) ,
223
+ hex!( "51f33a2f14f92735e562dc658a5639279ddca3d5079a6d1242b2a588a9cbf44c" )
224
+ ) ;
225
+ }
211
226
}
212
227
}
You can’t perform that action at this time.
0 commit comments