fix bug: final api add chain param and add npm test