@@ -17,6 +17,8 @@ describe('parsing and building ScVals', function () {
1717 i32 : xdr . ScVal . scvI32 ( 1 ) ,
1818 u64 : 1n ,
1919 i64 : - 1n ,
20+ timepoint : new ScInt ( 1443571200n ) . toTimepoint ( ) ,
21+ duration : new ScInt ( 1000n ) . toDuration ( ) ,
2022 u128 : new ScInt ( 1 ) . toU128 ( ) ,
2123 i128 : new ScInt ( 1 ) . toI128 ( ) ,
2224 u256 : new ScInt ( 1 ) . toU256 ( ) ,
@@ -32,6 +34,7 @@ describe('parsing and building ScVals', function () {
3234 const targetScv = xdr . ScVal . scvMap (
3335 [
3436 [ 'bool' , xdr . ScVal . scvBool ( true ) ] ,
37+ [ 'duration' , new ScInt ( 1000n , { type : 'duration' } ) . toScVal ( ) ] ,
3538 [ 'i128' , new ScInt ( 1 , { type : 'i128' } ) . toScVal ( ) ] ,
3639 [ 'i256' , new ScInt ( 1 , { type : 'i256' } ) . toScVal ( ) ] ,
3740 [ 'i32' , xdr . ScVal . scvI32 ( 1 ) ] ,
@@ -53,6 +56,7 @@ describe('parsing and building ScVals', function () {
5356 } )
5457 ] )
5558 ] ,
59+ [ 'timepoint' , new ScInt ( 1443571200n , { type : 'timepoint' } ) . toScVal ( ) ] ,
5660 [ 'u128' , new ScInt ( 1 , { type : 'u128' } ) . toScVal ( ) ] ,
5761 [ 'u256' , new ScInt ( 1 , { type : 'u256' } ) . toScVal ( ) ] ,
5862 [ 'u32' , xdr . ScVal . scvU32 ( 1 ) ] ,
@@ -156,6 +160,8 @@ describe('parsing and building ScVals', function () {
156160 [ 1 , 'i64' , 'scvI64' ] ,
157161 [ 1 , 'i128' , 'scvI128' ] ,
158162 [ 1 , 'u256' , 'scvU256' ] ,
163+ [ 2 , 'timepoint' , 'scvTimepoint' ] ,
164+ [ 3 , 'duration' , 'scvDuration' ] ,
159165 [ 'a' , 'symbol' , 'scvSymbol' ] ,
160166 [ 'a' , undefined , 'scvString' ] ,
161167 [ Keypair . random ( ) , undefined , 'scvAddress' ] ,
0 commit comments